From 29e317db39df6358ada91be9ca28664ee02348f7 Mon Sep 17 00:00:00 2001 From: Rex Date: Fri, 21 Aug 2020 10:42:24 +0800 Subject: [PATCH 001/153] Get ascent and descent from context.measureText method Get ascent and descent from context.measureText method instead of scanning image data. --- src/gameobjects/text/MeasureText.js | 97 ++--------------------------- 1 file changed, 6 insertions(+), 91 deletions(-) diff --git a/src/gameobjects/text/MeasureText.js b/src/gameobjects/text/MeasureText.js index 331542861..7ea186209 100644 --- a/src/gameobjects/text/MeasureText.js +++ b/src/gameobjects/text/MeasureText.js @@ -26,101 +26,16 @@ var MeasureText = function (textStyle) textStyle.syncFont(canvas, context); - var width = Math.ceil(context.measureText(textStyle.testString).width * textStyle.baselineX); - var baseline = width; - var height = 2 * baseline; - - baseline = baseline * textStyle.baselineY | 0; - - canvas.width = width; - canvas.height = height; - - context.fillStyle = '#f00'; - context.fillRect(0, 0, width, height); - - context.font = textStyle._font; - - context.textBaseline = 'alphabetic'; - context.fillStyle = '#000'; - context.fillText(textStyle.testString, 0, baseline); + var metrics = context.measureText(textStyle.testString); + var ascent = metrics.actualBoundingBoxAscent; + var descent = metrics.actualBoundingBoxDescent; var output = { - ascent: 0, - descent: 0, - fontSize: 0 + ascent: ascent, + descent: descent, + fontSize: (ascent + descent) }; - if (!context.getImageData(0, 0, width, height)) - { - output.ascent = baseline; - output.descent = baseline + 6; - output.fontSize = output.ascent + output.descent; - - CanvasPool.remove(canvas); - - return output; - } - - var imagedata = context.getImageData(0, 0, width, height).data; - var pixels = imagedata.length; - var line = width * 4; - var i; - var j; - var idx = 0; - var stop = false; - - // ascent. scan from top to bottom until we find a non red pixel - for (i = 0; i < baseline; i++) - { - for (j = 0; j < line; j += 4) - { - if (imagedata[idx + j] !== 255) - { - stop = true; - break; - } - } - - if (!stop) - { - idx += line; - } - else - { - break; - } - } - - output.ascent = baseline - i; - - idx = pixels - line; - stop = false; - - // descent. scan from bottom to top until we find a non red pixel - for (i = height; i > baseline; i--) - { - for (j = 0; j < line; j += 4) - { - if (imagedata[idx + j] !== 255) - { - stop = true; - break; - } - } - - if (!stop) - { - idx -= line; - } - else - { - break; - } - } - - output.descent = (i - baseline); - output.fontSize = output.ascent + output.descent; - CanvasPool.remove(canvas); return output; From a9e6604eb23459268615b84dba3a33b858af134e Mon Sep 17 00:00:00 2001 From: Rex Date: Mon, 7 Sep 2020 21:36:27 +0800 Subject: [PATCH 002/153] Support IE IE and Firefox for Android do not have actualBoundingBoxAscent and actualBoundingBoxDescent properties. Use origin solution to get ascent and descent. --- src/gameobjects/text/MeasureText.js | 115 ++++++++++++++++++++++++++-- 1 file changed, 109 insertions(+), 6 deletions(-) diff --git a/src/gameobjects/text/MeasureText.js b/src/gameobjects/text/MeasureText.js index 7ea186209..698492d8b 100644 --- a/src/gameobjects/text/MeasureText.js +++ b/src/gameobjects/text/MeasureText.js @@ -9,7 +9,7 @@ var CanvasPool = require('../../display/canvas/CanvasPool'); /** * Calculates the ascent, descent and fontSize of a given font style. * - * @function Phaser.GameObjects.Text.MeasureText + * @function Phaser.GameObjects.MeasureText * @since 3.0.0 * * @param {Phaser.GameObjects.TextStyle} textStyle - The TextStyle object to measure. @@ -27,15 +27,118 @@ var MeasureText = function (textStyle) textStyle.syncFont(canvas, context); var metrics = context.measureText(textStyle.testString); - var ascent = metrics.actualBoundingBoxAscent; - var descent = metrics.actualBoundingBoxDescent; + + if (metrics.hasOwnProperty('actualBoundingBoxAscent') && metrics.hasOwnProperty('actualBoundingBoxDescent')) + { + var ascent = metrics.actualBoundingBoxAscent; + var descent = metrics.actualBoundingBoxDescent; + + var output = { + ascent: ascent, + descent: descent, + fontSize: (ascent + descent) + }; + + CanvasPool.remove(canvas); + + return output; + } + + var width = Math.ceil(metrics.width * textStyle.baselineX); + var baseline = width; + var height = 2 * baseline; + + baseline = baseline * textStyle.baselineY | 0; + + canvas.width = width; + canvas.height = height; + + context.fillStyle = '#f00'; + context.fillRect(0, 0, width, height); + + context.font = textStyle._font; + + context.textBaseline = 'alphabetic'; + context.fillStyle = '#000'; + context.fillText(textStyle.testString, 0, baseline); var output = { - ascent: ascent, - descent: descent, - fontSize: (ascent + descent) + ascent: 0, + descent: 0, + fontSize: 0 }; + if (!context.getImageData(0, 0, width, height)) + { + output.ascent = baseline; + output.descent = baseline + 6; + output.fontSize = output.ascent + output.descent; + + CanvasPool.remove(canvas); + + return output; + } + + var imagedata = context.getImageData(0, 0, width, height).data; + var pixels = imagedata.length; + var line = width * 4; + var i; + var j; + var idx = 0; + var stop = false; + + // ascent. scan from top to bottom until we find a non red pixel + for (i = 0; i < baseline; i++) + { + for (j = 0; j < line; j += 4) + { + if (imagedata[idx + j] !== 255) + { + stop = true; + break; + } + } + + if (!stop) + { + idx += line; + } + else + { + break; + } + } + + output.ascent = baseline - i; + + idx = pixels - line; + stop = false; + + // descent. scan from bottom to top until we find a non red pixel + for (i = height; i > baseline; i--) + { + for (j = 0; j < line; j += 4) + { + if (imagedata[idx + j] !== 255) + { + stop = true; + break; + } + } + + if (!stop) + { + idx -= line; + } + else + { + break; + } + } + + output.descent = (i - baseline); + output.fontSize = output.ascent + output.descent; + CanvasPool.remove(canvas); return output; From b0ce62e2d88dde2be2377b5b974aa9d1a789d3dd Mon Sep 17 00:00:00 2001 From: samme Date: Tue, 8 Sep 2020 18:44:12 -0700 Subject: [PATCH 003/153] Docs: correct type for Body#customBoundsRectangle --- src/physics/arcade/Body.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index a0b5ac624..f2500ef40 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -402,7 +402,7 @@ var Body = new Class({ * You can also change it by using the `Body.setBoundsRectangle` method. * * @name Phaser.Physics.Arcade.Body#customBoundsRectangle - * @type {?Phaser.Geom.Rectangle} + * @type {Phaser.Geom.Rectangle} * @since 3.20 */ this.customBoundsRectangle = world.bounds; From d3e82f2d7680ffb6741b1a78bf808708c3ea1e47 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 11:38:45 +0100 Subject: [PATCH 004/153] The new Pipeline Manager class --- src/renderer/webgl/PipelineManager.js | 410 ++++++++++++++++++++++++++ 1 file changed, 410 insertions(+) create mode 100644 src/renderer/webgl/PipelineManager.js diff --git a/src/renderer/webgl/PipelineManager.js b/src/renderer/webgl/PipelineManager.js new file mode 100644 index 000000000..06e57e290 --- /dev/null +++ b/src/renderer/webgl/PipelineManager.js @@ -0,0 +1,410 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = require('../../utils/Class'); +var CustomMap = require('../../structs/Map'); +var CONST = require('./pipelines/const'); + +// Default Phaser 3 Pipelines +var BitmapMaskPipeline = require('./pipelines/BitmapMaskPipeline'); +var LightPipeline = require('./pipelines/LightPipeline'); +var MultiPipeline = require('./pipelines/MultiPipeline'); +var RopePipeline = require('./pipelines/RopePipeline'); +var SinglePipeline = require('./pipelines/SinglePipeline'); + +/** + * @classdesc + * + * + * @class PipelineManager + * @memberof Phaser.Renderer.WebGL + * @constructor + * @since 3.50.0 + * + * @param {} config - The pipeline configuration object. + */ +var PipelineManager = new Class({ + + initialize: + + function PipelineManager (game) + { + // var gameConfig = game.config; + + /** + * A reference to the Game instance. + * + * @name Phaser.Renderer.WebGL.PipelineManager#game + * @type {Phaser.Game} + * @since 3.50.0 + */ + this.game = game; + + /** + * A reference to the WebGL Renderer instance. + * + * @name Phaser.Renderer.WebGL.PipelineManager#renderer + * @type {Phaser.Renderer.WebGL.WebGLRenderer} + * @since 3.50.0 + */ + this.renderer = game.renderer; + + /** + * The underlying WebGL context of the renderer. + * + * This is set in the `boot` method. + * + * @name Phaser.Renderer.WebGL.PipelineManager#gl + * @type {WebGLRenderingContext} + * @default null + * @since 3.50.0 + */ + this.gl = null; + + /** + * This map stores all pipeline instances in this manager. + * + * This is populated with the default pipelines in the `boot` method. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines + * @type {Phaser.Structs.Map.} + * @since 3.50.0 + */ + this.pipelines = new CustomMap(); + + /** + * Current pipeline in use by the WebGLRenderer. + * + * @name Phaser.Renderer.WebGL.PipelineManager#currentPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @since 3.50.0 + */ + this.currentPipeline = null; + + /** + * The previous WebGLPipeline that was in use. + * + * This is set when `clearPipeline` is called and restored in `rebindPipeline` if none is given. + * + * @name Phaser.Renderer.WebGL.PipelineManager#previousPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @since 3.50.0 + */ + this.previousPipeline = null; + }, + + /** + * Internal boot handler, called by the WebGLRenderer durings its boot process. + * + * Adds all of the default pipelines, based on the game config, and then calls + * the `boot` method on each one of them. + * + * Finally, the default pipeline is set. + * + * @method Phaser.Renderer.WebGL.PipelineManager#boot + * @since 3.50.0 + */ + boot: function () + { + var game = this.game; + + var multi = this.add(CONST.MULTI_PIPELINE, new MultiPipeline({ game: game })); + + this.add(CONST.SINGLE_PIPELINE, new SinglePipeline({ game: game })); + this.add(CONST.ROPE_PIPELINE, new RopePipeline({ game: game })); + this.add(CONST.BITMAPMASK_PIPELINE, new BitmapMaskPipeline({ game: game })); + this.add(CONST.LIGHT_PIPELINE, new LightPipeline({ game: game })); + + this.set(multi); + }, + + /** + * Adds a pipeline instance to this Pipeline Manager. + * + * The name of the instance must be unique within this manager. + * + * Make sure to pass an instance to this method, not a base class. For example: + * + * ```javascript + * this.add('yourName', new MultiPipeline());` + * ``` + * + * @method Phaser.Renderer.WebGL.PipelineManager#addPipeline + * @since 3.50.0 + * + * @param {string} name - A unique string-based key for the pipeline within the manager. + * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - A pipeline _instance_ which must extend `WebGLPipeline`. + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance that was passed. + */ + add: function (name, pipeline) + { + var pipelines = this.pipelines; + var renderer = this.renderer; + + if (!pipelines.has(name)) + { + pipelines.set(name, pipeline); + } + else + { + console.warn('Pipeline exists: ' + name); + } + + pipeline.name = name; + + if (!pipeline.hasBooted) + { + pipeline.boot(); + } + + pipeline.resize(renderer.width, renderer.height, renderer.config.resolution); + + return pipeline; + }, + + /** + * Resizes handler. + * + * This is called automatically by the `WebGLRenderer` when the game resizes. + * + * @method Phaser.Renderer.WebGL.PipelineManager#resize + * @since 3.50.0 + * + * @param {number} [width] - The new width of the renderer. + * @param {number} [height] - The new height of the renderer. + * @param {number} [resolution] - The new resolution of the renderer. + */ + resize: function (width, height, resolution) + { + var pipelines = this.pipelines; + + pipelines.each(function (pipelineName, pipelineInstance) + { + pipelineInstance.resize(width, height, resolution); + }); + }, + + /** + * Flushes the current pipeline, if one is bound. + * + * @method Phaser.Renderer.WebGL.PipelineManager#flush + * @since 3.50.0 + */ + flush: function () + { + if (this.currentPipeline) + { + this.currentPipeline.flush(); + } + }, + + /** + * Checks if a pipeline is present in the Pipeline Manager. + * + * @method Phaser.Renderer.WebGL.PipelineManager#has + * @since 3.50.0 + * + * @param {string} name - The name of the pipeline to check for. + * + * @return {boolean} `true` if the given pipeline is loaded, otherwise `false`. + */ + has: function (name) + { + return this.pipelines.has(name); + }, + + /** + * Returns the pipeline instance based on the given name. + * + * If no instance exists in this manager, it returns `undefined` instead. + * + * @method Phaser.Renderer.WebGL.PipelineManager#get + * @since 3.50.0 + * + * @param {string} name - The name of the pipeline to get. + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance, or `undefined` if not found. + */ + get: function (name) + { + return this.pipelines.get(name); + }, + + /** + * Removes a pipeline based on the given name. + * + * If no pipeline matches the name, this method does nothing. + * + * Note that the pipeline will not be flushed or destroyed, it's simply removed from + * this manager. + * + * @method Phaser.Renderer.WebGL.PipelineManager#remove + * @since 3.50.0 + * + * @param {string} name - The name of the pipeline to be removed. + */ + remove: function (name) + { + this.pipelines.delete(name); + }, + + /** + * Sets the current pipeline to be used by the `WebGLRenderer`. + * + * This method accepts a pipeline instance as its parameter, not the name. + * + * If the pipeline isn't already the current one, it will also call `resetTextures` on + * the `WebGLRenderer`. After this, `WebGLPipeline.bind` and then `onBind` are called. + * + * @method Phaser.Renderer.WebGL.PipelineManager#set + * @since 3.50.0 + * + * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The pipeline instance to be set as current. + * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any. + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline that was set. + */ + set: function (pipeline, gameObject) + { + var renderer = this.renderer; + var current = this.currentPipeline; + + if ( + current !== pipeline || + current.vertexBuffer !== renderer.currentVertexBuffer || + current.program !== renderer.currentProgram + ) + { + renderer.resetTextures(); + + this.currentPipeline = pipeline; + + pipeline.bind(); + } + + pipeline.onBind(gameObject); + + return pipeline; + }, + + /** + * Use this to reset the gl context to the state that Phaser requires to continue rendering. + * + * Calling this will: + * + * * Disable `DEPTH_TEST`, `CULL_FACE` and `STENCIL_TEST`. + * * Clear the depth buffer and stencil buffers. + * * Reset the viewport size. + * * Reset the blend mode. + * * Bind a blank texture as the active texture on texture unit zero. + * * Rebinds the given pipeline instance. + * + * You should call this if you have previously called `clear`, and then wish to return + * rendering control to Phaser again. + * + * @method Phaser.Renderer.WebGL.PipelineManager#rebind + * @since 3.50.0 + * + * @param {Phaser.Renderer.WebGL.WebGLPipeline} [pipeline] - The pipeline instance to be rebound. If not given, the previous pipeline will be bound. + */ + rebind: function (pipeline) + { + if (pipeline === undefined && this.previousPipeline) + { + pipeline = this.previousPipeline; + } + + if (!pipeline) + { + return; + } + + var gl = this.gl; + var renderer = this.renderer; + + gl.disable(gl.DEPTH_TEST); + gl.disable(gl.CULL_FACE); + + if (renderer.hasActiveStencilMask()) + { + gl.clear(gl.DEPTH_BUFFER_BIT); + } + else + { + // If there wasn't a stencil mask set before this call, we can disable it safely + gl.disable(gl.STENCIL_TEST); + gl.clear(gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); + } + + gl.viewport(0, 0, renderer.width, renderer.height); + + renderer.currentProgram = null; + renderer.currentVertexBuffer = null; + renderer.currentIndexBuffer = null; + + renderer.setBlendMode(0, true); + + renderer.resetTextures(); + + this.currentPipeline = pipeline; + + pipeline.bind(true); + pipeline.onBind(); + }, + + /** + * Flushes the current pipeline being used and then clears it, along with the + * the current shader program and vertex buffer from the `WebGLRenderer`. + * + * Then resets the blend mode to NORMAL. + * + * Call this before jumping to your own gl context handler, and then call `rebind` when + * you wish to return control to Phaser again. + * + * @method Phaser.Renderer.WebGL.PipelineManager#clear + * @since 3.50.0 + */ + clearPipeline: function () + { + var renderer = this.renderer; + + this.flush(); + + this.previousPipeline = this.currentPipeline; + + this.currentPipeline = null; + + renderer.currentProgram = null; + renderer.currentVertexBuffer = null; + renderer.currentIndexBuffer = null; + + renderer.setBlendMode(0, true); + }, + + /** + * Destroy the Pipeline Manager, cleaning up all related resources and references. + * + * @method Phaser.Renderer.WebGL.PipelineManager#destroy + * @since 3.50.0 + */ + destroy: function () + { + this.flush(); + + this.pipelines.clear(); + + this.gl = null; + this.renderer = null; + this.game = null; + this.pipelines = null; + } + +}); + +module.exports = PipelineManager; From 7765016caaff355f46aaf25f506362ee40bd4829 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 11:39:10 +0100 Subject: [PATCH 005/153] Pipeline constants so we can avoid using strings elsewhere --- src/renderer/webgl/index.js | 5 ++- src/renderer/webgl/pipelines/const.js | 61 +++++++++++++++++++++++++++ src/renderer/webgl/pipelines/index.js | 13 +++++- 3 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 src/renderer/webgl/pipelines/const.js diff --git a/src/renderer/webgl/index.js b/src/renderer/webgl/index.js index 3879bb14b..e49fdd198 100644 --- a/src/renderer/webgl/index.js +++ b/src/renderer/webgl/index.js @@ -10,9 +10,10 @@ module.exports = { + PipelineManager: require('./PipelineManager'), + Pipelines: require('./pipelines'), Utils: require('./Utils'), WebGLPipeline: require('./WebGLPipeline'), - WebGLRenderer: require('./WebGLRenderer'), - Pipelines: require('./pipelines') + WebGLRenderer: require('./WebGLRenderer') }; diff --git a/src/renderer/webgl/pipelines/const.js b/src/renderer/webgl/pipelines/const.js new file mode 100644 index 000000000..fa8171bf6 --- /dev/null +++ b/src/renderer/webgl/pipelines/const.js @@ -0,0 +1,61 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var PIPELINE_CONST = { + + /** + * The Bitmap Mask Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + BITMAPMASK_PIPELINE: 'BitmapMaskPipeline', + + /** + * The Light 2D Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + LIGHT_PIPELINE: 'Light2D', + + /** + * The Single Texture Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + SINGLE_PIPELINE: 'SinglePipeline', + + /** + * The Multi Texture Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + MULTI_PIPELINE: 'MultiPipeline', + + /** + * The Rope Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + ROPE_PIPELINE: 'RopePipeline' + +}; + +module.exports = PIPELINE_CONST; diff --git a/src/renderer/webgl/pipelines/index.js b/src/renderer/webgl/pipelines/index.js index d3964677c..8f5490d1c 100644 --- a/src/renderer/webgl/pipelines/index.js +++ b/src/renderer/webgl/pipelines/index.js @@ -4,11 +4,14 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var CONST = require('./const'); +var Extend = require('../utils/object/Extend'); + /** * @namespace Phaser.Renderer.WebGL.Pipelines */ -module.exports = { +var Pipelines = { BitmapMaskPipeline: require('./BitmapMaskPipeline'), LightPipeline: require('./LightPipeline'), @@ -18,3 +21,11 @@ module.exports = { ModelViewProjection: require('./components/ModelViewProjection') }; + +// Merge in the consts + +Pipelines = Extend(false, Pipelines, CONST); + +// Export it + +module.exports = Pipelines; From 4ea080e8a8174402a3388fd69c50ee5d6838237e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 12:59:02 +0100 Subject: [PATCH 006/153] JSDoc fix --- src/gameobjects/bitmaptext/BatchChar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameobjects/bitmaptext/BatchChar.js b/src/gameobjects/bitmaptext/BatchChar.js index 3bec507ed..cdf962974 100644 --- a/src/gameobjects/bitmaptext/BatchChar.js +++ b/src/gameobjects/bitmaptext/BatchChar.js @@ -11,7 +11,7 @@ * @since 3.50.0 * @private * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The BitmapText Game Object. + * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The WebGLPipeline. Must have a `batchQuad` method. * @param {Phaser.GameObjects.BitmapText} src - The BitmapText Game Object. * @param {Phaser.Types.GameObjects.BitmapText.BitmapTextCharacter} char - The character to render. * @param {Phaser.Types.GameObjects.BitmapText.BitmapFontCharacterData} glyph - The character glyph. From d198818d8045a717afc4e3714281f3ef8eb56224 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 13:03:46 +0100 Subject: [PATCH 007/153] Game Objects now call the new Pipeline Manager methods directly --- .../dynamic/DynamicBitmapTextWebGLRenderer.js | 4 +- .../static/BitmapTextWebGLRenderer.js | 4 +- .../blitter/BlitterWebGLRenderer.js | 4 +- src/gameobjects/extern/ExternWebGLRenderer.js | 6 +- .../graphics/GraphicsWebGLRenderer.js | 4 +- src/gameobjects/mesh/MeshWebGLRenderer.js | 4 +- .../particles/ParticleManagerWebGLRenderer.js | 4 +- .../RenderTextureWebGLRenderer.js | 4 +- src/gameobjects/rope/RopeWebGLRenderer.js | 4 +- src/gameobjects/shader/Shader.js | 212 +++++++++--------- src/gameobjects/shader/ShaderWebGLRenderer.js | 20 +- src/gameobjects/shape/arc/ArcWebGLRenderer.js | 4 +- .../shape/curve/CurveWebGLRenderer.js | 4 +- .../shape/ellipse/EllipseWebGLRenderer.js | 4 +- .../shape/grid/GridWebGLRenderer.js | 4 +- .../shape/isobox/IsoBoxWebGLRenderer.js | 4 +- .../isotriangle/IsoTriangleWebGLRenderer.js | 4 +- .../shape/line/LineWebGLRenderer.js | 4 +- .../shape/polygon/PolygonWebGLRenderer.js | 4 +- .../shape/rectangle/RectangleWebGLRenderer.js | 6 +- .../shape/star/StarWebGLRenderer.js | 4 +- .../shape/triangle/TriangleWebGLRenderer.js | 4 +- .../text/static/TextWebGLRenderer.js | 4 +- .../tilesprite/TileSpriteWebGLRenderer.js | 7 +- .../DynamicTilemapLayerWebGLRenderer.js | 4 +- .../StaticTilemapLayerWebGLRenderer.js | 2 +- 26 files changed, 142 insertions(+), 191 deletions(-) diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js index 50557a048..c59803e83 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js @@ -32,9 +32,7 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, src, interpolationPerce return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; diff --git a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js index 6c763715e..cfe3c6ff6 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js @@ -32,9 +32,7 @@ var BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; diff --git a/src/gameobjects/blitter/BlitterWebGLRenderer.js b/src/gameobjects/blitter/BlitterWebGLRenderer.js index 333a6faa6..44c50d2ed 100644 --- a/src/gameobjects/blitter/BlitterWebGLRenderer.js +++ b/src/gameobjects/blitter/BlitterWebGLRenderer.js @@ -30,9 +30,7 @@ var BlitterWebGLRenderer = function (renderer, src, interpolationPercentage, cam return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var cameraScrollX = camera.scrollX * src.scrollFactorX; var cameraScrollY = camera.scrollY * src.scrollFactorY; diff --git a/src/gameobjects/extern/ExternWebGLRenderer.js b/src/gameobjects/extern/ExternWebGLRenderer.js index a4ebb4b95..65f33d1f1 100644 --- a/src/gameobjects/extern/ExternWebGLRenderer.js +++ b/src/gameobjects/extern/ExternWebGLRenderer.js @@ -21,9 +21,7 @@ */ var ExternWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = renderer.currentPipeline; - - renderer.clearPipeline(); + renderer.pipelines.clear(); var camMatrix = renderer._tempMatrix1; var spriteMatrix = renderer._tempMatrix2; @@ -57,7 +55,7 @@ var ExternWebGLRenderer = function (renderer, src, interpolationPercentage, came // Callback src.render.call(src, renderer, camera, calcMatrix); - renderer.rebindPipeline(pipeline); + renderer.pipelines.rebind(); }; module.exports = ExternWebGLRenderer; diff --git a/src/gameobjects/graphics/GraphicsWebGLRenderer.js b/src/gameobjects/graphics/GraphicsWebGLRenderer.js index 2f907f9f6..29e64f028 100644 --- a/src/gameobjects/graphics/GraphicsWebGLRenderer.js +++ b/src/gameobjects/graphics/GraphicsWebGLRenderer.js @@ -47,9 +47,7 @@ var GraphicsWebGLRenderer = function (renderer, src, interpolationPercentage, ca return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = src._tempMatrix1; var graphicsMatrix = src._tempMatrix2; diff --git a/src/gameobjects/mesh/MeshWebGLRenderer.js b/src/gameobjects/mesh/MeshWebGLRenderer.js index 0cff3c919..294860c05 100644 --- a/src/gameobjects/mesh/MeshWebGLRenderer.js +++ b/src/gameobjects/mesh/MeshWebGLRenderer.js @@ -23,9 +23,7 @@ var Utils = require('../../renderer/webgl/Utils'); */ var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; diff --git a/src/gameobjects/particles/ParticleManagerWebGLRenderer.js b/src/gameobjects/particles/ParticleManagerWebGLRenderer.js index 2cfe92e8a..01c19feb7 100644 --- a/src/gameobjects/particles/ParticleManagerWebGLRenderer.js +++ b/src/gameobjects/particles/ParticleManagerWebGLRenderer.js @@ -31,7 +31,7 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpola return; } - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1.copyFrom(camera.matrix); var calcMatrix = pipeline._tempMatrix2; @@ -40,8 +40,6 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpola camMatrix.multiply(managerMatrix); - renderer.setPipeline(pipeline); - var roundPixels = camera.roundPixels; var texture = emitterManager.defaultFrame.glTexture; var getTint = Utils.getTintAppendFloatAlphaAndSwap; diff --git a/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js b/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js index 7f2462632..98e2c6bf4 100644 --- a/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js +++ b/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js @@ -27,9 +27,7 @@ var RenderTextureWebGLRenderer = function (renderer, src, interpolationPercentag var width = frame.width; var height = frame.height; var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = src.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(src.pipeline, src); var textureUnit = pipeline.setTexture2D(frame.glTexture, src); diff --git a/src/gameobjects/rope/RopeWebGLRenderer.js b/src/gameobjects/rope/RopeWebGLRenderer.js index a1d3d5b0e..57266cb20 100644 --- a/src/gameobjects/rope/RopeWebGLRenderer.js +++ b/src/gameobjects/rope/RopeWebGLRenderer.js @@ -23,9 +23,7 @@ var Utils = require('../../renderer/webgl/Utils'); */ var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = src.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(src.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; diff --git a/src/gameobjects/shader/Shader.js b/src/gameobjects/shader/Shader.js index c969d788c..1e0318ddb 100644 --- a/src/gameobjects/shader/Shader.js +++ b/src/gameobjects/shader/Shader.js @@ -16,44 +16,44 @@ var TransformMatrix = require('../components/TransformMatrix'); /** * @classdesc * A Shader Game Object. - * + * * This Game Object allows you to easily add a quad with its own shader into the display list, and manipulate it * as you would any other Game Object, including scaling, rotating, positioning and adding to Containers. Shaders * can be masked with either Bitmap or Geometry masks and can also be used as a Bitmap Mask for a Camera or other * Game Object. They can also be made interactive and used for input events. - * + * * It works by taking a reference to a `Phaser.Display.BaseShader` instance, as found in the Shader Cache. These can * be created dynamically at runtime, or loaded in via the GLSL File Loader: - * + * * ```javascript * function preload () * { * this.load.glsl('fire', 'shaders/fire.glsl.js'); * } - * + * * function create () * { * this.add.shader('fire', 400, 300, 512, 512); * } * ``` - * + * * Please see the Phaser 3 Examples GitHub repo for examples of loading and creating shaders dynamically. - * + * * Due to the way in which they work, you cannot directly change the alpha or blend mode of a Shader. This should * be handled via exposed uniforms in the shader code itself. - * + * * By default a Shader will be created with a standard set of uniforms. These were added to match those * found on sites such as ShaderToy or GLSLSandbox, and provide common functionality a shader may need, * such as the timestamp, resolution or pointer position. You can replace them by specifying your own uniforms * in the Base Shader. - * + * * These Shaders work by halting the current pipeline during rendering, creating a viewport matched to the * size of this Game Object and then renders a quad using the bound shader. At the end, the pipeline is restored. - * + * * Because it blocks the pipeline it means it will interrupt any batching that is currently going on, so you should * use these Game Objects sparingly. If you need to have a fully batched custom shader, then please look at using * a custom pipeline instead. However, for background or special masking effects, they are extremely effective. - * + * * @class Shader * @extends Phaser.GameObjects.GameObject * @memberof Phaser.GameObjects @@ -108,7 +108,7 @@ var Shader = new Class({ /** * This Game Object cannot have a blend mode, so skip all checks. - * + * * @name Phaser.GameObjects.Shader#blendMode * @type {integer} * @private @@ -119,7 +119,7 @@ var Shader = new Class({ /** * The underlying shader object being used. * Empty by default and set during a call to the `setShader` method. - * + * * @name Phaser.GameObjects.Shader#shader * @type {Phaser.Display.BaseShader} * @since 3.17.0 @@ -131,7 +131,7 @@ var Shader = new Class({ /** * A reference to the current renderer. * Shaders only work with the WebGL Renderer. - * + * * @name Phaser.GameObjects.Shader#renderer * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} * @since 3.17.0 @@ -224,7 +224,7 @@ var Shader = new Class({ /** * The view matrix the shader uses during rendering. - * + * * @name Phaser.GameObjects.Shader#viewMatrix * @type {Float32Array} * @readonly @@ -234,7 +234,7 @@ var Shader = new Class({ /** * The projection matrix the shader uses during rendering. - * + * * @name Phaser.GameObjects.Shader#projectionMatrix * @type {Float32Array} * @readonly @@ -245,16 +245,16 @@ var Shader = new Class({ /** * The default uniform mappings. These can be added to (or replaced) by specifying your own uniforms when * creating this shader game object. The uniforms are updated automatically during the render step. - * + * * The defaults are: - * + * * `resolution` (2f) - Set to the size of this shader. * `time` (1f) - The elapsed game time, in seconds. * `mouse` (2f) - If a pointer has been bound (with `setPointer`), this uniform contains its position each frame. * `date` (4fv) - A vec4 containing the year, month, day and time in seconds. * `sampleRate` (1f) - Sound sample rate. 44100 by default. * `iChannel0...3` (sampler2D) - Input channels 0 to 3. `null` by default. - * + * * @name Phaser.GameObjects.Shader#uniforms * @type {any} * @since 3.17.0 @@ -264,7 +264,7 @@ var Shader = new Class({ /** * The pointer bound to this shader, if any. * Set via the chainable `setPointer` method, or by modifying this property directly. - * + * * @name Phaser.GameObjects.Shader#pointer * @type {Phaser.Input.Pointer} * @since 3.17.0 @@ -273,7 +273,7 @@ var Shader = new Class({ /** * The cached width of the renderer. - * + * * @name Phaser.GameObjects.Shader#_rendererWidth * @type {number} * @private @@ -283,7 +283,7 @@ var Shader = new Class({ /** * The cached height of the renderer. - * + * * @name Phaser.GameObjects.Shader#_rendererHeight * @type {number} * @private @@ -293,7 +293,7 @@ var Shader = new Class({ /** * Internal texture count tracker. - * + * * @name Phaser.GameObjects.Shader#_textureCount * @type {number} * @private @@ -323,9 +323,9 @@ var Shader = new Class({ /** * A flag that indicates if this Shader has been set to render to a texture instead of the display list. - * + * * This property is `true` if you have called `Shader.setRenderToTexture`, otherwise it's `false`. - * + * * A Shader that is rendering to a texture _does not_ appear on the display list. * * @name Phaser.GameObjects.Shader#renderToTexture @@ -337,7 +337,7 @@ var Shader = new Class({ /** * A reference to the Phaser.Textures.Texture that has been stored in the Texture Manager for this Shader. - * + * * This property is only set if you have called `Shader.setRenderToTexture`, otherwise it is `null`. * * @name Phaser.GameObjects.Shader#texture @@ -380,28 +380,28 @@ var Shader = new Class({ * WebGL Framebuffer and WebGL Texture instead. This allows you to use the output * of this shader as an input for another shader, by mapping a sampler2D uniform * to it. - * + * * After calling this method the `Shader.framebuffer` and `Shader.glTexture` properties * are populated. - * + * * Additionally, you can provide a key to this method. Doing so will create a Phaser Texture * from this Shader and save it into the Texture Manager, allowing you to then use it for * any texture-based Game Object, such as a Sprite or Image: - * + * * ```javascript * var shader = this.add.shader('myShader', x, y, width, height); - * + * * shader.setRenderToTexture('doodle'); - * + * * this.add.image(400, 300, 'doodle'); * ``` - * + * * Note that it stores an active reference to this Shader. That means as this shader updates, * so does the texture and any object using it to render with. Also, if you destroy this * shader, be sure to clear any objects that may have been using it as a texture too. - * + * * You can access the Phaser Texture that is created via the `Shader.texture` property. - * + * * By default it will create a single base texture. You can add frames to the texture * by using the `Texture.add` method. After doing this, you can then allow Game Objects * to use a specific frame from a Render Texture. @@ -447,16 +447,14 @@ var Shader = new Class({ if (this.shader) { - var pipeline = renderer.currentPipeline; + renderer.pipelines.clear(); - renderer.clearPipeline(); - this.load(); this.flush(); - - renderer.rebindPipeline(pipeline); + + renderer.pipelines.rebind(); } - + return this; }, @@ -467,11 +465,11 @@ var Shader = new Class({ * * @method Phaser.GameObjects.Shader#setShader * @since 3.17.0 - * + * * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance. * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setShader: function (key, textures, textureData) @@ -487,7 +485,7 @@ var Shader = new Class({ console.warn('Shader missing: ' + key); return this; } - + this.shader = cache.get(key); } else @@ -526,7 +524,7 @@ var Shader = new Class({ iChannel2: { type: 'sampler2D', value: null, textureData: { repeat: true } }, iChannel3: { type: 'sampler2D', value: null, textureData: { repeat: true } } }; - + if (this.shader.uniforms) { this.uniforms = Extend(true, {}, this.shader.uniforms, defaultUniforms); @@ -553,15 +551,15 @@ var Shader = new Class({ /** * Binds a Phaser Pointer object to this Shader. - * + * * The screen position of the pointer will be set in to the shaders `mouse` uniform * automatically every frame. Call this method with no arguments to unbind the pointer. * * @method Phaser.GameObjects.Shader#setPointer * @since 3.17.0 - * + * * @param {Phaser.Input.Pointer} [pointer] - The Pointer to bind to this shader. - * + * * @return {this} This Shader instance. */ setPointer: function (pointer) @@ -575,7 +573,7 @@ var Shader = new Class({ * Sets this shader to use an orthographic projection matrix. * This matrix is stored locally in the `projectionMatrix` property, * as well as being bound to the `uProjectionMatrix` uniform. - * + * * @method Phaser.GameObjects.Shader#projOrtho * @since 3.17.0 * @@ -615,7 +613,7 @@ var Shader = new Class({ /** * Initializes all of the uniforms this shader uses. - * + * * @method Phaser.GameObjects.Shader#initUniforms * @private * @since 3.17.0 @@ -648,33 +646,33 @@ var Shader = new Class({ /** * Sets a sampler2D uniform on this shader where the source texture is a WebGLTexture. - * + * * This allows you to feed the output from one Shader into another: - * + * * ```javascript * let shader1 = this.add.shader(baseShader1, 0, 0, 512, 512).setRenderToTexture(); * let shader2 = this.add.shader(baseShader2, 0, 0, 512, 512).setRenderToTexture('output'); - * + * * shader1.setSampler2DBuffer('iChannel0', shader2.glTexture, 512, 512); * shader2.setSampler2DBuffer('iChannel0', shader1.glTexture, 512, 512); * ``` - * + * * In the above code, the result of baseShader1 is fed into Shader2 as the `iChannel0` sampler2D uniform. * The result of baseShader2 is then fed back into shader1 again, creating a feedback loop. - * + * * If you wish to use an image from the Texture Manager as a sampler2D input for this shader, * see the `Shader.setSampler2D` method. - * + * * @method Phaser.GameObjects.Shader#setSampler2DBuffer * @since 3.19.0 - * + * * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`. * @param {WebGLTexture} texture - A WebGLTexture reference. * @param {integer} width - The width of the texture. * @param {integer} height - The height of the texture. * @param {integer} [textureIndex=0] - The texture index. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setSampler2DBuffer: function (uniformKey, texture, width, height, textureIndex, textureData) @@ -700,20 +698,20 @@ var Shader = new Class({ /** * Sets a sampler2D uniform on this shader. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * If you wish to use another Shader as a sampler2D input for this shader, see the `Shader.setSampler2DBuffer` method. - * + * * @method Phaser.GameObjects.Shader#setSampler2D * @since 3.17.0 - * + * * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`. * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {integer} [textureIndex=0] - The texture index. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setSampler2D: function (uniformKey, textureKey, textureIndex, textureData) @@ -758,27 +756,27 @@ var Shader = new Class({ /** * Sets a property of a uniform already present on this shader. - * + * * To modify the value of a uniform such as a 1f or 1i use the `value` property directly: - * + * * ```javascript * shader.setUniform('size.value', 16); * ``` - * + * * You can use dot notation to access deeper values, for example: - * + * * ```javascript * shader.setUniform('resolution.value.x', 512); * ``` - * + * * The change to the uniform will take effect the next time the shader is rendered. - * + * * @method Phaser.GameObjects.Shader#setUniform * @since 3.17.0 - * + * * @param {string} key - The key of the uniform to modify. Use dots for deep properties, i.e. `resolution.value.x`. * @param {any} value - The value to set into the uniform. - * + * * @return {this} This Shader instance. */ setUniform: function (key, value) @@ -790,12 +788,12 @@ var Shader = new Class({ /** * Returns the uniform object for the given key, or `null` if the uniform couldn't be found. - * + * * @method Phaser.GameObjects.Shader#getUniform * @since 3.17.0 - * + * * @param {string} key - The key of the uniform to return the value for. - * + * * @return {any} A reference to the uniform object. This is not a copy, so modifying it will update the original object also. */ getUniform: function (key) @@ -805,16 +803,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel0` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel0 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel0: function (textureKey, textureData) @@ -824,16 +822,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel1` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel1 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel1: function (textureKey, textureData) @@ -843,16 +841,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel2` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel2 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel2: function (textureKey, textureData) @@ -862,16 +860,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel3` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel3 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel3: function (textureKey, textureData) @@ -882,11 +880,11 @@ var Shader = new Class({ /** * Internal method that takes a sampler2D uniform and prepares it for use by setting the * gl texture parameters. - * + * * @method Phaser.GameObjects.Shader#initSampler2D * @private * @since 3.17.0 - * + * * @param {any} uniform - The sampler2D uniform to process. */ initSampler2D: function (uniform) @@ -900,7 +898,7 @@ var Shader = new Class({ gl.activeTexture(gl.TEXTURE0 + this._textureCount); gl.bindTexture(gl.TEXTURE_2D, uniform.value); - + // Extended texture data var data = uniform.textureData; @@ -908,11 +906,11 @@ var Shader = new Class({ if (data) { // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D - + // mag / minFilter can be: gl.LINEAR, gl.LINEAR_MIPMAP_LINEAR or gl.NEAREST // wrapS/T can be: gl.CLAMP_TO_EDGE or gl.REPEAT // format can be: gl.LUMINANCE or gl.RGBA - + var magFilter = gl[GetFastValue(data, 'magFilter', 'linear').toUpperCase()]; var minFilter = gl[GetFastValue(data, 'minFilter', 'linear').toUpperCase()]; var wrapS = gl[GetFastValue(data, 'wrapS', 'repeat').toUpperCase()]; @@ -932,7 +930,7 @@ var Shader = new Class({ var width = GetFastValue(data, 'width', 512); var height = GetFastValue(data, 'height', 2); var border = GetFastValue(data, 'border', 0); - + // texImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, ArrayBufferView? pixels) gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, border, format, gl.UNSIGNED_BYTE, null); } @@ -941,7 +939,7 @@ var Shader = new Class({ // texImage2D(GLenum target, GLint level, GLenum internalformat, GLenum format, GLenum type, ImageData? pixels) gl.texImage2D(gl.TEXTURE_2D, 0, format, gl.RGBA, gl.UNSIGNED_BYTE, uniform.source); } - + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrapS); @@ -949,16 +947,16 @@ var Shader = new Class({ } this.renderer.setProgram(this.program); - + gl.uniform1i(uniform.uniformLocation, this._textureCount); - + this._textureCount++; }, /** * Synchronizes all of the uniforms this shader uses. * Each uniforms gl function is called in turn. - * + * * @method Phaser.GameObjects.Shader#syncUniforms * @private * @since 3.17.0 @@ -974,7 +972,7 @@ var Shader = new Class({ var location; var value; var textureCount = 0; - + for (var key in uniforms) { uniform = uniforms[key]; @@ -1027,14 +1025,14 @@ var Shader = new Class({ /** * Called automatically during render. - * + * * This method performs matrix ITRS and then stores the resulting value in the `uViewMatrix` uniform. * It then sets up the vertex buffer and shader, updates and syncs the uniforms ready * for flush to be called. - * + * * @method Phaser.GameObjects.Shader#load * @since 3.17.0 - * + * * @param {Phaser.GameObjects.Components.TransformMatrix} [matrix2D] - The transform matrix to use during rendering. */ load: function (matrix2D) @@ -1052,7 +1050,7 @@ var Shader = new Class({ { var x = -this._displayOriginX; var y = -this._displayOriginY; - + vm[0] = matrix2D[0]; vm[1] = matrix2D[1]; vm[4] = matrix2D[2]; @@ -1088,7 +1086,7 @@ var Shader = new Class({ var px = pointer.x / width; var py = 1 - pointer.y / height; - + mouse.value.x = px.toFixed(2); mouse.value.y = py.toFixed(2); } @@ -1098,9 +1096,9 @@ var Shader = new Class({ /** * Called automatically during render. - * + * * Sets the active shader, loads the vertex buffer and then draws. - * + * * @method Phaser.GameObjects.Shader#flush * @since 3.17.0 */ @@ -1173,7 +1171,7 @@ var Shader = new Class({ setAlpha: function () { }, - + /** * A NOOP method so you can pass a Shader to a Container. * Calling this method will do nothing. It is intentionally empty. diff --git a/src/gameobjects/shader/ShaderWebGLRenderer.js b/src/gameobjects/shader/ShaderWebGLRenderer.js index f1103b64e..441a1fed6 100644 --- a/src/gameobjects/shader/ShaderWebGLRenderer.js +++ b/src/gameobjects/shader/ShaderWebGLRenderer.js @@ -26,9 +26,7 @@ var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, came return; } - var pipeline = renderer.currentPipeline; - - renderer.clearPipeline(); + renderer.pipelines.clear(); if (src.renderToTexture) { @@ -40,16 +38,16 @@ var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, came var camMatrix = src._tempMatrix1; var shapeMatrix = src._tempMatrix2; var calcMatrix = src._tempMatrix3; - + shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - + camMatrix.copyFrom(camera.matrix); - + if (parentMatrix) { // Multiply the camera by the parent matrix camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - + // Undo the camera scroll shapeMatrix.e = src.x; shapeMatrix.f = src.y; @@ -59,20 +57,20 @@ var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, came shapeMatrix.e -= camera.scrollX * src.scrollFactorX; shapeMatrix.f -= camera.scrollY * src.scrollFactorY; } - + camMatrix.multiply(shapeMatrix, calcMatrix); - + // Renderer size changed? if (renderer.width !== src._rendererWidth || renderer.height !== src._rendererHeight) { src.projOrtho(0, renderer.width, renderer.height, 0); } - + src.load(calcMatrix.matrix); src.flush(); } - renderer.rebindPipeline(pipeline); + renderer.pipelines.rebind(); }; module.exports = ShaderWebGLRenderer; diff --git a/src/gameobjects/shape/arc/ArcWebGLRenderer.js b/src/gameobjects/shape/arc/ArcWebGLRenderer.js index 48c61034f..104aad9d3 100644 --- a/src/gameobjects/shape/arc/ArcWebGLRenderer.js +++ b/src/gameobjects/shape/arc/ArcWebGLRenderer.js @@ -24,14 +24,12 @@ var StrokePathWebGL = require('../StrokePathWebGL'); */ var ArcWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); diff --git a/src/gameobjects/shape/curve/CurveWebGLRenderer.js b/src/gameobjects/shape/curve/CurveWebGLRenderer.js index 228b62f14..374183a41 100644 --- a/src/gameobjects/shape/curve/CurveWebGLRenderer.js +++ b/src/gameobjects/shape/curve/CurveWebGLRenderer.js @@ -24,14 +24,12 @@ var StrokePathWebGL = require('../StrokePathWebGL'); */ var CurveWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); diff --git a/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js b/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js index df8b51272..601758d1c 100644 --- a/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js +++ b/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js @@ -24,14 +24,12 @@ var StrokePathWebGL = require('../StrokePathWebGL'); */ var EllipseWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); diff --git a/src/gameobjects/shape/grid/GridWebGLRenderer.js b/src/gameobjects/shape/grid/GridWebGLRenderer.js index 180a97498..1b02ab90f 100644 --- a/src/gameobjects/shape/grid/GridWebGLRenderer.js +++ b/src/gameobjects/shape/grid/GridWebGLRenderer.js @@ -23,14 +23,12 @@ var Utils = require('../../../renderer/webgl/Utils'); */ var GridWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); diff --git a/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js b/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js index f9d0170ce..7e9c832ce 100644 --- a/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js +++ b/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js @@ -23,14 +23,12 @@ var Utils = require('../../../renderer/webgl/Utils'); */ var IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); diff --git a/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js b/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js index baab9a5f7..42e346ff3 100644 --- a/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js +++ b/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js @@ -23,14 +23,12 @@ var Utils = require('../../../renderer/webgl/Utils'); */ var IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); diff --git a/src/gameobjects/shape/line/LineWebGLRenderer.js b/src/gameobjects/shape/line/LineWebGLRenderer.js index a8b26536d..c6cb63b06 100644 --- a/src/gameobjects/shape/line/LineWebGLRenderer.js +++ b/src/gameobjects/shape/line/LineWebGLRenderer.js @@ -23,13 +23,11 @@ var Utils = require('../../../renderer/webgl/Utils'); */ var LineWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); diff --git a/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js b/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js index cd41ef81f..e4b674254 100644 --- a/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js +++ b/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js @@ -24,14 +24,12 @@ var StrokePathWebGL = require('../StrokePathWebGL'); */ var PolygonWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); diff --git a/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js b/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js index 1773dc3e7..ce9b5c032 100644 --- a/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js +++ b/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js @@ -24,14 +24,12 @@ var Utils = require('../../../renderer/webgl/Utils'); */ var RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -61,7 +59,7 @@ var RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, c { var fillTint = pipeline.fillTint; var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha); - + fillTint.TL = fillTintColor; fillTint.TR = fillTintColor; fillTint.BL = fillTintColor; diff --git a/src/gameobjects/shape/star/StarWebGLRenderer.js b/src/gameobjects/shape/star/StarWebGLRenderer.js index 054fd6cc5..3ee086f02 100644 --- a/src/gameobjects/shape/star/StarWebGLRenderer.js +++ b/src/gameobjects/shape/star/StarWebGLRenderer.js @@ -24,14 +24,12 @@ var StrokePathWebGL = require('../StrokePathWebGL'); */ var StarWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); diff --git a/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js b/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js index 9b6a1a1c6..e1293e650 100644 --- a/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js +++ b/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js @@ -24,14 +24,12 @@ var Utils = require('../../../renderer/webgl/Utils'); */ var TriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); diff --git a/src/gameobjects/text/static/TextWebGLRenderer.js b/src/gameobjects/text/static/TextWebGLRenderer.js index 1f0964821..c7a91b766 100644 --- a/src/gameobjects/text/static/TextWebGLRenderer.js +++ b/src/gameobjects/text/static/TextWebGLRenderer.js @@ -32,9 +32,7 @@ var TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera var width = frame.width; var height = frame.height; var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var textureUnit = pipeline.setTexture2D(frame.glTexture, src); diff --git a/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js b/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js index b3b46aab2..8d83006cc 100644 --- a/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js +++ b/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js @@ -27,15 +27,14 @@ var TileSpriteWebGLRenderer = function (renderer, src, interpolationPercentage, var width = src.width; var height = src.height; - var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = this.pipeline; - if (width === 0 || height === 0) { return; } - renderer.setPipeline(pipeline, src); + var getTint = Utils.getTintAppendFloatAlpha; + + var pipeline = renderer.pipelines.set(this.pipeline, src); var textureUnit = pipeline.setTexture2D(src.fillPattern, src); diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js index 16924978b..3ff323586 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js @@ -34,7 +34,7 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer } var gidMap = src.gidMap; - var pipeline = src.pipeline; + var pipeline = renderer.pipelines.set(src.pipeline); var getTint = Utils.getTintAppendFloatAlphaAndSwap; @@ -49,8 +49,6 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer var tilesets = src.tileset; - renderer.setPipeline(pipeline); - // Loop through each tileset in this layer, drawing just the tiles that are in that set each time // Doing it this way around allows us to batch tiles using the same tileset for (var c = 0; c < tilesets.length; c++) diff --git a/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js b/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js index 319c807ef..75e168db6 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js @@ -41,7 +41,7 @@ var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPerc Scale(src, src.scaleX, src.scaleY, 1); ViewLoad2D(src, camera.matrix.matrix); - renderer.setPipeline(pipeline); + renderer.pipelines.set(pipeline); // The above alters the uniforms, so make sure we call it _after_ setting the MVP stuff above renderer.setMatrix4(pipeline.program, 'uModelMatrix', false, src.modelMatrix); From e450bf2f1f89a67f077c35e68300b427177c68fb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 13:04:24 +0100 Subject: [PATCH 008/153] Swap to using constants for pipeline names --- src/display/mask/BitmapMask.js | 6 ++--- src/gameobjects/components/Pipeline.js | 22 +++++++++++-------- src/gameobjects/rope/Rope.js | 10 +++++---- src/physics/matter-js/MatterImage.js | 2 +- src/physics/matter-js/MatterSprite.js | 2 +- .../dynamiclayer/DynamicTilemapLayer.js | 2 +- .../staticlayer/StaticTilemapLayer.js | 2 +- 7 files changed, 26 insertions(+), 20 deletions(-) diff --git a/src/display/mask/BitmapMask.js b/src/display/mask/BitmapMask.js index 0e51cc8f3..641014181 100644 --- a/src/display/mask/BitmapMask.js +++ b/src/display/mask/BitmapMask.js @@ -205,7 +205,7 @@ var BitmapMask = new Class({ */ preRenderWebGL: function (renderer, maskedObject, camera) { - renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera); + renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera); }, /** @@ -220,7 +220,7 @@ var BitmapMask = new Class({ */ postRenderWebGL: function (renderer, camera) { - renderer.pipelines.BitmapMaskPipeline.endMask(this, camera); + renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera); }, /** @@ -253,7 +253,7 @@ var BitmapMask = new Class({ /** * Destroys this BitmapMask and nulls any references it holds. - * + * * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, * so be sure to call `clearMask` on any Game Object using it, before destroying it. * diff --git a/src/gameobjects/components/Pipeline.js b/src/gameobjects/components/Pipeline.js index dd66fa0cc..4590264e0 100644 --- a/src/gameobjects/components/Pipeline.js +++ b/src/gameobjects/components/Pipeline.js @@ -4,6 +4,8 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var PIPELINE_CONST = require('../../renderer/webgl/pipelines/const'); + /** * Provides methods used for setting the WebGL rendering pipeline of a Game Object. * @@ -45,19 +47,20 @@ var Pipeline = { * @webglOnly * @since 3.0.0 * - * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. + * @param {string} [name=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. * * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. */ - initPipeline: function (pipelineName) + initPipeline: function (name) { - if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } + if (name === undefined) { name = PIPELINE_CONST.MULTI_PIPELINE; } var renderer = this.scene.sys.game.renderer; + var pipelines = renderer.pipelines; - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + if (pipelines && pipelines.has(name)) { - this.defaultPipeline = renderer.getPipeline(pipelineName); + this.defaultPipeline = pipelines.get(name); this.pipeline = this.defaultPipeline; return true; @@ -73,17 +76,18 @@ var Pipeline = { * @webglOnly * @since 3.0.0 * - * @param {string} pipelineName - The name of the pipeline to set on this Game Object. + * @param {string} name - The name of the pipeline to set on this Game Object. * * @return {this} This Game Object instance. */ - setPipeline: function (pipelineName) + setPipeline: function (name) { var renderer = this.scene.sys.game.renderer; + var pipelines = renderer.pipelines; - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + if (pipelines && pipelines.has(name)) { - this.pipeline = renderer.getPipeline(pipelineName); + this.pipeline = pipelines.get(name); } return this; diff --git a/src/gameobjects/rope/Rope.js b/src/gameobjects/rope/Rope.js index 2eb2d483c..6cf0c6867 100644 --- a/src/gameobjects/rope/Rope.js +++ b/src/gameobjects/rope/Rope.js @@ -4,10 +4,12 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var AnimationState = require('../../animations/AnimationState'); var Class = require('../../utils/Class'); var Components = require('../components'); var GameObject = require('../GameObject'); var GameObjectEvents = require('../events'); +var PIPELINE_CONST = require('../../renderer/webgl/pipelines/const'); var RopeRender = require('./RopeRender'); var Vector2 = require('../../math/Vector2'); @@ -83,13 +85,13 @@ var Rope = new Class({ GameObject.call(this, scene, 'Rope'); /** - * The Animation Controller of this Rope. + * The Animation State of this Rope. * * @name Phaser.GameObjects.Rope#anims - * @type {Phaser.GameObjects.Components.Animation} + * @type {Phaser.Animation.AnimationState} * @since 3.23.0 */ - this.anims = new Components.Animation(this); + this.anims = new AnimationState(this); /** * An array containing the points data for this Rope. @@ -274,7 +276,7 @@ var Rope = new Class({ this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); - this.initPipeline('RopePipeline'); + this.initPipeline(PIPELINE_CONST.ROPE_PIPELINE); if (Array.isArray(points)) { diff --git a/src/physics/matter-js/MatterImage.js b/src/physics/matter-js/MatterImage.js index afba05aeb..818b1db73 100644 --- a/src/physics/matter-js/MatterImage.js +++ b/src/physics/matter-js/MatterImage.js @@ -132,7 +132,7 @@ var MatterImage = new Class({ this.setPosition(x, y); - this.initPipeline('MultiPipeline'); + this.initPipeline(); } }); diff --git a/src/physics/matter-js/MatterSprite.js b/src/physics/matter-js/MatterSprite.js index 6eafb5eaf..2462c49ba 100644 --- a/src/physics/matter-js/MatterSprite.js +++ b/src/physics/matter-js/MatterSprite.js @@ -138,7 +138,7 @@ var MatterSprite = new Class({ this.setPosition(x, y); - this.initPipeline('MultiPipeline'); + this.initPipeline(); } }); diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js index d7b2d8644..2a4227153 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js @@ -247,7 +247,7 @@ var DynamicTilemapLayer = new Class({ this.setOrigin(); this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height); - this.initPipeline('MultiPipeline'); + this.initPipeline(); }, /** diff --git a/src/tilemaps/staticlayer/StaticTilemapLayer.js b/src/tilemaps/staticlayer/StaticTilemapLayer.js index cb16d55e8..c9654a4f4 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayer.js @@ -360,7 +360,7 @@ var StaticTilemapLayer = new Class({ this.updateVBOData(); - this.initPipeline('MultiPipeline'); + this.initPipeline(); this.mvpInit(); From 2d3edc9512e6a8b209df61844f53e55950e4e2fd Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 13:04:37 +0100 Subject: [PATCH 009/153] Use the new Pipeline Manager methods --- src/cameras/2d/Camera.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cameras/2d/Camera.js b/src/cameras/2d/Camera.js index cdfb72c3a..931f1e9ce 100644 --- a/src/cameras/2d/Camera.js +++ b/src/cameras/2d/Camera.js @@ -221,12 +221,12 @@ var Camera = new Class({ /** * If this Camera is rendering to a texture (via `setRenderToTexture`) then you * have the option to control if it should also render to the Game canvas as well. - * + * * By default, a Camera will render both to its texture and to the Game canvas. - * + * * However, if you set ths property to `false` it will only render to the texture * and skip rendering to the Game canvas. - * + * * Setting this property if the Camera isn't rendering to a texture has no effect. * * @name Phaser.Cameras.Scene2D.Camera#renderToGame @@ -301,7 +301,7 @@ var Camera = new Class({ * This is only set if Phaser is running with the WebGL Renderer. * * @name Phaser.Cameras.Scene2D.Camera#pipeline - * @type {any} + * @type {?Phaser.Renderer.WebGL.WebGLPipeline} * @since 3.13.0 */ this.pipeline = null; @@ -332,7 +332,7 @@ var Camera = new Class({ * * You should not enable this unless you plan on actually using the texture it creates * somehow, otherwise you're just doubling the work required to render your game. - * + * * If you only require the Camera to render to a texture, and not also to the Game, * them set the `renderToGame` parameter to `false`. * @@ -397,9 +397,9 @@ var Camera = new Class({ { var renderer = this.scene.sys.game.renderer; - if (renderer.gl && renderer.hasPipeline(pipeline)) + if (renderer.gl && renderer.pipelines.has(pipeline)) { - this.pipeline = renderer.getPipeline(pipeline); + this.pipeline = renderer.pipelines.get(pipeline); } } else From 52c23124556f319a9f0b15151a4490babec1bfb1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 13:04:45 +0100 Subject: [PATCH 010/153] Update PipelineManager.js --- src/renderer/webgl/PipelineManager.js | 131 +++++++++++++++++++++----- 1 file changed, 109 insertions(+), 22 deletions(-) diff --git a/src/renderer/webgl/PipelineManager.js b/src/renderer/webgl/PipelineManager.js index 06e57e290..a722b8e8a 100644 --- a/src/renderer/webgl/PipelineManager.js +++ b/src/renderer/webgl/PipelineManager.js @@ -24,16 +24,14 @@ var SinglePipeline = require('./pipelines/SinglePipeline'); * @constructor * @since 3.50.0 * - * @param {} config - The pipeline configuration object. + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the WebGL Renderer that owns this Pipeline Manager. */ var PipelineManager = new Class({ initialize: - function PipelineManager (game) + function PipelineManager (renderer) { - // var gameConfig = game.config; - /** * A reference to the Game instance. * @@ -41,7 +39,7 @@ var PipelineManager = new Class({ * @type {Phaser.Game} * @since 3.50.0 */ - this.game = game; + this.game = renderer.game; /** * A reference to the WebGL Renderer instance. @@ -50,7 +48,7 @@ var PipelineManager = new Class({ * @type {Phaser.Renderer.WebGL.WebGLRenderer} * @since 3.50.0 */ - this.renderer = game.renderer; + this.renderer = renderer; /** * The underlying WebGL context of the renderer. @@ -78,24 +76,50 @@ var PipelineManager = new Class({ /** * Current pipeline in use by the WebGLRenderer. * - * @name Phaser.Renderer.WebGL.PipelineManager#currentPipeline + * @name Phaser.Renderer.WebGL.PipelineManager#current * @type {Phaser.Renderer.WebGL.WebGLPipeline} * @default null * @since 3.50.0 */ - this.currentPipeline = null; + this.current = null; /** * The previous WebGLPipeline that was in use. * * This is set when `clearPipeline` is called and restored in `rebindPipeline` if none is given. * - * @name Phaser.Renderer.WebGL.PipelineManager#previousPipeline + * @name Phaser.Renderer.WebGL.PipelineManager#previous * @type {Phaser.Renderer.WebGL.WebGLPipeline} * @default null * @since 3.50.0 */ - this.previousPipeline = null; + this.previous = null; + + /** + * A constant-style reference to the Multi Pipeline Instance. + * + * This is the default Phaser 3 pipeline and is used by the WebGL Renderer to manage + * camera effects and more. This property is set during the `boot` method. + * + * @name Phaser.Renderer.WebGL.PipelineManager#MULTI_PIPELINE + * @type {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} + * @default null + * @since 3.50.0 + */ + this.MULTI_PIPELINE = null; + + /** + * A constant-style reference to the Bitmap Mask Pipeline Instance. + * + * This is the default Phaser 3 mask pipeline and is used Game Objects using + * a Bitmap Mask. This property is set during the `boot` method. + * + * @name Phaser.Renderer.WebGL.PipelineManager#BITMAPMASK_PIPELINE + * @type {Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline} + * @default null + * @since 3.50.0 + */ + this.BITMAPMASK_PIPELINE = null; }, /** @@ -113,14 +137,14 @@ var PipelineManager = new Class({ { var game = this.game; - var multi = this.add(CONST.MULTI_PIPELINE, new MultiPipeline({ game: game })); + this.MULTI_PIPELINE = this.add(CONST.MULTI_PIPELINE, new MultiPipeline({ game: game })); + this.BITMAPMASK_PIPELINE = this.add(CONST.BITMAPMASK_PIPELINE, new BitmapMaskPipeline({ game: game })); this.add(CONST.SINGLE_PIPELINE, new SinglePipeline({ game: game })); this.add(CONST.ROPE_PIPELINE, new RopePipeline({ game: game })); - this.add(CONST.BITMAPMASK_PIPELINE, new BitmapMaskPipeline({ game: game })); this.add(CONST.LIGHT_PIPELINE, new LightPipeline({ game: game })); - this.set(multi); + this.set(this.MULTI_PIPELINE); }, /** @@ -190,6 +214,63 @@ var PipelineManager = new Class({ }); }, + /** + * Calls the `onPreRender` method on each pipeline in this manager. + * + * This is called automatically by the `WebGLRenderer.preRender` method. + * + * @method Phaser.Renderer.WebGL.PipelineManager#preRender + * @since 3.50.0 + */ + preRender: function () + { + var pipelines = this.pipelines; + + pipelines.each(function (pipelineName, pipelineInstance) + { + pipelineInstance.onPreRender(); + }); + }, + + /** + * Calls the `onRender` method on each pipeline in this manager. + * + * This is called automatically by the `WebGLRenderer.render` method. + * + * @method Phaser.Renderer.WebGL.PipelineManager#render + * @since 3.50.0 + * + * @param {Phaser.Scene} scene - The Scene to render. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera to render with. + */ + render: function (scene, camera) + { + var pipelines = this.pipelines; + + pipelines.each(function (pipelineName, pipelineInstance) + { + pipelineInstance.onRender(scene, camera); + }); + }, + + /** + * Calls the `onPostRender` method on each pipeline in this manager. + * + * This is called automatically by the `WebGLRenderer.postRender` method. + * + * @method Phaser.Renderer.WebGL.PipelineManager#postRender + * @since 3.50.0 + */ + postRender: function () + { + var pipelines = this.pipelines; + + pipelines.each(function (pipelineName, pipelineInstance) + { + pipelineInstance.onPostRender(); + }); + }, + /** * Flushes the current pipeline, if one is bound. * @@ -273,7 +354,7 @@ var PipelineManager = new Class({ set: function (pipeline, gameObject) { var renderer = this.renderer; - var current = this.currentPipeline; + var current = this.current; if ( current !== pipeline || @@ -283,7 +364,7 @@ var PipelineManager = new Class({ { renderer.resetTextures(); - this.currentPipeline = pipeline; + this.current = pipeline; pipeline.bind(); } @@ -293,6 +374,11 @@ var PipelineManager = new Class({ return pipeline; }, + setMulti: function () + { + return this.set(this.MULTI_PIPELINE); + }, + /** * Use this to reset the gl context to the state that Phaser requires to continue rendering. * @@ -315,9 +401,9 @@ var PipelineManager = new Class({ */ rebind: function (pipeline) { - if (pipeline === undefined && this.previousPipeline) + if (pipeline === undefined && this.previous) { - pipeline = this.previousPipeline; + pipeline = this.previous; } if (!pipeline) @@ -352,7 +438,7 @@ var PipelineManager = new Class({ renderer.resetTextures(); - this.currentPipeline = pipeline; + this.current = pipeline; pipeline.bind(true); pipeline.onBind(); @@ -370,15 +456,14 @@ var PipelineManager = new Class({ * @method Phaser.Renderer.WebGL.PipelineManager#clear * @since 3.50.0 */ - clearPipeline: function () + clear: function () { var renderer = this.renderer; this.flush(); - this.previousPipeline = this.currentPipeline; - - this.currentPipeline = null; + this.previous = this.current; + this.current = null; renderer.currentProgram = null; renderer.currentVertexBuffer = null; @@ -403,6 +488,8 @@ var PipelineManager = new Class({ this.renderer = null; this.game = null; this.pipelines = null; + this.current = null; + this.previous = null; } }); From 7e840b2670e47cb5be5844c4a37c6812e80b73ea Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 13:05:07 +0100 Subject: [PATCH 011/153] Removed all of the pipeline methods and added the Pipeline Manager instance --- src/renderer/webgl/WebGLRenderer.js | 330 ++++------------------------ 1 file changed, 37 insertions(+), 293 deletions(-) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index cd6ab90ab..93a83cccd 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -12,6 +12,8 @@ var CONST = require('../../const'); var GameEvents = require('../../core/events'); var IsSizePowerOfTwo = require('../../math/pow2/IsSizePowerOfTwo'); var NOOP = require('../../utils/NOOP'); +var PIPELINE_CONST = require('./pipelines/const'); +var PipelineManager = require('./PipelineManager'); var ProjectOrtho = require('./mvp/ProjectOrtho'); var ScaleEvents = require('../../scale/events'); var SpliceOne = require('../../utils/array/SpliceOne'); @@ -20,13 +22,6 @@ var TransformMatrix = require('../../gameobjects/components/TransformMatrix'); var Utils = require('./Utils'); var WebGLSnapshot = require('../snapshot/WebGLSnapshot'); -// Default Pipelines -var BitmapMaskPipeline = require('./pipelines/BitmapMaskPipeline'); -var LightPipeline = require('./pipelines/LightPipeline'); -var MultiPipeline = require('./pipelines/MultiPipeline'); -var RopePipeline = require('./pipelines/RopePipeline'); -var SinglePipeline = require('./pipelines/SinglePipeline'); - /** * @callback WebGLContextCallback * @@ -108,6 +103,23 @@ var WebGLRenderer = new Class({ */ this.type = CONST.WEBGL; + /** + * An instance of the Pipeline Manager class, that handles all WebGL Pipelines. + * + * Use this to manage all of your interactions with pipelines, such as adding, getting, + * setting and rendering them. + * + * The Pipeline Manager class is created in the `init` method and then populated + * with pipelines during the `boot` method. + * + * Prior to Phaser v3.50.0 this was just a plain JavaScript object, not a class. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines + * @type {Phaser.Renderer.WebGL.PipelineManager} + * @since 3.50.0 + */ + this.pipelines = null; + /** * The width of the canvas being rendered to. * This is populated in the onResize event handler. @@ -169,16 +181,6 @@ var WebGLRenderer = new Class({ */ this.contextLost = false; - /** - * This object will store all pipelines created through addPipeline - * - * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines - * @type {object} - * @default null - * @since 3.0.0 - */ - this.pipelines = null; - /** * Details about the currently scheduled snapshot. * @@ -283,27 +285,6 @@ var WebGLRenderer = new Class({ */ this.currentFramebuffer = null; - /** - * Current WebGLPipeline in use. - * - * @name Phaser.Renderer.WebGL.WebGLRenderer#currentPipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @since 3.0.0 - */ - this.currentPipeline = null; - - /** - * The previous WebGLPipeline in use. - * This is set when `clearPipeline` is called and restored in `rebindPipeline` if none is given. - * - * @name Phaser.Renderer.WebGL.WebGLRenderer#previousPipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @since 3.50.0 - */ - this.previousPipeline = null; - /** * Current WebGLProgram in use. * @@ -822,8 +803,7 @@ var WebGLRenderer = new Class({ this.startActiveTexture++; gl.activeTexture(gl.TEXTURE1); - // Clear previous pipelines and reload default ones - this.pipelines = {}; + this.pipelines = new PipelineManager(this); this.setBlendMode(CONST.BlendModes.NORMAL); @@ -843,12 +823,9 @@ var WebGLRenderer = new Class({ { var game = this.game; - var multi = this.addPipeline('MultiPipeline', new MultiPipeline({ game: game })); + this.pipelines.boot(); - this.addPipeline('SinglePipeline', new SinglePipeline({ game: game })); - this.addPipeline('RopePipeline', new RopePipeline({ game: game })); - this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game })); - this.addPipeline('Light2D', new LightPipeline({ game: game })); + var multi = this.pipelines.get(PIPELINE_CONST.MULTI_PIPELINE); var blank = game.textures.getFrame('__DEFAULT'); @@ -862,8 +839,6 @@ var WebGLRenderer = new Class({ gl.enable(gl.SCISSOR_TEST); - this.setPipeline(multi); - game.scale.on(ScaleEvents.RESIZE, this.onResize, this); var baseSize = game.scale.baseSize; @@ -906,7 +881,6 @@ var WebGLRenderer = new Class({ resize: function (width, height, resolution) { var gl = this.gl; - var pipelines = this.pipelines; this.width = width; this.height = height; @@ -914,11 +888,7 @@ var WebGLRenderer = new Class({ gl.viewport(0, 0, width, height); - // Update all registered pipelines - for (var pipelineName in pipelines) - { - pipelines[pipelineName].resize(width, height, resolution); - } + this.pipelines.resize(width, height, resolution); this.drawingBufferHeight = gl.drawingBufferHeight; @@ -974,91 +944,7 @@ var WebGLRenderer = new Class({ */ flush: function () { - if (this.currentPipeline) - { - this.currentPipeline.flush(); - } - }, - - /** - * Checks if a pipeline is present in the current WebGLRenderer - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#hasPipeline - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline. - * - * @return {boolean} `true` if the given pipeline is loaded, otherwise `false`. - */ - hasPipeline: function (pipelineName) - { - return (pipelineName in this.pipelines); - }, - - /** - * Returns the pipeline by name if the pipeline exists - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#getPipeline - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline. - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance, or `null` if not found. - */ - getPipeline: function (pipelineName) - { - return (this.hasPipeline(pipelineName)) ? this.pipelines[pipelineName] : null; - }, - - /** - * Removes a pipeline by name. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#removePipeline - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline to be removed. - * - * @return {this} This WebGLRenderer instance. - */ - removePipeline: function (pipelineName) - { - delete this.pipelines[pipelineName]; - - return this; - }, - - /** - * Adds a pipeline instance into the collection of pipelines - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#addPipeline - * @since 3.0.0 - * - * @param {string} pipelineName - A unique string-based key for the pipeline. - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - A pipeline instance which must extend WebGLPipeline. - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance that was passed. - */ - addPipeline: function (pipelineName, pipelineInstance) - { - if (!this.hasPipeline(pipelineName)) - { - this.pipelines[pipelineName] = pipelineInstance; - } - else - { - console.warn('Pipeline exists: ' + pipelineName); - } - - pipelineInstance.name = pipelineName; - - if (!pipelineInstance.hasBooted) - { - pipelineInstance.boot(); - } - - this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution); - - return pipelineInstance; + this.pipelines.flush(); }, /** @@ -1157,33 +1043,6 @@ var WebGLRenderer = new Class({ this.currentScissor = scissor; }, - /** - * Binds a WebGLPipeline and sets it as the current pipeline to be used. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#setPipeline - * @since 3.0.0 - * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated. - * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any. - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline that was activated. - */ - setPipeline: function (pipelineInstance, gameObject) - { - var current = this.currentPipeline; - - if (current !== pipelineInstance || current.vertexBuffer !== this.currentVertexBuffer || current.program !== this.currentProgram) - { - this.resetTextures(); - this.currentPipeline = pipelineInstance; - this.currentPipeline.bind(); - } - - this.currentPipeline.onBind(gameObject); - - return this.currentPipeline; - }, - /** * Is there an active stencil mask? * @@ -1200,91 +1059,6 @@ var WebGLRenderer = new Class({ return ((mask && mask.isStencil) || (camMask && camMask.isStencil)); }, - /** - * Use this to reset the gl context to the state that Phaser requires to continue rendering. - * Calling this will: - * - * * Disable `DEPTH_TEST`, `CULL_FACE` and `STENCIL_TEST`. - * * Clear the depth buffer and stencil buffers. - * * Reset the viewport size. - * * Reset the blend mode. - * * Bind a blank texture as the active texture on texture unit zero. - * * Rebinds the given pipeline instance. - * - * You should call this having previously called `clearPipeline` and then wishing to return - * control to Phaser again. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#rebindPipeline - * @since 3.16.0 - * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} [pipelineInstance] - The pipeline instance to be activated. - */ - rebindPipeline: function (pipelineInstance) - { - if (pipelineInstance === undefined && this.previousPipeline) - { - pipelineInstance = this.previousPipeline; - } - - if (!pipelineInstance) - { - return; - } - - var gl = this.gl; - - gl.disable(gl.DEPTH_TEST); - gl.disable(gl.CULL_FACE); - - if (this.hasActiveStencilMask()) - { - gl.clear(gl.DEPTH_BUFFER_BIT); - } - else - { - // If there wasn't a stencil mask set before this call, we can disable it safely - gl.disable(gl.STENCIL_TEST); - gl.clear(gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); - } - - gl.viewport(0, 0, this.width, this.height); - - this.currentProgram = null; - this.currentVertexBuffer = null; - this.currentIndexBuffer = null; - - this.setBlendMode(0, true); - - this.resetTextures(); - - this.currentPipeline = pipelineInstance; - this.currentPipeline.bind(true); - this.currentPipeline.onBind(); - }, - - /** - * Flushes the current WebGLPipeline being used and then clears it, along with the - * the current shader program and vertex buffer. Then resets the blend mode to NORMAL. - * Call this before jumping to your own gl context handler, and then call `rebindPipeline` when - * you wish to return control to Phaser again. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#clearPipeline - * @since 3.16.0 - */ - clearPipeline: function () - { - this.flush(); - - this.previousPipeline = this.currentPipeline; - - this.currentPipeline = null; - this.currentProgram = null; - this.currentVertexBuffer = null; - this.currentIndexBuffer = null; - - this.setBlendMode(0, true); - }, - /** * Sets the blend mode to the value given. * @@ -2140,14 +1914,6 @@ var WebGLRenderer = new Class({ this.resetTextures(); - /* - if (!this.game.pendingDestroy) - { - // texture we just deleted is in use, so bind a blank texture - this.setBlankTexture(true); - } - */ - return this; }, @@ -2218,10 +1984,10 @@ var WebGLRenderer = new Class({ var cw = camera._cw; var ch = camera._ch; - var MultiPipeline = this.pipelines.MultiPipeline; - var color = camera.backgroundColor; + var MultiPipeline = this.pipelines.MULTI_PIPELINE; + if (camera.renderToTexture) { this.flush(); @@ -2316,12 +2082,10 @@ var WebGLRenderer = new Class({ */ postRenderCamera: function (camera) { - this.setPipeline(this.pipelines.MultiPipeline); + var multiPipeline = this.pipelines.setMulti(); - var MultiPipeline = this.pipelines.MultiPipeline; - - camera.flashEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); - camera.fadeEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); + camera.flashEffect.postRenderWebGL(multiPipeline, Utils.getTintFromFloats); + camera.fadeEffect.postRenderWebGL(multiPipeline, Utils.getTintFromFloats); camera.dirty = false; @@ -2329,7 +2093,7 @@ var WebGLRenderer = new Class({ if (camera.renderToTexture) { - MultiPipeline.flush(); + multiPipeline.flush(); this.setFramebuffer(null); @@ -2337,11 +2101,11 @@ var WebGLRenderer = new Class({ if (camera.renderToGame) { - ProjectOrtho(MultiPipeline, 0, MultiPipeline.width, MultiPipeline.height, 0, -1000.0, 1000.0); + ProjectOrtho(multiPipeline, 0, multiPipeline.width, multiPipeline.height, 0, -1000.0, 1000.0); var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = (camera.pipeline) ? camera.pipeline : MultiPipeline; + var pipeline = (camera.pipeline) ? camera.pipeline : multiPipeline; pipeline.batchTexture( camera, @@ -2389,7 +2153,6 @@ var WebGLRenderer = new Class({ if (this.contextLost) { return; } var gl = this.gl; - var pipelines = this.pipelines; // Make sure we are bound to the main frame buffer gl.bindFramebuffer(gl.FRAMEBUFFER, null); @@ -2405,10 +2168,7 @@ var WebGLRenderer = new Class({ gl.enable(gl.SCISSOR_TEST); - for (var key in pipelines) - { - pipelines[key].onPreRender(); - } + this.pipelines.preRender(); // TODO - Find a way to stop needing to create these arrays every frame // and equally not need a huge array buffer created to hold them @@ -2427,7 +2187,7 @@ var WebGLRenderer = new Class({ this.textureFlush = 0; - this.setPipeline(this.pipelines.MultiPipeline); + this.pipelines.setMulti(); }, /** @@ -2454,12 +2214,8 @@ var WebGLRenderer = new Class({ var list = children.list; var childCount = list.length; - var pipelines = this.pipelines; - for (var key in pipelines) - { - pipelines[key].onRender(scene, camera); - } + this.pipelines.render(scene, camera); // Apply scissor for cam region + render background color, if not transparent this.preRenderCamera(camera); @@ -2563,12 +2319,7 @@ var WebGLRenderer = new Class({ state.callback = null; } - var pipelines = this.pipelines; - - for (var key in pipelines) - { - pipelines[key].onPostRender(); - } + this.pipelines.postRender(); if (this.textureFlush > 0) { @@ -2952,7 +2703,6 @@ var WebGLRenderer = new Class({ var gl = this.gl; var glFilter = [ gl.LINEAR, gl.NEAREST ][filter]; - // this.setTexture2D(texture, 0); gl.activeTexture(gl.TEXTURE0); var currentTexture = gl.getParameter(gl.TEXTURE_BINDING_2D); @@ -2962,7 +2712,6 @@ var WebGLRenderer = new Class({ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, glFilter); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, glFilter); - // this.setTexture2D(null, 0); if (currentTexture) { gl.bindTexture(gl.TEXTURE_2D, currentTexture); @@ -3412,12 +3161,7 @@ var WebGLRenderer = new Class({ this.textureIndexes = []; this.nativeTextures = []; - for (var key in this.pipelines) - { - this.pipelines[key].destroy(); - - delete this.pipelines[key]; - } + this.pipelines.destroy(); this.defaultCamera.destroy(); From 91b0a646d4183a142a9ad05c68feb9e1f6163fee Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 13:05:10 +0100 Subject: [PATCH 012/153] Update CHANGELOG.md --- CHANGELOG.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad44e8666..4d6d325dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,13 +31,48 @@ Other pipeline changes are as follows: * All pipelines will now extract the `attributes` property from the config, allowing you to set it externally. * All pipelines will now extract the `topology` property from the config, allowing you to set it externally. +### Pipeline Manager + +The `WebGL.PipelineManager` is a new class that is responsbile for managing all of the WebGL Pipelines in Phaser. An instance of the Pipeline Manager is created by the WebGL Renderer and is available under the `pipelines` property. This means that the WebGL Renderer no longer handles pipelines directly, causing the following API changes: + +* `WebGLRenderer.pipelines` is no longer a plain object containing pipeline instances. It's now an instance of the `PipelineManager` class. This instance is created during the init and boot phase of the renderer. +* The `WebGLRenderer.currentPipeline` property no longer exists, instead use `PipelineManager.current`. +* The `WebGLRenderer.previousPipeline` property no longer exists, instead use `PipelineManager.previous`. +* The `WebGLRenderer.hasPipeline` method no longer exists, instead use `PipelineManager.has`. +* The `WebGLRenderer.getPipeline` method no longer exists, instead use `PipelineManager.get`. +* The `WebGLRenderer.removePipeline` method no longer exists, instead use `PipelineManager.remove`. +* The `WebGLRenderer.addPipeline` method no longer exists, instead use `PipelineManager.add`. +* The `WebGLRenderer.setPipeline` method no longer exists, instead use `PipelineManager.set`. +* The `WebGLRenderer.rebindPipeline` method no longer exists, instead use `PipelineManager.rebind`. +* The `WebGLRenderer.clearPipeline` method no longer exists, instead use `PipelineManager.clear`. + +The Pipeline Manager also offers the following new features: + +* The `PipelineManager.resize` method automatically handles resize events across all pipelines. +* The `PipelineManager.preRender` method calls the pre-render method of all pipelines. +* The `PipelineManager.render` method calls the render method of all pipelines. +* The `PipelineManager.postRender` method calls the post-render method of all pipelines. +* The `PipelineManager.setMulti` method automatically binds the Multi Texture Pipeline, Phaser's default. +* The `PipelineManager.clear` method will clear the pipeline, store it in `previous` and free the renderer. +* The `PipelineManager.rebind` method will reset the rendering context and restore the `previous` pipeline, if set. + +New constants have been created to help you reference a pipeline without needing to use strings: + +* `Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE` for the Bitmap Mask Pipeline. +* `Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE` for the Light 2D Pipeline. +* `Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE` for the Single Pipeline. +* `Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE` for the Multi Pipeline. +* `Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE` for the Rope Pipeline. + +All Game Objects have been updated to use the new constants and Pipeline Manager. + #### Single Pipeline There is also a new pipeline called `SinglePipeline`, created to emulate the old `TextureTintPipeline`. This special pipeline uses just a single texture and makes things a lot easier if you wish to create a custom pipeline, but not have to recode your shaders to work with multiple textures. Instead, just extend `SinglePipeline`, where-as before you extended the `TextureTintPipeline` and you won't have to change any of your shader code. However, if you can, you should update it to make it perform faster, but that choice is left up to you. ### WebGL Multi-Texture Rendering -The Multi Pipeline (previously the Texture Tint Pipeline) has had its core flow rewritten to eliminate the need for constantly creating `batch` objects. Instead, it now supports the new multi-texture shader, vastly increasing rendering performance, especially on draw-call bound systems. +The Multi Pipeline (previously called the Texture Tint Pipeline) has had its core flow rewritten to eliminate the need for constantly creating `batch` objects. Instead, it now supports the new multi-texture shader, vastly increasing rendering performance, especially on draw-call bound systems. All of the internal functions, such as `batchQuad` and `batchSprite` have been updated to use the new method of texture setting. The method signatures all remain the same unless indicated below. From 6734932a32ac5411c9e6990254cb6d796ee432ae Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 13:09:25 +0100 Subject: [PATCH 013/153] Update PipelineManager.js --- src/renderer/webgl/PipelineManager.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/renderer/webgl/PipelineManager.js b/src/renderer/webgl/PipelineManager.js index a722b8e8a..a82039488 100644 --- a/src/renderer/webgl/PipelineManager.js +++ b/src/renderer/webgl/PipelineManager.js @@ -374,6 +374,16 @@ var PipelineManager = new Class({ return pipeline; }, + /** + * Sets the Multi Pipeline to be the currently bound pipeline. + * + * This is the default Phaser 3 rendering pipeline. + * + * @method Phaser.Renderer.WebGL.PipelineManager#setMulti + * @since 3.50.0 + * + * @return {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} The Multi Pipeline instance. + */ setMulti: function () { return this.set(this.MULTI_PIPELINE); From da4c387d86eb6c917d9cae14e1c91dcb661cad96 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 13:21:38 +0100 Subject: [PATCH 014/153] Reference fixes --- src/renderer/webgl/PipelineManager.js | 4 ++-- src/renderer/webgl/WebGLRenderer.js | 4 ++-- .../webgl/pipelines/BitmapMaskPipeline.js | 2 +- src/renderer/webgl/pipelines/MultiPipeline.js | 16 ++++++++-------- src/renderer/webgl/pipelines/index.js | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/renderer/webgl/PipelineManager.js b/src/renderer/webgl/PipelineManager.js index a82039488..63ad10290 100644 --- a/src/renderer/webgl/PipelineManager.js +++ b/src/renderer/webgl/PipelineManager.js @@ -279,9 +279,9 @@ var PipelineManager = new Class({ */ flush: function () { - if (this.currentPipeline) + if (this.current) { - this.currentPipeline.flush(); + this.current.flush(); } }, diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 93a83cccd..b19e09719 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -1198,7 +1198,7 @@ var WebGLRenderer = new Class({ */ setTextureSource: function (textureSource) { - if (this.currentPipeline.forceZero) + if (this.pipelines.current.forceZero) { this.setTextureZero(textureSource.glTexture, true); @@ -1428,7 +1428,7 @@ var WebGLRenderer = new Class({ */ setTexture2D: function (texture) { - if (this.currentPipeline.forceZero) + if (this.pipelines.current.forceZero) { this.setTextureZero(texture, true); diff --git a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js index ee1871fce..b35d7485b 100644 --- a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js +++ b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js @@ -189,7 +189,7 @@ var BitmapMaskPipeline = new Class({ } // Bind bitmap mask pipeline and draw - renderer.setPipeline(this); + renderer.pipelines.set(this); gl.activeTexture(gl.TEXTURE1); gl.bindTexture(gl.TEXTURE_2D, mask.maskTexture); diff --git a/src/renderer/webgl/pipelines/MultiPipeline.js b/src/renderer/webgl/pipelines/MultiPipeline.js index 4b509d460..048b09b57 100644 --- a/src/renderer/webgl/pipelines/MultiPipeline.js +++ b/src/renderer/webgl/pipelines/MultiPipeline.js @@ -416,7 +416,7 @@ var MultiPipeline = new Class({ batchSprite: function (sprite, camera, parentTransformMatrix) { // Will cause a flush if this isn't the current pipeline, vertexbuffer or program - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var camMatrix = this._tempMatrix1; var spriteMatrix = this._tempMatrix2; @@ -823,7 +823,7 @@ var MultiPipeline = new Class({ { var renderer = this.renderer; - renderer.setPipeline(this, gameObject); + renderer.pipelines.set(this, gameObject); var camMatrix = this._tempMatrix1; var spriteMatrix = this._tempMatrix2; @@ -975,7 +975,7 @@ var MultiPipeline = new Class({ parentTransformMatrix ) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var spriteMatrix = this._tempMatrix1.copyFrom(transformMatrix); var calcMatrix = this._tempMatrix2; @@ -1064,7 +1064,7 @@ var MultiPipeline = new Class({ */ batchFillRect: function (x, y, width, height, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; @@ -1119,7 +1119,7 @@ var MultiPipeline = new Class({ */ batchFillTriangle: function (x0, y0, x1, y1, x2, y2, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; @@ -1206,7 +1206,7 @@ var MultiPipeline = new Class({ */ batchFillPath: function (path, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; @@ -1289,7 +1289,7 @@ var MultiPipeline = new Class({ */ batchStrokePath: function (path, lineWidth, pathOpen, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); // Reset the closePath booleans this.prevQuad[4] = 0; @@ -1335,7 +1335,7 @@ var MultiPipeline = new Class({ */ batchLine: function (ax, ay, bx, by, aLineWidth, bLineWidth, lineWidth, index, closePath, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; diff --git a/src/renderer/webgl/pipelines/index.js b/src/renderer/webgl/pipelines/index.js index 8f5490d1c..6b6e1449d 100644 --- a/src/renderer/webgl/pipelines/index.js +++ b/src/renderer/webgl/pipelines/index.js @@ -5,7 +5,7 @@ */ var CONST = require('./const'); -var Extend = require('../utils/object/Extend'); +var Extend = require('../../../utils/object/Extend'); /** * @namespace Phaser.Renderer.WebGL.Pipelines From 296dafebf5478031b2d5a7fab04debf82798dcd5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 13:33:25 +0100 Subject: [PATCH 015/153] No need for gl ref --- src/renderer/webgl/PipelineManager.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/renderer/webgl/PipelineManager.js b/src/renderer/webgl/PipelineManager.js index 63ad10290..2af7acd7f 100644 --- a/src/renderer/webgl/PipelineManager.js +++ b/src/renderer/webgl/PipelineManager.js @@ -50,18 +50,6 @@ var PipelineManager = new Class({ */ this.renderer = renderer; - /** - * The underlying WebGL context of the renderer. - * - * This is set in the `boot` method. - * - * @name Phaser.Renderer.WebGL.PipelineManager#gl - * @type {WebGLRenderingContext} - * @default null - * @since 3.50.0 - */ - this.gl = null; - /** * This map stores all pipeline instances in this manager. * @@ -421,8 +409,8 @@ var PipelineManager = new Class({ return; } - var gl = this.gl; var renderer = this.renderer; + var gl = renderer.gl; gl.disable(gl.DEPTH_TEST); gl.disable(gl.CULL_FACE); @@ -494,7 +482,6 @@ var PipelineManager = new Class({ this.pipelines.clear(); - this.gl = null; this.renderer = null; this.game = null; this.pipelines = null; From 626a4e08f9af3b3ad9f136c99c09a0a7c2d8d5e2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 13:33:33 +0100 Subject: [PATCH 016/153] Update release version --- package.json | 2 +- src/const.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d77580d3d..1f7e969b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "phaser", - "version": "3.50.0-beta.4", + "version": "3.50.0-beta.5", "release": "Subaru", "description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.", "author": "Richard Davey (http://www.photonstorm.com)", diff --git a/src/const.js b/src/const.js index 094216fed..e17add146 100644 --- a/src/const.js +++ b/src/const.js @@ -20,7 +20,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.50.0-beta.4', + VERSION: '3.50.0-beta.5', BlendModes: require('./renderer/BlendModes'), From ea73a72b73a252c9e36bd5389457c70fcbfc73a0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 16:08:59 +0100 Subject: [PATCH 017/153] Restored animation complete key event. --- CHANGELOG.md | 2 +- src/animations/AnimationState.js | 13 ++++-- .../events/ANIMATION_COMPLETE_EVENT.js | 1 + .../events/ANIMATION_COMPLETE_KEY_EVENT.js | 44 +++++++++++++++++++ .../events/ANIMATION_REPEAT_EVENT.js | 1 + .../events/ANIMATION_RESTART_EVENT.js | 1 + .../events/ANIMATION_START_EVENT.js | 1 + src/animations/events/ANIMATION_STOP_EVENT.js | 1 + .../events/ANIMATION_UPDATE_EVENT.js | 1 + src/animations/events/index.js | 1 + 10 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 src/animations/events/ANIMATION_COMPLETE_KEY_EVENT.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d6d325dc..c47e4adda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -254,7 +254,7 @@ If you use Animations in your game, please read the following important API chan The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations just to change properties such as `duration`, and can now set them dynamically at run-time as well. * The `Animation` class no longer extends `EventEmitter`, as it no longer emits any events directly. This means you cannot now listen for events directly from an Animation instance. All of the events are now dispatched by the Game Objects instead. -* All of the `SPRITE_ANIMATION_KEY` events have been removed. Instead, please use the new events which all carry the `frameKey` parameter, which can be used to handle frame specific events. +* All of the `SPRITE_ANIMATION_KEY` events have been removed. Instead, please use the new events which all carry the `frameKey` parameter, which can be used to handle frame specific events. The only exception to this is `ANIMATION_COMPLETE_KEY`, which is a key specific version of the completion event. * `ANIMATION_UPDATE_EVENT` is a new event that is emitted from a Sprite when an animation updates, i.e. its frame changes. * `ANIMATION_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. Fix #4894 (thanks @scott20145) * The Game Object `Component.Animation` component has been renamed to `AnimationState` and has moved namespace. It's now in `Phaser.Animations` instead of `GameObjects.Components` to help differentiate it from the `Animation` class when browsing the documentation. diff --git a/src/animations/AnimationState.js b/src/animations/AnimationState.js index 779957533..eb924759f 100644 --- a/src/animations/AnimationState.js +++ b/src/animations/AnimationState.js @@ -1056,7 +1056,7 @@ var AnimationState = new Class({ this.parent.setVisible(false); } - this.emitEvents(Events.ANIMATION_COMPLETE); + this.emitEvents(Events.ANIMATION_COMPLETE, Events.ANIMATION_COMPLETE_KEY); }, /** @@ -1068,13 +1068,20 @@ var AnimationState = new Class({ * * @param {string} event - The Animation Event to dispatch. */ - emitEvents: function (event) + emitEvents: function (event, keyEvent) { var anim = this.currentAnim; var frame = this.currentFrame; var gameObject = this.parent; - gameObject.emit(event, anim, frame, gameObject, frame.textureFrame); + var frameKey = frame.textureFrame; + + gameObject.emit(event, anim, frame, gameObject, frameKey); + + if (keyEvent) + { + gameObject.emit(keyEvent + anim.key, anim, frame, gameObject, frameKey); + } }, /** diff --git a/src/animations/events/ANIMATION_COMPLETE_EVENT.js b/src/animations/events/ANIMATION_COMPLETE_EVENT.js index fe41a8109..68c60adb9 100644 --- a/src/animations/events/ANIMATION_COMPLETE_EVENT.js +++ b/src/animations/events/ANIMATION_COMPLETE_EVENT.js @@ -23,6 +23,7 @@ * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * diff --git a/src/animations/events/ANIMATION_COMPLETE_KEY_EVENT.js b/src/animations/events/ANIMATION_COMPLETE_KEY_EVENT.js new file mode 100644 index 000000000..404f9b735 --- /dev/null +++ b/src/animations/events/ANIMATION_COMPLETE_KEY_EVENT.js @@ -0,0 +1,44 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Complete Dynamic Key Event. + * + * This event is dispatched by a Sprite when an animation playing on it completes playback. + * This happens when the animation gets to the end of its sequence, factoring in any delays + * or repeats it may have to process. + * + * An animation that is set to loop, or repeat forever, will never fire this event, because + * it never actually completes. If you need to handle this, listen for the `ANIMATION_STOP` + * event instead, as this is emitted when the animation is stopped directly. + * + * The difference between this and the `ANIMATION_COMPLETE` event is that this one has a + * dynamic event name that contains the name of the animation within it. For example, + * if you had an animation called `explode` you could listen for the completion of that + * specific animation by using: `sprite.on('animationcomplete-explode', listener)`. Or, if you + * wish to use types: `sprite.on(Phaser.Animations.Events.ANIMATION_COMPLETE_KEY + 'explode', listener)`. + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_COMPLETE_KEY + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationcomplete-'; diff --git a/src/animations/events/ANIMATION_REPEAT_EVENT.js b/src/animations/events/ANIMATION_REPEAT_EVENT.js index 82184b69c..6a3032afd 100644 --- a/src/animations/events/ANIMATION_REPEAT_EVENT.js +++ b/src/animations/events/ANIMATION_REPEAT_EVENT.js @@ -20,6 +20,7 @@ * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * diff --git a/src/animations/events/ANIMATION_RESTART_EVENT.js b/src/animations/events/ANIMATION_RESTART_EVENT.js index 685414c36..17d3167e6 100644 --- a/src/animations/events/ANIMATION_RESTART_EVENT.js +++ b/src/animations/events/ANIMATION_RESTART_EVENT.js @@ -18,6 +18,7 @@ * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * diff --git a/src/animations/events/ANIMATION_START_EVENT.js b/src/animations/events/ANIMATION_START_EVENT.js index 1bbd36f42..f0b9419b1 100644 --- a/src/animations/events/ANIMATION_START_EVENT.js +++ b/src/animations/events/ANIMATION_START_EVENT.js @@ -19,6 +19,7 @@ * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * diff --git a/src/animations/events/ANIMATION_STOP_EVENT.js b/src/animations/events/ANIMATION_STOP_EVENT.js index 013f13860..cc11045b8 100644 --- a/src/animations/events/ANIMATION_STOP_EVENT.js +++ b/src/animations/events/ANIMATION_STOP_EVENT.js @@ -19,6 +19,7 @@ * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * diff --git a/src/animations/events/ANIMATION_UPDATE_EVENT.js b/src/animations/events/ANIMATION_UPDATE_EVENT.js index 9ce2a17b7..840df3307 100644 --- a/src/animations/events/ANIMATION_UPDATE_EVENT.js +++ b/src/animations/events/ANIMATION_UPDATE_EVENT.js @@ -23,6 +23,7 @@ * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * diff --git a/src/animations/events/index.js b/src/animations/events/index.js index 9211331ca..91a465812 100644 --- a/src/animations/events/index.js +++ b/src/animations/events/index.js @@ -12,6 +12,7 @@ module.exports = { ADD_ANIMATION: require('./ADD_ANIMATION_EVENT'), ANIMATION_COMPLETE: require('./ANIMATION_COMPLETE_EVENT'), + ANIMATION_COMPLETE_KEY: require('./ANIMATION_COMPLETE_KEY_EVENT'), ANIMATION_REPEAT: require('./ANIMATION_REPEAT_EVENT'), ANIMATION_RESTART: require('./ANIMATION_RESTART_EVENT'), ANIMATION_START: require('./ANIMATION_START_EVENT'), From 8b94cd71d67cf2ba0be14b45a88f6d3f4c701ab3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 17:07:40 +0100 Subject: [PATCH 018/153] Undo #5212 as it breaks all imports in webpack --- src/phaser-arcade-physics.js | 2 ++ src/phaser-core.js | 2 ++ src/phaser.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/phaser-arcade-physics.js b/src/phaser-arcade-physics.js index bd46e044d..1ef034604 100644 --- a/src/phaser-arcade-physics.js +++ b/src/phaser-arcade-physics.js @@ -69,6 +69,8 @@ if (typeof FEATURE_SOUND) module.exports = Phaser; +global.Phaser = Phaser; + /* * "Documentation is like pizza: when it is good, it is very, very good; * and when it is bad, it is better than nothing." diff --git a/src/phaser-core.js b/src/phaser-core.js index f63fa1d4d..45d9a006b 100644 --- a/src/phaser-core.js +++ b/src/phaser-core.js @@ -114,6 +114,8 @@ if (typeof FEATURE_SOUND) module.exports = Phaser; +global.Phaser = Phaser; + /* * "Documentation is like pizza: when it is good, it is very, very good; * and when it is bad, it is better than nothing." diff --git a/src/phaser.js b/src/phaser.js index 02d339990..aaa05326b 100644 --- a/src/phaser.js +++ b/src/phaser.js @@ -85,6 +85,8 @@ Phaser = Extend(false, Phaser, CONST); module.exports = Phaser; +global.Phaser = Phaser; + /* * "Documentation is like pizza: when it is good, it is very, very good; * and when it is bad, it is better than nothing." From efd15f9cde9f21cd71de22c2ef17eb883679b39a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 9 Sep 2020 17:07:53 +0100 Subject: [PATCH 019/153] 3.50.0 Beta 5 dist --- dist/phaser-arcade-physics.js | 12821 +++++++++++++------------- dist/phaser-arcade-physics.min.js | 2 +- dist/phaser.js | 13363 ++++++++++++++-------------- dist/phaser.min.js | 2 +- 4 files changed, 13461 insertions(+), 12727 deletions(-) diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index 33e6f35e3..f72aa89e8 100644 --- a/dist/phaser-arcade-physics.js +++ b/dist/phaser-arcade-physics.js @@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1451); +/******/ return __webpack_require__(__webpack_require__.s = 1455); /******/ }) /************************************************************************/ /******/ ([ @@ -432,7 +432,7 @@ module.exports = GetFastValue; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var FuzzyEqual = __webpack_require__(108); +var FuzzyEqual = __webpack_require__(109); /** * @classdesc @@ -1726,11 +1726,11 @@ module.exports = FileTypesManager; var Class = __webpack_require__(0); var Contains = __webpack_require__(50); -var GetPoint = __webpack_require__(159); -var GetPoints = __webpack_require__(282); +var GetPoint = __webpack_require__(161); +var GetPoints = __webpack_require__(283); var GEOM_CONST = __webpack_require__(49); var Line = __webpack_require__(40); -var Random = __webpack_require__(162); +var Random = __webpack_require__(164); /** * @classdesc @@ -2492,27 +2492,27 @@ module.exports = { module.exports = { - Alpha: __webpack_require__(559), - AlphaSingle: __webpack_require__(279), - BlendMode: __webpack_require__(280), - ComputedSize: __webpack_require__(560), - Crop: __webpack_require__(561), - Depth: __webpack_require__(281), - Flip: __webpack_require__(562), - GetBounds: __webpack_require__(563), - Mask: __webpack_require__(285), - Origin: __webpack_require__(580), - PathFollower: __webpack_require__(581), - Pipeline: __webpack_require__(163), - ScrollFactor: __webpack_require__(288), - Size: __webpack_require__(582), - Texture: __webpack_require__(583), - TextureCrop: __webpack_require__(584), - Tint: __webpack_require__(585), - ToJSON: __webpack_require__(289), - Transform: __webpack_require__(290), + Alpha: __webpack_require__(562), + AlphaSingle: __webpack_require__(280), + BlendMode: __webpack_require__(281), + ComputedSize: __webpack_require__(563), + Crop: __webpack_require__(564), + Depth: __webpack_require__(282), + Flip: __webpack_require__(565), + GetBounds: __webpack_require__(566), + Mask: __webpack_require__(286), + Origin: __webpack_require__(583), + PathFollower: __webpack_require__(584), + Pipeline: __webpack_require__(165), + ScrollFactor: __webpack_require__(289), + Size: __webpack_require__(585), + Texture: __webpack_require__(586), + TextureCrop: __webpack_require__(587), + Tint: __webpack_require__(588), + ToJSON: __webpack_require__(290), + Transform: __webpack_require__(291), TransformMatrix: __webpack_require__(31), - Visible: __webpack_require__(291) + Visible: __webpack_require__(292) }; @@ -2963,8 +2963,8 @@ module.exports = MATH_CONST; */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(289); -var DataManager = __webpack_require__(118); +var ComponentsToJSON = __webpack_require__(290); +var DataManager = __webpack_require__(120); var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(29); @@ -3700,7 +3700,7 @@ module.exports = GameObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(178); +var MATH = __webpack_require__(180); var GetValue = __webpack_require__(6); /** @@ -4256,27 +4256,27 @@ module.exports = Extend; module.exports = { - ADDED_TO_SCENE: __webpack_require__(729), - BOOT: __webpack_require__(730), - CREATE: __webpack_require__(731), - DESTROY: __webpack_require__(732), - PAUSE: __webpack_require__(733), - POST_UPDATE: __webpack_require__(734), - PRE_UPDATE: __webpack_require__(735), - READY: __webpack_require__(736), - REMOVED_FROM_SCENE: __webpack_require__(737), - RENDER: __webpack_require__(738), - RESUME: __webpack_require__(739), - SHUTDOWN: __webpack_require__(740), - SLEEP: __webpack_require__(741), - START: __webpack_require__(742), - TRANSITION_COMPLETE: __webpack_require__(743), - TRANSITION_INIT: __webpack_require__(744), - TRANSITION_OUT: __webpack_require__(745), - TRANSITION_START: __webpack_require__(746), - TRANSITION_WAKE: __webpack_require__(747), - UPDATE: __webpack_require__(748), - WAKE: __webpack_require__(749) + ADDED_TO_SCENE: __webpack_require__(733), + BOOT: __webpack_require__(734), + CREATE: __webpack_require__(735), + DESTROY: __webpack_require__(736), + PAUSE: __webpack_require__(737), + POST_UPDATE: __webpack_require__(738), + PRE_UPDATE: __webpack_require__(739), + READY: __webpack_require__(740), + REMOVED_FROM_SCENE: __webpack_require__(741), + RENDER: __webpack_require__(742), + RESUME: __webpack_require__(743), + SHUTDOWN: __webpack_require__(744), + SLEEP: __webpack_require__(745), + START: __webpack_require__(746), + TRANSITION_COMPLETE: __webpack_require__(747), + TRANSITION_INIT: __webpack_require__(748), + TRANSITION_OUT: __webpack_require__(749), + TRANSITION_START: __webpack_require__(750), + TRANSITION_WAKE: __webpack_require__(751), + UPDATE: __webpack_require__(752), + WAKE: __webpack_require__(753) }; @@ -4297,22 +4297,22 @@ module.exports = { module.exports = { - BLUR: __webpack_require__(564), - BOOT: __webpack_require__(565), - CONTEXT_LOST: __webpack_require__(566), - CONTEXT_RESTORED: __webpack_require__(567), - DESTROY: __webpack_require__(568), - FOCUS: __webpack_require__(569), - HIDDEN: __webpack_require__(570), - PAUSE: __webpack_require__(571), - POST_RENDER: __webpack_require__(572), - POST_STEP: __webpack_require__(573), - PRE_RENDER: __webpack_require__(574), - PRE_STEP: __webpack_require__(575), - READY: __webpack_require__(576), - RESUME: __webpack_require__(577), - STEP: __webpack_require__(578), - VISIBLE: __webpack_require__(579) + BLUR: __webpack_require__(567), + BOOT: __webpack_require__(568), + CONTEXT_LOST: __webpack_require__(569), + CONTEXT_RESTORED: __webpack_require__(570), + DESTROY: __webpack_require__(571), + FOCUS: __webpack_require__(572), + HIDDEN: __webpack_require__(573), + PAUSE: __webpack_require__(574), + POST_RENDER: __webpack_require__(575), + POST_STEP: __webpack_require__(576), + PRE_RENDER: __webpack_require__(577), + PRE_STEP: __webpack_require__(578), + READY: __webpack_require__(579), + RESUME: __webpack_require__(580), + STEP: __webpack_require__(581), + VISIBLE: __webpack_require__(582) }; @@ -4331,10 +4331,10 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var Events = __webpack_require__(84); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(145); -var MergeXHRSettings = __webpack_require__(224); -var XHRLoader = __webpack_require__(476); -var XHRSettings = __webpack_require__(146); +var GetURL = __webpack_require__(146); +var MergeXHRSettings = __webpack_require__(226); +var XHRLoader = __webpack_require__(477); +var XHRSettings = __webpack_require__(147); /** * @classdesc @@ -5250,7 +5250,7 @@ module.exports = PropertyValueSet; */ var CONST = __webpack_require__(34); -var Smoothing = __webpack_require__(175); +var Smoothing = __webpack_require__(177); // The pool into which the canvas elements are placed. var pool = []; @@ -5732,19 +5732,19 @@ module.exports = SetTransform; module.exports = { - ADDED_TO_SCENE: __webpack_require__(590), - DESTROY: __webpack_require__(591), - REMOVED_FROM_SCENE: __webpack_require__(592), - VIDEO_COMPLETE: __webpack_require__(593), - VIDEO_CREATED: __webpack_require__(594), - VIDEO_ERROR: __webpack_require__(595), - VIDEO_LOOP: __webpack_require__(596), - VIDEO_PLAY: __webpack_require__(597), - VIDEO_SEEKED: __webpack_require__(598), - VIDEO_SEEKING: __webpack_require__(599), - VIDEO_STOP: __webpack_require__(600), - VIDEO_TIMEOUT: __webpack_require__(601), - VIDEO_UNLOCKED: __webpack_require__(602) + ADDED_TO_SCENE: __webpack_require__(593), + DESTROY: __webpack_require__(594), + REMOVED_FROM_SCENE: __webpack_require__(595), + VIDEO_COMPLETE: __webpack_require__(596), + VIDEO_CREATED: __webpack_require__(597), + VIDEO_ERROR: __webpack_require__(598), + VIDEO_LOOP: __webpack_require__(599), + VIDEO_PLAY: __webpack_require__(600), + VIDEO_SEEKED: __webpack_require__(601), + VIDEO_SEEKING: __webpack_require__(602), + VIDEO_STOP: __webpack_require__(603), + VIDEO_TIMEOUT: __webpack_require__(604), + VIDEO_UNLOCKED: __webpack_require__(605) }; @@ -7080,10 +7080,10 @@ module.exports = TransformMatrix; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(173); -var GetColor32 = __webpack_require__(307); -var HSVToRGB = __webpack_require__(174); -var RGBToHSV = __webpack_require__(308); +var GetColor = __webpack_require__(175); +var GetColor32 = __webpack_require__(308); +var HSVToRGB = __webpack_require__(176); +var RGBToHSV = __webpack_require__(309); /** * @namespace Phaser.Display.Color @@ -8013,11 +8013,11 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.50.0-beta.4', + VERSION: '3.50.0-beta.5', BlendModes: __webpack_require__(54), - ScaleModes: __webpack_require__(245), + ScaleModes: __webpack_require__(247), /** * AUTO Detect Renderer. @@ -8315,10 +8315,10 @@ module.exports = PropertyValueInc; */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(283); -var GetPoints = __webpack_require__(160); +var GetPoint = __webpack_require__(284); +var GetPoints = __webpack_require__(162); var GEOM_CONST = __webpack_require__(49); -var Random = __webpack_require__(161); +var Random = __webpack_require__(163); var Vector2 = __webpack_require__(3); /** @@ -8687,23 +8687,23 @@ module.exports = DegToRad; module.exports = { - DESTROY: __webpack_require__(667), - FADE_IN_COMPLETE: __webpack_require__(668), - FADE_IN_START: __webpack_require__(669), - FADE_OUT_COMPLETE: __webpack_require__(670), - FADE_OUT_START: __webpack_require__(671), - FLASH_COMPLETE: __webpack_require__(672), - FLASH_START: __webpack_require__(673), - PAN_COMPLETE: __webpack_require__(674), - PAN_START: __webpack_require__(675), - POST_RENDER: __webpack_require__(676), - PRE_RENDER: __webpack_require__(677), - ROTATE_COMPLETE: __webpack_require__(678), - ROTATE_START: __webpack_require__(679), - SHAKE_COMPLETE: __webpack_require__(680), - SHAKE_START: __webpack_require__(681), - ZOOM_COMPLETE: __webpack_require__(682), - ZOOM_START: __webpack_require__(683) + DESTROY: __webpack_require__(671), + FADE_IN_COMPLETE: __webpack_require__(672), + FADE_IN_START: __webpack_require__(673), + FADE_OUT_COMPLETE: __webpack_require__(674), + FADE_OUT_START: __webpack_require__(675), + FLASH_COMPLETE: __webpack_require__(676), + FLASH_START: __webpack_require__(677), + PAN_COMPLETE: __webpack_require__(678), + PAN_START: __webpack_require__(679), + POST_RENDER: __webpack_require__(680), + PRE_RENDER: __webpack_require__(681), + ROTATE_COMPLETE: __webpack_require__(682), + ROTATE_START: __webpack_require__(683), + SHAKE_COMPLETE: __webpack_require__(684), + SHAKE_START: __webpack_require__(685), + ZOOM_COMPLETE: __webpack_require__(686), + ZOOM_START: __webpack_require__(687) }; @@ -9170,7 +9170,7 @@ module.exports = CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(149); +var GetTileAt = __webpack_require__(150); var GetTilesWithin = __webpack_require__(24); /** @@ -9614,52 +9614,52 @@ module.exports = DistanceBetween; module.exports = { - BOOT: __webpack_require__(848), - DESTROY: __webpack_require__(849), - DRAG_END: __webpack_require__(850), - DRAG_ENTER: __webpack_require__(851), - DRAG: __webpack_require__(852), - DRAG_LEAVE: __webpack_require__(853), - DRAG_OVER: __webpack_require__(854), - DRAG_START: __webpack_require__(855), - DROP: __webpack_require__(856), - GAME_OUT: __webpack_require__(857), - GAME_OVER: __webpack_require__(858), - GAMEOBJECT_DOWN: __webpack_require__(859), - GAMEOBJECT_DRAG_END: __webpack_require__(860), - GAMEOBJECT_DRAG_ENTER: __webpack_require__(861), - GAMEOBJECT_DRAG: __webpack_require__(862), - GAMEOBJECT_DRAG_LEAVE: __webpack_require__(863), - GAMEOBJECT_DRAG_OVER: __webpack_require__(864), - GAMEOBJECT_DRAG_START: __webpack_require__(865), - GAMEOBJECT_DROP: __webpack_require__(866), - GAMEOBJECT_MOVE: __webpack_require__(867), - GAMEOBJECT_OUT: __webpack_require__(868), - GAMEOBJECT_OVER: __webpack_require__(869), - GAMEOBJECT_POINTER_DOWN: __webpack_require__(870), - GAMEOBJECT_POINTER_MOVE: __webpack_require__(871), - GAMEOBJECT_POINTER_OUT: __webpack_require__(872), - GAMEOBJECT_POINTER_OVER: __webpack_require__(873), - GAMEOBJECT_POINTER_UP: __webpack_require__(874), - GAMEOBJECT_POINTER_WHEEL: __webpack_require__(875), - GAMEOBJECT_UP: __webpack_require__(876), - GAMEOBJECT_WHEEL: __webpack_require__(877), - MANAGER_BOOT: __webpack_require__(878), - MANAGER_PROCESS: __webpack_require__(879), - MANAGER_UPDATE: __webpack_require__(880), - POINTER_DOWN: __webpack_require__(881), - POINTER_DOWN_OUTSIDE: __webpack_require__(882), - POINTER_MOVE: __webpack_require__(883), - POINTER_OUT: __webpack_require__(884), - POINTER_OVER: __webpack_require__(885), - POINTER_UP: __webpack_require__(886), - POINTER_UP_OUTSIDE: __webpack_require__(887), - POINTER_WHEEL: __webpack_require__(888), - POINTERLOCK_CHANGE: __webpack_require__(889), - PRE_UPDATE: __webpack_require__(890), - SHUTDOWN: __webpack_require__(891), - START: __webpack_require__(892), - UPDATE: __webpack_require__(893) + BOOT: __webpack_require__(852), + DESTROY: __webpack_require__(853), + DRAG_END: __webpack_require__(854), + DRAG_ENTER: __webpack_require__(855), + DRAG: __webpack_require__(856), + DRAG_LEAVE: __webpack_require__(857), + DRAG_OVER: __webpack_require__(858), + DRAG_START: __webpack_require__(859), + DROP: __webpack_require__(860), + GAME_OUT: __webpack_require__(861), + GAME_OVER: __webpack_require__(862), + GAMEOBJECT_DOWN: __webpack_require__(863), + GAMEOBJECT_DRAG_END: __webpack_require__(864), + GAMEOBJECT_DRAG_ENTER: __webpack_require__(865), + GAMEOBJECT_DRAG: __webpack_require__(866), + GAMEOBJECT_DRAG_LEAVE: __webpack_require__(867), + GAMEOBJECT_DRAG_OVER: __webpack_require__(868), + GAMEOBJECT_DRAG_START: __webpack_require__(869), + GAMEOBJECT_DROP: __webpack_require__(870), + GAMEOBJECT_MOVE: __webpack_require__(871), + GAMEOBJECT_OUT: __webpack_require__(872), + GAMEOBJECT_OVER: __webpack_require__(873), + GAMEOBJECT_POINTER_DOWN: __webpack_require__(874), + GAMEOBJECT_POINTER_MOVE: __webpack_require__(875), + GAMEOBJECT_POINTER_OUT: __webpack_require__(876), + GAMEOBJECT_POINTER_OVER: __webpack_require__(877), + GAMEOBJECT_POINTER_UP: __webpack_require__(878), + GAMEOBJECT_POINTER_WHEEL: __webpack_require__(879), + GAMEOBJECT_UP: __webpack_require__(880), + GAMEOBJECT_WHEEL: __webpack_require__(881), + MANAGER_BOOT: __webpack_require__(882), + MANAGER_PROCESS: __webpack_require__(883), + MANAGER_UPDATE: __webpack_require__(884), + POINTER_DOWN: __webpack_require__(885), + POINTER_DOWN_OUTSIDE: __webpack_require__(886), + POINTER_MOVE: __webpack_require__(887), + POINTER_OUT: __webpack_require__(888), + POINTER_OVER: __webpack_require__(889), + POINTER_UP: __webpack_require__(890), + POINTER_UP_OUTSIDE: __webpack_require__(891), + POINTER_WHEEL: __webpack_require__(892), + POINTERLOCK_CHANGE: __webpack_require__(893), + PRE_UPDATE: __webpack_require__(894), + SHUTDOWN: __webpack_require__(895), + START: __webpack_require__(896), + UPDATE: __webpack_require__(897) }; @@ -10545,29 +10545,29 @@ module.exports = earcut; module.exports = { - COMPLETE: __webpack_require__(913), - DECODED: __webpack_require__(914), - DECODED_ALL: __webpack_require__(915), - DESTROY: __webpack_require__(916), - DETUNE: __webpack_require__(917), - GLOBAL_DETUNE: __webpack_require__(918), - GLOBAL_MUTE: __webpack_require__(919), - GLOBAL_RATE: __webpack_require__(920), - GLOBAL_VOLUME: __webpack_require__(921), - LOOP: __webpack_require__(922), - LOOPED: __webpack_require__(923), - MUTE: __webpack_require__(924), - PAUSE_ALL: __webpack_require__(925), - PAUSE: __webpack_require__(926), - PLAY: __webpack_require__(927), - RATE: __webpack_require__(928), - RESUME_ALL: __webpack_require__(929), - RESUME: __webpack_require__(930), - SEEK: __webpack_require__(931), - STOP_ALL: __webpack_require__(932), - STOP: __webpack_require__(933), - UNLOCKED: __webpack_require__(934), - VOLUME: __webpack_require__(935) + COMPLETE: __webpack_require__(917), + DECODED: __webpack_require__(918), + DECODED_ALL: __webpack_require__(919), + DESTROY: __webpack_require__(920), + DETUNE: __webpack_require__(921), + GLOBAL_DETUNE: __webpack_require__(922), + GLOBAL_MUTE: __webpack_require__(923), + GLOBAL_RATE: __webpack_require__(924), + GLOBAL_VOLUME: __webpack_require__(925), + LOOP: __webpack_require__(926), + LOOPED: __webpack_require__(927), + MUTE: __webpack_require__(928), + PAUSE_ALL: __webpack_require__(929), + PAUSE: __webpack_require__(930), + PLAY: __webpack_require__(931), + RATE: __webpack_require__(932), + RESUME_ALL: __webpack_require__(933), + RESUME: __webpack_require__(934), + SEEK: __webpack_require__(935), + STOP_ALL: __webpack_require__(936), + STOP: __webpack_require__(937), + UNLOCKED: __webpack_require__(938), + VOLUME: __webpack_require__(939) }; @@ -11184,10 +11184,10 @@ module.exports = WorldToTileY; var Class = __webpack_require__(0); var Contains = __webpack_require__(57); -var GetPoint = __webpack_require__(276); -var GetPoints = __webpack_require__(277); +var GetPoint = __webpack_require__(277); +var GetPoints = __webpack_require__(278); var GEOM_CONST = __webpack_require__(49); -var Random = __webpack_require__(158); +var Random = __webpack_require__(160); /** * @classdesc @@ -11648,8 +11648,8 @@ module.exports = SafeRange; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EaseMap = __webpack_require__(122); -var UppercaseFirst = __webpack_require__(189); +var EaseMap = __webpack_require__(123); +var UppercaseFirst = __webpack_require__(191); /** * This internal function is used to return the correct ease function for a Tween. @@ -11834,11 +11834,11 @@ module.exports = StrokePathWebGL; var Class = __webpack_require__(0); var Contains = __webpack_require__(85); -var GetPoint = __webpack_require__(442); -var GetPoints = __webpack_require__(443); +var GetPoint = __webpack_require__(443); +var GetPoints = __webpack_require__(444); var GEOM_CONST = __webpack_require__(49); var Line = __webpack_require__(40); -var Random = __webpack_require__(166); +var Random = __webpack_require__(168); /** * @classdesc @@ -12555,7 +12555,7 @@ module.exports = ImageFile; var Class = __webpack_require__(0); var Components = __webpack_require__(11); -var Rectangle = __webpack_require__(464); +var Rectangle = __webpack_require__(465); /** * @classdesc @@ -13391,12 +13391,12 @@ module.exports = Tile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AnimationState = __webpack_require__(248); +var AnimationState = __webpack_require__(157); var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GameObjectEvents = __webpack_require__(29); -var SpriteRender = __webpack_require__(987); +var SpriteRender = __webpack_require__(991); /** * @classdesc @@ -14857,7 +14857,7 @@ module.exports = SpliceOne; */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(184); +var FromPoints = __webpack_require__(186); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -15479,16 +15479,16 @@ module.exports = Curve; module.exports = { - ADD: __webpack_require__(894), - COMPLETE: __webpack_require__(895), - FILE_COMPLETE: __webpack_require__(896), - FILE_KEY_COMPLETE: __webpack_require__(897), - FILE_LOAD_ERROR: __webpack_require__(898), - FILE_LOAD: __webpack_require__(899), - FILE_PROGRESS: __webpack_require__(900), - POST_PROCESS: __webpack_require__(901), - PROGRESS: __webpack_require__(902), - START: __webpack_require__(903) + ADD: __webpack_require__(898), + COMPLETE: __webpack_require__(899), + FILE_COMPLETE: __webpack_require__(900), + FILE_KEY_COMPLETE: __webpack_require__(901), + FILE_LOAD_ERROR: __webpack_require__(902), + FILE_LOAD: __webpack_require__(903), + FILE_PROGRESS: __webpack_require__(904), + POST_PROCESS: __webpack_require__(905), + PROGRESS: __webpack_require__(906), + START: __webpack_require__(907) }; @@ -15902,6 +15902,379 @@ module.exports = TWEEN_CONST; /* 92 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @callback EachMapCallback + * + * @param {string} key - The key of the Map entry. + * @param {E} entry - The value of the Map entry. + * + * @return {?boolean} The callback result. + */ + +/** + * @classdesc + * The keys of a Map can be arbitrary values. + * + * ```javascript + * var map = new Map([ + * [ 1, 'one' ], + * [ 2, 'two' ], + * [ 3, 'three' ] + * ]); + * ``` + * + * @class Map + * @memberof Phaser.Structs + * @constructor + * @since 3.0.0 + * + * @generic K + * @generic V + * @genericUse {V[]} - [elements] + * + * @param {Array.<*>} elements - An optional array of key-value pairs to populate this Map with. + */ +var Map = new Class({ + + initialize: + + function Map (elements) + { + /** + * The entries in this Map. + * + * @genericUse {Object.} - [$type] + * + * @name Phaser.Structs.Map#entries + * @type {Object.} + * @default {} + * @since 3.0.0 + */ + this.entries = {}; + + /** + * The number of key / value pairs in this Map. + * + * @name Phaser.Structs.Map#size + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.size = 0; + + if (Array.isArray(elements)) + { + for (var i = 0; i < elements.length; i++) + { + this.set(elements[i][0], elements[i][1]); + } + } + }, + + /** + * Adds an element with a specified `key` and `value` to this Map. + * If the `key` already exists, the value will be replaced. + * + * @method Phaser.Structs.Map#set + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {V} - [value] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {string} key - The key of the element to be added to this Map. + * @param {*} value - The value of the element to be added to this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + set: function (key, value) + { + if (!this.has(key)) + { + this.size++; + } + + this.entries[key] = value; + + return this; + }, + + /** + * Returns the value associated to the `key`, or `undefined` if there is none. + * + * @method Phaser.Structs.Map#get + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {V} - [$return] + * + * @param {string} key - The key of the element to return from the `Map` object. + * + * @return {*} The element associated with the specified key or `undefined` if the key can't be found in this Map object. + */ + get: function (key) + { + if (this.has(key)) + { + return this.entries[key]; + } + }, + + /** + * Returns an `Array` of all the values stored in this Map. + * + * @method Phaser.Structs.Map#getArray + * @since 3.0.0 + * + * @genericUse {V[]} - [$return] + * + * @return {Array.<*>} An array of the values stored in this Map. + */ + getArray: function () + { + var output = []; + var entries = this.entries; + + for (var key in entries) + { + output.push(entries[key]); + } + + return output; + }, + + /** + * Returns a boolean indicating whether an element with the specified key exists or not. + * + * @method Phaser.Structs.Map#has + * @since 3.0.0 + * + * @genericUse {K} - [key] + * + * @param {string} key - The key of the element to test for presence of in this Map. + * + * @return {boolean} Returns `true` if an element with the specified key exists in this Map, otherwise `false`. + */ + has: function (key) + { + return (this.entries.hasOwnProperty(key)); + }, + + /** + * Delete the specified element from this Map. + * + * @method Phaser.Structs.Map#delete + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {string} key - The key of the element to delete from this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + delete: function (key) + { + if (this.has(key)) + { + delete this.entries[key]; + this.size--; + } + + return this; + }, + + /** + * Delete all entries from this Map. + * + * @method Phaser.Structs.Map#clear + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @return {Phaser.Structs.Map} This Map object. + */ + clear: function () + { + Object.keys(this.entries).forEach(function (prop) + { + delete this.entries[prop]; + + }, this); + + this.size = 0; + + return this; + }, + + /** + * Returns all entries keys in this Map. + * + * @method Phaser.Structs.Map#keys + * @since 3.0.0 + * + * @genericUse {K[]} - [$return] + * + * @return {string[]} Array containing entries' keys. + */ + keys: function () + { + return Object.keys(this.entries); + }, + + /** + * Returns an `Array` of all entries. + * + * @method Phaser.Structs.Map#values + * @since 3.0.0 + * + * @genericUse {V[]} - [$return] + * + * @return {Array.<*>} An `Array` of entries. + */ + values: function () + { + var output = []; + var entries = this.entries; + + for (var key in entries) + { + output.push(entries[key]); + } + + return output; + }, + + /** + * Dumps the contents of this Map to the console via `console.group`. + * + * @method Phaser.Structs.Map#dump + * @since 3.0.0 + */ + dump: function () + { + var entries = this.entries; + + // eslint-disable-next-line no-console + console.group('Map'); + + for (var key in entries) + { + console.log(key, entries[key]); + } + + // eslint-disable-next-line no-console + console.groupEnd(); + }, + + /** + * Passes all entries in this Map to the given callback. + * + * @method Phaser.Structs.Map#each + * @since 3.0.0 + * + * @genericUse {EachMapCallback.} - [callback] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {EachMapCallback} callback - The callback which will receive the keys and entries held in this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + each: function (callback) + { + var entries = this.entries; + + for (var key in entries) + { + if (callback(key, entries[key]) === false) + { + break; + } + } + + return this; + }, + + /** + * Returns `true` if the value exists within this Map. Otherwise, returns `false`. + * + * @method Phaser.Structs.Map#contains + * @since 3.0.0 + * + * @genericUse {V} - [value] + * + * @param {*} value - The value to search for. + * + * @return {boolean} `true` if the value is found, otherwise `false`. + */ + contains: function (value) + { + var entries = this.entries; + + for (var key in entries) + { + if (entries[key] === value) + { + return true; + } + } + + return false; + }, + + /** + * Merges all new keys from the given Map into this one. + * If it encounters a key that already exists it will be skipped unless override is set to `true`. + * + * @method Phaser.Structs.Map#merge + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Map.} - [map,$return] + * + * @param {Phaser.Structs.Map} map - The Map to merge in to this Map. + * @param {boolean} [override=false] - Set to `true` to replace values in this Map with those from the source map, or `false` to skip them. + * + * @return {Phaser.Structs.Map} This Map object. + */ + merge: function (map, override) + { + if (override === undefined) { override = false; } + + var local = this.entries; + var source = map.entries; + + for (var key in source) + { + if (local.hasOwnProperty(key) && override) + { + local[key] = source[key]; + } + else + { + this.set(key, source[key]); + } + } + + return this; + } + +}); + +module.exports = Map; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -15915,7 +16288,7 @@ var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(42); var Rectangle = __webpack_require__(9); var TransformMatrix = __webpack_require__(31); -var ValueToColor = __webpack_require__(172); +var ValueToColor = __webpack_require__(174); var Vector2 = __webpack_require__(3); /** @@ -17820,7 +18193,7 @@ module.exports = BaseCamera; /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17835,18 +18208,18 @@ module.exports = BaseCamera; module.exports = { - ENTER_FULLSCREEN: __webpack_require__(723), - FULLSCREEN_FAILED: __webpack_require__(724), - FULLSCREEN_UNSUPPORTED: __webpack_require__(725), - LEAVE_FULLSCREEN: __webpack_require__(726), - ORIENTATION_CHANGE: __webpack_require__(727), - RESIZE: __webpack_require__(728) + ENTER_FULLSCREEN: __webpack_require__(727), + FULLSCREEN_FAILED: __webpack_require__(728), + FULLSCREEN_UNSUPPORTED: __webpack_require__(729), + LEAVE_FULLSCREEN: __webpack_require__(730), + ORIENTATION_CHANGE: __webpack_require__(731), + RESIZE: __webpack_require__(732) }; /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, exports) { /** @@ -17890,7 +18263,7 @@ module.exports = SnapFloor; /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17981,7 +18354,7 @@ module.exports = Remove; /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18838,7 +19211,7 @@ module.exports = Frame; /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18848,11 +19221,11 @@ module.exports = Frame; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(98); -var GetPoint = __webpack_require__(411); -var GetPoints = __webpack_require__(412); +var Contains = __webpack_require__(99); +var GetPoint = __webpack_require__(412); +var GetPoints = __webpack_require__(413); var GEOM_CONST = __webpack_require__(49); -var Random = __webpack_require__(165); +var Random = __webpack_require__(167); /** * @classdesc @@ -19220,7 +19593,7 @@ module.exports = Ellipse; /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -19262,7 +19635,7 @@ module.exports = Contains; /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19271,15 +19644,15 @@ module.exports = Contains; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Actions = __webpack_require__(251); +var Actions = __webpack_require__(252); var Class = __webpack_require__(0); var Events = __webpack_require__(29); -var GetAll = __webpack_require__(191); +var GetAll = __webpack_require__(193); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var Range = __webpack_require__(403); -var Set = __webpack_require__(140); +var Range = __webpack_require__(404); +var Set = __webpack_require__(141); var Sprite = __webpack_require__(76); /** @@ -20972,7 +21345,7 @@ module.exports = Group; /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21036,9 +21409,9 @@ module.exports = FillPathWebGL; /***/ }), -/* 101 */, /* 102 */, -/* 103 */ +/* 103 */, +/* 104 */ /***/ (function(module, exports) { /** @@ -21068,7 +21441,7 @@ module.exports = IsInLayerBounds; /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21288,7 +21661,7 @@ module.exports = LayerData; /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21513,7 +21886,7 @@ module.exports = MapData; /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21917,7 +22290,7 @@ module.exports = Tileset; /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports) { /** @@ -22051,7 +22424,7 @@ module.exports = ALIGN_CONST; /***/ }), -/* 108 */ +/* 109 */ /***/ (function(module, exports) { /** @@ -22085,7 +22458,74 @@ module.exports = Equal; /***/ }), -/* 109 */ +/* 110 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var PIPELINE_CONST = { + + /** + * The Bitmap Mask Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + BITMAPMASK_PIPELINE: 'BitmapMaskPipeline', + + /** + * The Light 2D Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + LIGHT_PIPELINE: 'Light2D', + + /** + * The Single Texture Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + SINGLE_PIPELINE: 'SinglePipeline', + + /** + * The Multi Texture Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + MULTI_PIPELINE: 'MultiPipeline', + + /** + * The Rope Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + ROPE_PIPELINE: 'RopePipeline' + +}; + +module.exports = PIPELINE_CONST; + + +/***/ }), +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22961,7 +23401,7 @@ module.exports = WebGLPipeline; /***/ }), -/* 110 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22974,13 +23414,13 @@ module.exports = WebGLPipeline; var Class = __webpack_require__(0); var Earcut = __webpack_require__(60); var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(111); -var ProjectOrtho = __webpack_require__(183); -var ShaderSourceFS = __webpack_require__(811); -var ShaderSourceVS = __webpack_require__(812); +var ModelViewProjection = __webpack_require__(113); +var ProjectOrtho = __webpack_require__(185); +var ShaderSourceFS = __webpack_require__(810); +var ShaderSourceVS = __webpack_require__(811); var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); -var WebGLPipeline = __webpack_require__(109); +var WebGLPipeline = __webpack_require__(111); /** * @classdesc @@ -23382,7 +23822,7 @@ var MultiPipeline = new Class({ batchSprite: function (sprite, camera, parentTransformMatrix) { // Will cause a flush if this isn't the current pipeline, vertexbuffer or program - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var camMatrix = this._tempMatrix1; var spriteMatrix = this._tempMatrix2; @@ -23789,7 +24229,7 @@ var MultiPipeline = new Class({ { var renderer = this.renderer; - renderer.setPipeline(this, gameObject); + renderer.pipelines.set(this, gameObject); var camMatrix = this._tempMatrix1; var spriteMatrix = this._tempMatrix2; @@ -23941,7 +24381,7 @@ var MultiPipeline = new Class({ parentTransformMatrix ) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var spriteMatrix = this._tempMatrix1.copyFrom(transformMatrix); var calcMatrix = this._tempMatrix2; @@ -24030,7 +24470,7 @@ var MultiPipeline = new Class({ */ batchFillRect: function (x, y, width, height, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; @@ -24085,7 +24525,7 @@ var MultiPipeline = new Class({ */ batchFillTriangle: function (x0, y0, x1, y1, x2, y2, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; @@ -24172,7 +24612,7 @@ var MultiPipeline = new Class({ */ batchFillPath: function (path, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; @@ -24255,7 +24695,7 @@ var MultiPipeline = new Class({ */ batchStrokePath: function (path, lineWidth, pathOpen, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); // Reset the closePath booleans this.prevQuad[4] = 0; @@ -24301,7 +24741,7 @@ var MultiPipeline = new Class({ */ batchLine: function (ax, ay, bx, by, aLineWidth, bLineWidth, lineWidth, index, closePath, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; @@ -24408,7 +24848,7 @@ module.exports = MultiPipeline; /***/ }), -/* 111 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -24552,7 +24992,7 @@ module.exports = ModelViewProjection; /***/ }), -/* 112 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24564,7 +25004,7 @@ module.exports = ModelViewProjection; var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var ImageRender = __webpack_require__(990); +var ImageRender = __webpack_require__(994); /** * @classdesc @@ -24653,7 +25093,7 @@ module.exports = Image; /***/ }), -/* 113 */ +/* 115 */ /***/ (function(module, exports) { /** @@ -24682,8 +25122,8 @@ module.exports = HasValue; /***/ }), -/* 114 */, -/* 115 */ +/* 116 */, +/* 117 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24996,7 +25436,7 @@ module.exports = Zone; /***/ }), -/* 116 */ +/* 118 */ /***/ (function(module, exports) { /** @@ -25024,7 +25464,7 @@ module.exports = Perimeter; /***/ }), -/* 117 */ +/* 119 */ /***/ (function(module, exports) { /** @@ -25053,7 +25493,7 @@ module.exports = GetColorFromValue; /***/ }), -/* 118 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25063,7 +25503,7 @@ module.exports = GetColorFromValue; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(292); +var Events = __webpack_require__(293); /** * @callback DataEachCallback @@ -25760,7 +26200,7 @@ module.exports = DataManager; /***/ }), -/* 119 */ +/* 121 */ /***/ (function(module, exports) { /** @@ -25801,7 +26241,7 @@ module.exports = Shuffle; /***/ }), -/* 120 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25816,22 +26256,23 @@ module.exports = Shuffle; module.exports = { - ADD_ANIMATION: __webpack_require__(649), - ANIMATION_COMPLETE: __webpack_require__(650), - ANIMATION_REPEAT: __webpack_require__(651), - ANIMATION_RESTART: __webpack_require__(652), - ANIMATION_START: __webpack_require__(653), - ANIMATION_STOP: __webpack_require__(654), - ANIMATION_UPDATE: __webpack_require__(655), - PAUSE_ALL: __webpack_require__(656), - REMOVE_ANIMATION: __webpack_require__(657), - RESUME_ALL: __webpack_require__(658) + ADD_ANIMATION: __webpack_require__(652), + ANIMATION_COMPLETE: __webpack_require__(653), + ANIMATION_COMPLETE_KEY: __webpack_require__(654), + ANIMATION_REPEAT: __webpack_require__(655), + ANIMATION_RESTART: __webpack_require__(656), + ANIMATION_START: __webpack_require__(657), + ANIMATION_STOP: __webpack_require__(658), + ANIMATION_UPDATE: __webpack_require__(659), + PAUSE_ALL: __webpack_require__(660), + REMOVE_ANIMATION: __webpack_require__(661), + RESUME_ALL: __webpack_require__(662) }; /***/ }), -/* 121 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25840,391 +26281,18 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(0); - -/** - * @callback EachMapCallback - * - * @param {string} key - The key of the Map entry. - * @param {E} entry - The value of the Map entry. - * - * @return {?boolean} The callback result. - */ - -/** - * @classdesc - * The keys of a Map can be arbitrary values. - * - * ```javascript - * var map = new Map([ - * [ 1, 'one' ], - * [ 2, 'two' ], - * [ 3, 'three' ] - * ]); - * ``` - * - * @class Map - * @memberof Phaser.Structs - * @constructor - * @since 3.0.0 - * - * @generic K - * @generic V - * @genericUse {V[]} - [elements] - * - * @param {Array.<*>} elements - An optional array of key-value pairs to populate this Map with. - */ -var Map = new Class({ - - initialize: - - function Map (elements) - { - /** - * The entries in this Map. - * - * @genericUse {Object.} - [$type] - * - * @name Phaser.Structs.Map#entries - * @type {Object.} - * @default {} - * @since 3.0.0 - */ - this.entries = {}; - - /** - * The number of key / value pairs in this Map. - * - * @name Phaser.Structs.Map#size - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.size = 0; - - if (Array.isArray(elements)) - { - for (var i = 0; i < elements.length; i++) - { - this.set(elements[i][0], elements[i][1]); - } - } - }, - - /** - * Adds an element with a specified `key` and `value` to this Map. - * If the `key` already exists, the value will be replaced. - * - * @method Phaser.Structs.Map#set - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {V} - [value] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {string} key - The key of the element to be added to this Map. - * @param {*} value - The value of the element to be added to this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - set: function (key, value) - { - if (!this.has(key)) - { - this.size++; - } - - this.entries[key] = value; - - return this; - }, - - /** - * Returns the value associated to the `key`, or `undefined` if there is none. - * - * @method Phaser.Structs.Map#get - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {V} - [$return] - * - * @param {string} key - The key of the element to return from the `Map` object. - * - * @return {*} The element associated with the specified key or `undefined` if the key can't be found in this Map object. - */ - get: function (key) - { - if (this.has(key)) - { - return this.entries[key]; - } - }, - - /** - * Returns an `Array` of all the values stored in this Map. - * - * @method Phaser.Structs.Map#getArray - * @since 3.0.0 - * - * @genericUse {V[]} - [$return] - * - * @return {Array.<*>} An array of the values stored in this Map. - */ - getArray: function () - { - var output = []; - var entries = this.entries; - - for (var key in entries) - { - output.push(entries[key]); - } - - return output; - }, - - /** - * Returns a boolean indicating whether an element with the specified key exists or not. - * - * @method Phaser.Structs.Map#has - * @since 3.0.0 - * - * @genericUse {K} - [key] - * - * @param {string} key - The key of the element to test for presence of in this Map. - * - * @return {boolean} Returns `true` if an element with the specified key exists in this Map, otherwise `false`. - */ - has: function (key) - { - return (this.entries.hasOwnProperty(key)); - }, - - /** - * Delete the specified element from this Map. - * - * @method Phaser.Structs.Map#delete - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {string} key - The key of the element to delete from this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - delete: function (key) - { - if (this.has(key)) - { - delete this.entries[key]; - this.size--; - } - - return this; - }, - - /** - * Delete all entries from this Map. - * - * @method Phaser.Structs.Map#clear - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @return {Phaser.Structs.Map} This Map object. - */ - clear: function () - { - Object.keys(this.entries).forEach(function (prop) - { - delete this.entries[prop]; - - }, this); - - this.size = 0; - - return this; - }, - - /** - * Returns all entries keys in this Map. - * - * @method Phaser.Structs.Map#keys - * @since 3.0.0 - * - * @genericUse {K[]} - [$return] - * - * @return {string[]} Array containing entries' keys. - */ - keys: function () - { - return Object.keys(this.entries); - }, - - /** - * Returns an `Array` of all entries. - * - * @method Phaser.Structs.Map#values - * @since 3.0.0 - * - * @genericUse {V[]} - [$return] - * - * @return {Array.<*>} An `Array` of entries. - */ - values: function () - { - var output = []; - var entries = this.entries; - - for (var key in entries) - { - output.push(entries[key]); - } - - return output; - }, - - /** - * Dumps the contents of this Map to the console via `console.group`. - * - * @method Phaser.Structs.Map#dump - * @since 3.0.0 - */ - dump: function () - { - var entries = this.entries; - - // eslint-disable-next-line no-console - console.group('Map'); - - for (var key in entries) - { - console.log(key, entries[key]); - } - - // eslint-disable-next-line no-console - console.groupEnd(); - }, - - /** - * Passes all entries in this Map to the given callback. - * - * @method Phaser.Structs.Map#each - * @since 3.0.0 - * - * @genericUse {EachMapCallback.} - [callback] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {EachMapCallback} callback - The callback which will receive the keys and entries held in this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - each: function (callback) - { - var entries = this.entries; - - for (var key in entries) - { - if (callback(key, entries[key]) === false) - { - break; - } - } - - return this; - }, - - /** - * Returns `true` if the value exists within this Map. Otherwise, returns `false`. - * - * @method Phaser.Structs.Map#contains - * @since 3.0.0 - * - * @genericUse {V} - [value] - * - * @param {*} value - The value to search for. - * - * @return {boolean} `true` if the value is found, otherwise `false`. - */ - contains: function (value) - { - var entries = this.entries; - - for (var key in entries) - { - if (entries[key] === value) - { - return true; - } - } - - return false; - }, - - /** - * Merges all new keys from the given Map into this one. - * If it encounters a key that already exists it will be skipped unless override is set to `true`. - * - * @method Phaser.Structs.Map#merge - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Map.} - [map,$return] - * - * @param {Phaser.Structs.Map} map - The Map to merge in to this Map. - * @param {boolean} [override=false] - Set to `true` to replace values in this Map with those from the source map, or `false` to skip them. - * - * @return {Phaser.Structs.Map} This Map object. - */ - merge: function (map, override) - { - if (override === undefined) { override = false; } - - var local = this.entries; - var source = map.entries; - - for (var key in source) - { - if (local.hasOwnProperty(key) && override) - { - local[key] = source[key]; - } - else - { - this.set(key, source[key]); - } - } - - return this; - } - -}); - -module.exports = Map; - - -/***/ }), -/* 122 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Back = __webpack_require__(314); -var Bounce = __webpack_require__(315); -var Circular = __webpack_require__(316); -var Cubic = __webpack_require__(317); -var Elastic = __webpack_require__(318); -var Expo = __webpack_require__(319); -var Linear = __webpack_require__(320); -var Quadratic = __webpack_require__(321); -var Quartic = __webpack_require__(322); -var Quintic = __webpack_require__(323); -var Sine = __webpack_require__(324); -var Stepped = __webpack_require__(325); +var Back = __webpack_require__(315); +var Bounce = __webpack_require__(316); +var Circular = __webpack_require__(317); +var Cubic = __webpack_require__(318); +var Elastic = __webpack_require__(319); +var Expo = __webpack_require__(320); +var Linear = __webpack_require__(321); +var Quadratic = __webpack_require__(322); +var Quartic = __webpack_require__(323); +var Quintic = __webpack_require__(324); +var Sine = __webpack_require__(325); +var Stepped = __webpack_require__(326); // EaseMap module.exports = { @@ -26285,7 +26353,7 @@ module.exports = { /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -26315,7 +26383,7 @@ module.exports = Linear; /***/ }), -/* 124 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -26484,10 +26552,10 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(751))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(755))) /***/ }), -/* 125 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26496,7 +26564,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(124); +var OS = __webpack_require__(125); /** * Determines the browser type and version running this Phaser Game instance. @@ -26597,7 +26665,7 @@ module.exports = init(); /***/ }), -/* 126 */ +/* 127 */ /***/ (function(module, exports) { /** @@ -26626,7 +26694,7 @@ module.exports = FloatBetween; /***/ }), -/* 127 */ +/* 128 */ /***/ (function(module, exports) { /** @@ -26656,7 +26724,7 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 128 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27201,7 +27269,7 @@ module.exports = Vector4; /***/ }), -/* 129 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27216,17 +27284,17 @@ module.exports = Vector4; module.exports = { - ADD: __webpack_require__(803), - ERROR: __webpack_require__(804), - LOAD: __webpack_require__(805), - READY: __webpack_require__(806), - REMOVE: __webpack_require__(807) + ADD: __webpack_require__(814), + ERROR: __webpack_require__(815), + LOAD: __webpack_require__(816), + READY: __webpack_require__(817), + REMOVE: __webpack_require__(818) }; /***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports) { /** @@ -27284,7 +27352,7 @@ module.exports = AddToDOM; /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, exports) { /** @@ -28190,7 +28258,7 @@ module.exports = KeyCodes; /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports) { /** @@ -28313,7 +28381,7 @@ module.exports = CONST; /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28358,7 +28426,7 @@ module.exports = Merge; /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28374,8 +28442,8 @@ var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(61); var GameEvents = __webpack_require__(21); var NOOP = __webpack_require__(1); -var GetAll = __webpack_require__(191); -var GetFirst = __webpack_require__(394); +var GetAll = __webpack_require__(193); +var GetFirst = __webpack_require__(395); /** * @classdesc @@ -29072,7 +29140,7 @@ module.exports = BaseSoundManager; /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29572,7 +29640,7 @@ module.exports = BaseSound; /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29581,10 +29649,10 @@ module.exports = BaseSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(192); +var ArrayUtils = __webpack_require__(194); var Class = __webpack_require__(0); var NOOP = __webpack_require__(1); -var StableSort = __webpack_require__(138); +var StableSort = __webpack_require__(139); /** * @callback EachListCallback @@ -30388,7 +30456,7 @@ module.exports = List; /***/ }), -/* 137 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30397,8 +30465,8 @@ module.exports = List; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CheckMatrix = __webpack_require__(193); -var TransposeMatrix = __webpack_require__(401); +var CheckMatrix = __webpack_require__(195); +var TransposeMatrix = __webpack_require__(402); /** * Rotates the array matrix based on the given rotation value. @@ -30460,7 +30528,7 @@ module.exports = RotateMatrix; /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports) { /** @@ -30636,7 +30704,7 @@ module.exports = StableSort; /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30649,12 +30717,12 @@ var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var GetColorFromValue = __webpack_require__(117); -var GetBitmapTextSize = __webpack_require__(965); -var ParseFromAtlas = __webpack_require__(966); -var ParseXMLBitmapFont = __webpack_require__(196); +var GetColorFromValue = __webpack_require__(119); +var GetBitmapTextSize = __webpack_require__(969); +var ParseFromAtlas = __webpack_require__(970); +var ParseXMLBitmapFont = __webpack_require__(198); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(967); +var Render = __webpack_require__(971); /** * @classdesc @@ -31764,7 +31832,7 @@ module.exports = BitmapText; /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32213,7 +32281,7 @@ module.exports = Set; /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32225,7 +32293,7 @@ module.exports = Set; var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1093); +var MeshRender = __webpack_require__(1097); var NOOP = __webpack_require__(1); /** @@ -32384,7 +32452,7 @@ module.exports = Mesh; /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports) { /** @@ -32422,7 +32490,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32530,7 +32598,7 @@ module.exports = InputPluginCache; /***/ }), -/* 144 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32545,19 +32613,19 @@ module.exports = InputPluginCache; module.exports = { - ANY_KEY_DOWN: __webpack_require__(1235), - ANY_KEY_UP: __webpack_require__(1236), - COMBO_MATCH: __webpack_require__(1237), - DOWN: __webpack_require__(1238), - KEY_DOWN: __webpack_require__(1239), - KEY_UP: __webpack_require__(1240), - UP: __webpack_require__(1241) + ANY_KEY_DOWN: __webpack_require__(1239), + ANY_KEY_UP: __webpack_require__(1240), + COMBO_MATCH: __webpack_require__(1241), + DOWN: __webpack_require__(1242), + KEY_DOWN: __webpack_require__(1243), + KEY_UP: __webpack_require__(1244), + UP: __webpack_require__(1245) }; /***/ }), -/* 145 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -32598,7 +32666,7 @@ module.exports = GetURL; /***/ }), -/* 146 */ +/* 147 */ /***/ (function(module, exports) { /** @@ -32668,7 +32736,7 @@ module.exports = XHRSettings; /***/ }), -/* 147 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32678,7 +32746,7 @@ module.exports = XHRSettings; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(226); +var Components = __webpack_require__(228); var Sprite = __webpack_require__(76); /** @@ -32769,7 +32837,7 @@ module.exports = ArcadeSprite; /***/ }), -/* 148 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32784,56 +32852,56 @@ module.exports = ArcadeSprite; module.exports = { - CalculateFacesAt: __webpack_require__(233), + CalculateFacesAt: __webpack_require__(235), CalculateFacesWithin: __webpack_require__(53), - Copy: __webpack_require__(1322), - CreateFromTiles: __webpack_require__(1323), - CullTiles: __webpack_require__(1324), - Fill: __webpack_require__(1325), - FilterTiles: __webpack_require__(1326), - FindByIndex: __webpack_require__(1327), - FindTile: __webpack_require__(1328), - ForEachTile: __webpack_require__(1329), - GetTileAt: __webpack_require__(149), - GetTileAtWorldXY: __webpack_require__(1330), + Copy: __webpack_require__(1326), + CreateFromTiles: __webpack_require__(1327), + CullTiles: __webpack_require__(1328), + Fill: __webpack_require__(1329), + FilterTiles: __webpack_require__(1330), + FindByIndex: __webpack_require__(1331), + FindTile: __webpack_require__(1332), + ForEachTile: __webpack_require__(1333), + GetTileAt: __webpack_require__(150), + GetTileAtWorldXY: __webpack_require__(1334), GetTilesWithin: __webpack_require__(24), - GetTilesWithinShape: __webpack_require__(1331), - GetTilesWithinWorldXY: __webpack_require__(1332), - HasTileAt: __webpack_require__(503), - HasTileAtWorldXY: __webpack_require__(1333), - IsInLayerBounds: __webpack_require__(103), - PutTileAt: __webpack_require__(234), - PutTileAtWorldXY: __webpack_require__(1334), - PutTilesAt: __webpack_require__(1335), - Randomize: __webpack_require__(1336), - RemoveTileAt: __webpack_require__(504), - RemoveTileAtWorldXY: __webpack_require__(1337), - RenderDebug: __webpack_require__(1338), - ReplaceByIndex: __webpack_require__(502), - SetCollision: __webpack_require__(1339), - SetCollisionBetween: __webpack_require__(1340), - SetCollisionByExclusion: __webpack_require__(1341), - SetCollisionByProperty: __webpack_require__(1342), - SetCollisionFromCollisionGroup: __webpack_require__(1343), - SetLayerCollisionIndex: __webpack_require__(152), + GetTilesWithinShape: __webpack_require__(1335), + GetTilesWithinWorldXY: __webpack_require__(1336), + HasTileAt: __webpack_require__(504), + HasTileAtWorldXY: __webpack_require__(1337), + IsInLayerBounds: __webpack_require__(104), + PutTileAt: __webpack_require__(236), + PutTileAtWorldXY: __webpack_require__(1338), + PutTilesAt: __webpack_require__(1339), + Randomize: __webpack_require__(1340), + RemoveTileAt: __webpack_require__(505), + RemoveTileAtWorldXY: __webpack_require__(1341), + RenderDebug: __webpack_require__(1342), + ReplaceByIndex: __webpack_require__(503), + SetCollision: __webpack_require__(1343), + SetCollisionBetween: __webpack_require__(1344), + SetCollisionByExclusion: __webpack_require__(1345), + SetCollisionByProperty: __webpack_require__(1346), + SetCollisionFromCollisionGroup: __webpack_require__(1347), + SetLayerCollisionIndex: __webpack_require__(153), SetTileCollision: __webpack_require__(65), - SetTileIndexCallback: __webpack_require__(1344), - SetTileLocationCallback: __webpack_require__(1345), - Shuffle: __webpack_require__(1346), - SwapByIndex: __webpack_require__(1347), - TileToWorldX: __webpack_require__(150), - TileToWorldXY: __webpack_require__(1348), - TileToWorldY: __webpack_require__(151), - WeightedRandomize: __webpack_require__(1349), + SetTileIndexCallback: __webpack_require__(1348), + SetTileLocationCallback: __webpack_require__(1349), + Shuffle: __webpack_require__(1350), + SwapByIndex: __webpack_require__(1351), + TileToWorldX: __webpack_require__(151), + TileToWorldXY: __webpack_require__(1352), + TileToWorldY: __webpack_require__(152), + WeightedRandomize: __webpack_require__(1353), WorldToTileX: __webpack_require__(66), - WorldToTileXY: __webpack_require__(1350), + WorldToTileXY: __webpack_require__(1354), WorldToTileY: __webpack_require__(67) }; /***/ }), -/* 149 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32842,7 +32910,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(103); +var IsInLayerBounds = __webpack_require__(104); /** * Gets a tile at the given tile coordinates from the given layer. @@ -32888,7 +32956,7 @@ module.exports = GetTileAt; /***/ }), -/* 150 */ +/* 151 */ /***/ (function(module, exports) { /** @@ -32932,7 +33000,7 @@ module.exports = TileToWorldX; /***/ }), -/* 151 */ +/* 152 */ /***/ (function(module, exports) { /** @@ -32976,7 +33044,7 @@ module.exports = TileToWorldY; /***/ }), -/* 152 */ +/* 153 */ /***/ (function(module, exports) { /** @@ -33014,7 +33082,7 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 153 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33075,7 +33143,7 @@ module.exports = CreateGroupLayer; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, exports) { /** @@ -33139,7 +33207,7 @@ module.exports = GetNewValue; /***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33148,17 +33216,17 @@ module.exports = GetNewValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(241); +var Defaults = __webpack_require__(243); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(90); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(154); -var GetProps = __webpack_require__(525); -var GetTargets = __webpack_require__(239); +var GetNewValue = __webpack_require__(155); +var GetProps = __webpack_require__(526); +var GetTargets = __webpack_require__(241); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(240); -var Tween = __webpack_require__(242); -var TweenData = __webpack_require__(244); +var GetValueOp = __webpack_require__(242); +var Tween = __webpack_require__(244); +var TweenData = __webpack_require__(246); /** * Creates a new Tween. @@ -33272,10 +33340,1794 @@ module.exports = TweenBuilder; /***/ }), -/* 156 */, /* 157 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CustomMap = __webpack_require__(92); +var GetFastValue = __webpack_require__(2); +var Events = __webpack_require__(122); +var Animation = __webpack_require__(172); + +/** + * @classdesc + * The Animation State Component. + * + * This component provides features to apply animations to Game Objects. It is responsible for + * loading, queuing animations for later playback, mixing between animations and setting + * the current animation frame to the Game Object that owns this component. + * + * This component lives as an instance within any Game Object that has it defined, such as Sprites. + * + * You can access its properties and methods via the `anims` property, i.e. `Sprite.anims`. + * + * As well as playing animations stored in the global Animation Manager, this component + * can also create animations that are stored locally within it. See the `create` method + * for more details. + * + * Prior to Phaser 3.50 this component was called just `Animation` and lived in the + * `Phaser.GameObjects.Components` namespace. It was renamed to `AnimationState` + * in 3.50 to help better identify its true purpose when browsing the documentation. + * + * @class AnimationState + * @memberof Phaser.Animations + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation component belongs. + */ +var AnimationState = new Class({ + + initialize: + + function AnimationState (parent) + { + /** + * The Game Object to which this animation component belongs. + * + * You can typically access this component from the Game Object + * via the `this.anims` property. + * + * @name Phaser.Animations.AnimationState#parent + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.Animations.AnimationState#animationManager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.animationManager = parent.scene.sys.anims; + + this.animationManager.on(Events.REMOVE_ANIMATION, this.globalRemove, this); + + /** + * A reference to the Texture Manager. + * + * @name Phaser.Animations.AnimationState#textureManager + * @type {Phaser.Textures.TextureManager} + * @protected + * @since 3.50.0 + */ + this.textureManager = this.animationManager.textureManager; + + /** + * The Animations stored locally in this Animation component. + * + * Do not modify the contents of this Map directly, instead use the + * `add`, `create` and `remove` methods of this class instead. + * + * @name Phaser.Animations.AnimationState#anims + * @type {Phaser.Structs.Map.} + * @protected + * @since 3.50.0 + */ + this.anims = null; + + /** + * Is an animation currently playing or not? + * + * @name Phaser.Animations.AnimationState#isPlaying + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.isPlaying = false; + + /** + * Has the current animation started playing, or is it waiting for a delay to expire? + * + * @name Phaser.Animations.AnimationState#hasStarted + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.hasStarted = false; + + /** + * The current Animation loaded into this Animation component. + * + * Will by `null` if no animation is yet loaded. + * + * @name Phaser.Animations.AnimationState#currentAnim + * @type {?Phaser.Animations.Animation} + * @default null + * @since 3.0.0 + */ + this.currentAnim = null; + + /** + * The current AnimationFrame being displayed by this Animation component. + * + * Will by `null` if no animation is yet loaded. + * + * @name Phaser.Animations.AnimationState#currentFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @since 3.0.0 + */ + this.currentFrame = null; + + /** + * The key, instance, or config of the next Animation to be loaded into this Animation component + * when the current animation completes. + * + * Will by `null` if no animation has been queued. + * + * @name Phaser.Animations.AnimationState#nextAnim + * @type {?(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} + * @default null + * @since 3.16.0 + */ + this.nextAnim = null; + + /** + * A queue of Animations to be loaded into this Animation component when the current animation completes. + * + * Populate this queue via the `chain` method. + * + * @name Phaser.Animations.AnimationState#nextAnimsQueue + * @type {array} + * @since 3.24.0 + */ + this.nextAnimsQueue = []; + + /** + * The Time Scale factor. + * + * You can adjust this value to modify the passage of time for the animation that is currently + * playing. For example, setting it to 2 will make the animation play twice as fast. Or setting + * it to 0.5 will slow the animation down. + * + * You can change this value at run-time, or set it via the `PlayAnimationConfig`. + * + * Prior to Phaser 3.50 this property was private and called `_timeScale`. + * + * @name Phaser.Animations.AnimationState#timeScale + * @type {number} + * @default 1 + * @since 3.50.0 + */ + this.timeScale = 1; + + /** + * The frame rate of playback, of the current animation, in frames per second. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the frame rate, provide a new value in the `PlayAnimationConfig` object. + * + * @name Phaser.Animations.AnimationState#frameRate + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.frameRate = 0; + + /** + * The duration of the current animation, in milliseconds. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the duration, provide a new value in the `PlayAnimationConfig` object. + * + * @name Phaser.Animations.AnimationState#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * The number of milliseconds per frame, not including frame specific modifiers that may be present in the + * Animation data. + * + * This value is calculated when a new animation is loaded into this component and should + * be treated as read-only. Changing it will not alter playback speed. + * + * @name Phaser.Animations.AnimationState#msPerFrame + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.msPerFrame = 0; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.Animations.AnimationState#skipMissedFrames + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.skipMissedFrames = true; + + /** + * The delay before starting playback of the current animation, in milliseconds. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the delay, provide a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_delay`. + * + * @name Phaser.Animations.AnimationState#delay + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.delay = 0; + + /** + * The number of times to repeat playback of the current animation. + * + * If -1, it means the animation will repeat forever. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the number of repeats, provide a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_repeat`. + * + * @name Phaser.Animations.AnimationState#repeat + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.repeat = 0; + + /** + * The number of milliseconds to wait before starting the repeat playback of the current animation. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * You can change the repeat delay by providing a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_repeatDelay`. + * + * @name Phaser.Animations.AnimationState#repeatDelay + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatDelay = 0; + + /** + * Should the current animation yoyo? An animation that yoyos will play in reverse, from the end + * to the start, before then repeating or completing. An animation that does not yoyo will just + * play from the start to the end. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * You can change the yoyo by providing a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_yoyo`. + * + * @name Phaser.Animations.AnimationState#yoyo + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.yoyo = false; + + /** + * Should the GameObject's `visible` property be set to `true` when the animation starts to play? + * + * This will happen _after_ any delay that may have been set. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is currently delayed. + * + * @name Phaser.Animations.AnimationState#showOnStart + * @type {boolean} + * @since 3.50.0 + */ + this.showOnStart = false; + + /** + * Should the GameObject's `visible` property be set to `false` when the animation completes? + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is still actively playing. + * + * @name Phaser.Animations.AnimationState#hideOnComplete + * @type {boolean} + * @since 3.50.0 + */ + this.hideOnComplete = false; + + /** + * Is the playhead moving forwards (`true`) or in reverse (`false`) ? + * + * @name Phaser.Animations.AnimationState#forward + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.forward = true; + + /** + * An internal trigger that tells the component if it should plays the animation + * in reverse mode ('true') or not ('false'). This is used because `forward` can + * be changed by the `yoyo` feature. + * + * Prior to Phaser 3.50 this property was private and called `_reverse`. + * + * @name Phaser.Animations.AnimationState#inReverse + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.inReverse = false; + + /** + * Internal time overflow accumulator. + * + * This has the `delta` time added to it as part of the `update` step. + * + * @name Phaser.Animations.AnimationState#accumulator + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.accumulator = 0; + + /** + * The time point at which the next animation frame will change. + * + * This value is compared against the `accumulator` as part of the `update` step. + * + * @name Phaser.Animations.AnimationState#nextTick + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.nextTick = 0; + + /** + * A counter keeping track of how much delay time, in milliseconds, is left before playback begins. + * + * This is set via the `playAfterDelay` method, although it can be modified at run-time + * if required, as long as the animation has not already started playing. + * + * @name Phaser.Animations.AnimationState#delayCounter + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.delayCounter = 0; + + /** + * A counter that keeps track of how many repeats are left to run. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * @name Phaser.Animations.AnimationState#repeatCounter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatCounter = 0; + + /** + * An internal flag keeping track of pending repeats. + * + * @name Phaser.Animations.AnimationState#pendingRepeat + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.pendingRepeat = false; + + /** + * Is the Animation paused? + * + * @name Phaser.Animations.AnimationState#_paused + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._paused = false; + + /** + * Was the animation previously playing before being paused? + * + * @name Phaser.Animations.AnimationState#_wasPlaying + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._wasPlaying = false; + + /** + * Internal property tracking if this Animation is waiting to stop. + * + * 0 = No + * 1 = Waiting for ms to pass + * 2 = Waiting for repeat + * 3 = Waiting for specific frame + * + * @name Phaser.Animations.AnimationState#_pendingStop + * @type {integer} + * @private + * @since 3.4.0 + */ + this._pendingStop = 0; + + /** + * Internal property used by _pendingStop. + * + * @name Phaser.Animations.AnimationState#_pendingStopValue + * @type {any} + * @private + * @since 3.4.0 + */ + this._pendingStopValue; + }, + + /** + * Sets an animation, or an array of animations, to be played in the future, after the current one completes or stops. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, + * or have one of the `stop` methods called. + * + * An animation set to repeat forever will never enter a completed state unless stopped. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event). + * + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. + * + * Call this method with no arguments to reset all currently chained animations. + * + * @method Phaser.Animations.AnimationState#chain + * @since 3.16.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + chain: function (key) + { + var parent = this.parent; + + if (key === undefined) + { + this.nextAnimsQueue.length = 0; + this.nextAnim = null; + + return parent; + } + + if (!Array.isArray(key)) + { + key = [ key ]; + } + + for (var i = 0; i < key.length; i++) + { + var anim = key[i]; + + if (this.nextAnim === null) + { + this.nextAnim = anim; + } + else + { + this.nextAnimsQueue.push(anim); + } + } + + return this.parent; + }, + + /** + * Returns the key of the animation currently loaded into this component. + * + * Prior to Phaser 3.50 this method was called `getCurrentKey`. + * + * @method Phaser.Animations.AnimationState#getName + * @since 3.50.0 + * + * @return {string} The key of the Animation currently loaded into this component, or an empty string if none loaded. + */ + getName: function () + { + return (this.currentAnim) ? this.currentAnim.key : ''; + }, + + /** + * Returns the key of the animation frame currently displayed by this component. + * + * @method Phaser.Animations.AnimationState#getFrameName + * @since 3.50.0 + * + * @return {string} The key of the Animation Frame currently displayed by this component, or an empty string if no animation has been loaded. + */ + getFrameName: function () + { + return (this.currentFrame) ? this.currentFrame.textureFrame : ''; + }, + + /** + * Internal method used to load an animation into this component. + * + * @method Phaser.Animations.AnimationState#load + * @protected + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + load: function (key) + { + if (this.isPlaying) + { + this.stop(); + } + + var manager = this.animationManager; + var animKey = (typeof key === 'string') ? key : GetFastValue(key, 'key', null); + + // Get the animation, first from the local map and, if not found, from the Animation Manager + var anim = (this.exists(animKey)) ? this.get(animKey) : manager.get(animKey); + + if (!anim) + { + console.warn('Missing animation: ' + animKey); + } + else + { + this.currentAnim = anim; + + // And now override the animation values, if set in the config. + + var totalFrames = anim.getTotalFrames(); + var frameRate = GetFastValue(key, 'frameRate', anim.frameRate); + var duration = GetFastValue(key, 'duration', anim.duration); + + anim.calculateDuration(this, totalFrames, duration, frameRate); + + this.delay = GetFastValue(key, 'delay', anim.delay); + this.repeat = GetFastValue(key, 'repeat', anim.repeat); + this.repeatDelay = GetFastValue(key, 'repeatDelay', anim.repeatDelay); + this.yoyo = GetFastValue(key, 'yoyo', anim.yoyo); + this.showOnStart = GetFastValue(key, 'showOnStart', anim.showOnStart); + this.hideOnComplete = GetFastValue(key, 'hideOnComplete', anim.hideOnComplete); + this.skipMissedFrames = GetFastValue(key, 'skipMissedFrames', anim.skipMissedFrames); + + this.timeScale = GetFastValue(key, 'timeScale', this.timeScale); + + var startFrame = GetFastValue(key, 'startFrame', 0); + + if (startFrame > anim.getTotalFrames()) + { + startFrame = 0; + } + + var frame = anim.frames[startFrame]; + + if (startFrame === 0 && !this.forward) + { + frame = anim.getLastFrame(); + } + + this.currentFrame = frame; + } + + return this.parent; + }, + + /** + * Pause the current animation and set the `isPlaying` property to `false`. + * You can optionally pause it at a specific frame. + * + * @method Phaser.Animations.AnimationState#pause + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + pause: function (atFrame) + { + if (!this._paused) + { + this._paused = true; + this._wasPlaying = this.isPlaying; + this.isPlaying = false; + } + + if (atFrame !== undefined) + { + this.setCurrentFrame(atFrame); + } + + return this.parent; + }, + + /** + * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. + * You can optionally tell it to start playback from a specific frame. + * + * @method Phaser.Animations.AnimationState#resume + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + resume: function (fromFrame) + { + if (this._paused) + { + this._paused = false; + this.isPlaying = this._wasPlaying; + } + + if (fromFrame !== undefined) + { + this.setCurrentFrame(fromFrame); + } + + return this.parent; + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the given animation. + * + * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here. + * + * If an animation is already running and a new animation is given to this method, it will wait for + * the given delay before starting the new animation. + * + * If no animation is currently running, the given one begins after the delay. + * + * Prior to Phaser 3.50 this method was called 'delayedPlay' and the parameters were in the reverse order. + * + * @method Phaser.Animations.AnimationState#playAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playAfterDelay: function (key, delay) + { + if (!this.isPlaying) + { + this.delayCounter = delay; + + this.play(key, true); + } + else + { + // If we've got a nextAnim, move it to the queue + var nextAnim = this.nextAnim; + var queue = this.nextAnimsQueue; + + if (nextAnim) + { + queue.unshift(nextAnim); + } + + this.nextAnim = key; + + this._pendingStop = 1; + this._pendingStopValue = delay; + } + + return this.parent; + }, + + /** + * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback + * of the given animation. + * + * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an + * idle animation to a walking animation, by making them blend smoothly into each other. + * + * If no animation is currently running, the given one will start immediately. + * + * @method Phaser.Animations.AnimationState#playAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} [repeatCount=1] - How many times should the animation repeat before the next one starts? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playAfterRepeat: function (key, repeatCount) + { + if (repeatCount === undefined) { repeatCount = 1; } + + if (!this.isPlaying) + { + this.play(key); + } + else + { + // If we've got a nextAnim, move it to the queue + var nextAnim = this.nextAnim; + var queue = this.nextAnimsQueue; + + if (nextAnim) + { + queue.unshift(nextAnim); + } + + if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) + { + repeatCount = this.repeatCounter; + } + + this.nextAnim = key; + + this._pendingStop = 2; + this._pendingStopValue = repeatCount; + } + + return this.parent; + }, + + /** + * Start playing the given animation on this Sprite. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).play('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. + * + * @method Phaser.Animations.AnimationState#play + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.0.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + play: function (key, ignoreIfPlaying) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + + var currentAnim = this.currentAnim; + var parent = this.parent; + + // Must be either an Animation instance, or a PlayAnimationConfig object + var animKey = (typeof key === 'string') ? key : key.key; + + if (ignoreIfPlaying && this.isPlaying && currentAnim.key === animKey) + { + return parent; + } + + // Are we mixing? + if (currentAnim && this.isPlaying) + { + var mix = this.animationManager.getMix(currentAnim.key, key); + + if (mix > 0) + { + return this.playAfterDelay(key, mix); + } + } + + this.forward = true; + this.inReverse = false; + + this._paused = false; + this._wasPlaying = true; + + return this.startAnimation(key); + }, + + /** + * Start playing the given animation on this Sprite, in reverse. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).playReverse('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. + * + * @method Phaser.Animations.AnimationState#playReverse + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.12.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playReverse: function (key, ignoreIfPlaying) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + + // Must be either an Animation instance, or a PlayAnimationConfig object + var animKey = (typeof key === 'string') ? key : key.key; + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === animKey) + { + return this.parent; + } + + this.forward = false; + this.inReverse = true; + + this._paused = false; + this._wasPlaying = true; + + return this.startAnimation(key); + }, + + /** + * Load the animation based on the key and set-up all of the internal values + * needed for playback to start. If there is no delay, it will also fire the start events. + * + * @method Phaser.Animations.AnimationState#startAnimation + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + startAnimation: function (key) + { + this.load(key); + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + // Should give us 9,007,199,254,740,991 safe repeats + this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; + + anim.getFirstTick(this); + + this.isPlaying = true; + this.pendingRepeat = false; + this.hasStarted = false; + + this._pendingStop = 0; + this._pendingStopValue = 0; + this._paused = false; + + // Add any delay the animation itself may have had as well + this.delayCounter += this.delay; + + if (this.delayCounter === 0) + { + this.handleStart(); + } + + return gameObject; + }, + + /** + * Handles the start of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleStart + * @private + * @since 3.50.0 + */ + handleStart: function () + { + if (this.showOnStart) + { + this.parent.setVisible(true); + } + + this.setCurrentFrame(this.currentFrame); + + this.hasStarted = true; + + this.emitEvents(Events.ANIMATION_START); + }, + + /** + * Handles the repeat of an animation. + * + * @method Phaser.Animations.AnimationState#handleRepeat + * @private + * @since 3.50.0 + */ + handleRepeat: function () + { + this.pendingRepeat = false; + + this.emitEvents(Events.ANIMATION_REPEAT); + }, + + /** + * Handles the stop of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleStop + * @private + * @since 3.50.0 + */ + handleStop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + this.emitEvents(Events.ANIMATION_STOP); + }, + + /** + * Handles the completion of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleComplete + * @private + * @since 3.50.0 + */ + handleComplete: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.hideOnComplete) + { + this.parent.setVisible(false); + } + + this.emitEvents(Events.ANIMATION_COMPLETE, Events.ANIMATION_COMPLETE_KEY); + }, + + /** + * Fires the given animation event. + * + * @method Phaser.Animations.AnimationState#emitEvents + * @private + * @since 3.50.0 + * + * @param {string} event - The Animation Event to dispatch. + */ + emitEvents: function (event, keyEvent) + { + var anim = this.currentAnim; + var frame = this.currentFrame; + var gameObject = this.parent; + + var frameKey = frame.textureFrame; + + gameObject.emit(event, anim, frame, gameObject, frameKey); + + if (keyEvent) + { + gameObject.emit(keyEvent + anim.key, anim, frame, gameObject, frameKey); + } + }, + + /** + * Reverse the Animation that is already playing on the Game Object. + * + * @method Phaser.Animations.AnimationState#reverse + * @since 3.12.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + reverse: function () + { + if (this.isPlaying) + { + this.inReverse = !this.inReverse; + + this.forward = !this.forward; + } + + return this.parent; + }, + + /** + * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. + * + * The value is based on the current frame and how far that is in the animation, it is not based on + * the duration of the animation. + * + * @method Phaser.Animations.AnimationState#getProgress + * @since 3.4.0 + * + * @return {number} The progress of the current animation in frames, between 0 and 1. + */ + getProgress: function () + { + var frame = this.currentFrame; + + if (!frame) + { + return 0; + } + + var p = frame.progress; + + if (this.inReverse) + { + p *= -1; + } + + return p; + }, + + /** + * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. + * + * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. + * + * The value is based on the current frame and how far that is in the animation, it is not based on + * the duration of the animation. + * + * @method Phaser.Animations.AnimationState#setProgress + * @since 3.4.0 + * + * @param {number} [value=0] - The progress value, between 0 and 1. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setProgress: function (value) + { + if (!this.forward) + { + value = 1 - value; + } + + this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); + + return this.parent; + }, + + /** + * Sets the number of times that the animation should repeat after its first play through. + * For example, if repeat is 1, the animation will play a total of twice: the initial play plus 1 repeat. + * + * To repeat indefinitely, use -1. + * The value should always be an integer. + * + * Calling this method only works if the animation is already running. Otherwise, any + * value specified here will be overwritten when the next animation loads in. To avoid this, + * use the `repeat` property of the `PlayAnimationConfig` object instead. + * + * @method Phaser.Animations.AnimationState#setRepeat + * @since 3.4.0 + * + * @param {integer} value - The number of times that the animation should repeat. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeat: function (value) + { + this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; + + return this.parent; + }, + + /** + * Handle the removal of an animation from the Animation Manager. + * + * @method Phaser.Animations.AnimationState#globalRemove + * @since 3.50.0 + * + * @param {string} [key] - The key of the removed Animation. + * @param {Phaser.Animations.Animation} [animation] - The removed Animation. + */ + globalRemove: function (key, animation) + { + if (animation === undefined) { animation = this.currentAnim; } + + if (this.isPlaying && animation.key === this.currentAnim.key) + { + this.stop(); + + this.setCurrentFrame(this.currentAnim.frames[0]); + } + }, + + /** + * Restarts the current animation from its beginning. + * + * You can optionally reset the delay and repeat counters as well. + * + * Calling this will fire the `ANIMATION_RESTART` event immediately. + * + * If you `includeDelay` then it will also fire the `ANIMATION_START` event once + * the delay has expired, otherwise, playback will just begin immediately. + * + * @method Phaser.Animations.AnimationState#restart + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @since 3.0.0 + * + * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. + * @param {boolean} [resetRepeats=false] - Whether to reset the repeat counter or not? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + restart: function (includeDelay, resetRepeats) + { + if (includeDelay === undefined) { includeDelay = false; } + if (resetRepeats === undefined) { resetRepeats = false; } + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + if (resetRepeats) + { + this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; + } + + anim.getFirstTick(this); + + this.emitEvents(Events.ANIMATION_RESTART); + + this.isPlaying = true; + this.pendingRepeat = false; + + // Set this to `true` if there is no delay to include, so it skips the `hasStarted` check in `update`. + this.hasStarted = !includeDelay; + + this._pendingStop = 0; + this._pendingStopValue = 0; + this._paused = false; + + this.setCurrentFrame(anim.frames[0]); + + return this.parent; + }, + + /** + * The current animation has completed. This dispatches the `ANIMATION_COMPLETE` event. + * + * This method is called by the Animation instance and should not usually be invoked directly. + * + * If no animation is loaded, no events will be dispatched. + * + * If another animation has been queued for playback, it will be started after the events fire. + * + * @method Phaser.Animations.AnimationState#complete + * @fires Phaser.Animations.Events#ANIMATION_COMPLETE + * @since 3.50.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + complete: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.currentAnim) + { + this.handleComplete(); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; + + this.play(key); + } + + return this.parent; + }, + + /** + * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing. + * + * @method Phaser.Animations.AnimationState#stop + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.0.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.currentAnim) + { + this.handleStop(); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = this.nextAnimsQueue.shift(); + + this.play(key); + } + + return this.parent; + }, + + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.Animations.AnimationState#stopAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterDelay: function (delay) + { + this._pendingStop = 1; + this._pendingStopValue = delay; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next repeats. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * Prior to Phaser 3.50 this method was called `stopOnRepeat` and had no parameters. + * + * @method Phaser.Animations.AnimationState#stopAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterRepeat: function (repeatCount) + { + if (repeatCount === undefined) { repeatCount = 1; } + + if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) + { + repeatCount = this.repeatCounter; + } + + this._pendingStop = 2; + this._pendingStopValue = repeatCount; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.Animations.AnimationState#stopOnFrame + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnFrame: function (frame) + { + this._pendingStop = 3; + this._pendingStopValue = frame; + + return this.parent; + }, + + /** + * Returns the total number of frames in this animation, or returns zero if no + * animation has been loaded. + * + * @method Phaser.Animations.AnimationState#getTotalFrames + * @since 3.4.0 + * + * @return {integer} The total number of frames in the current animation, or zero if no animation has been loaded. + */ + getTotalFrames: function () + { + return (this.currentAnim) ? this.currentAnim.getTotalFrames() : 0; + }, + + /** + * The internal update loop for the AnimationState Component. + * + * This is called automatically by the `Sprite.preUpdate` method. + * + * @method Phaser.Animations.AnimationState#update + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + var anim = this.currentAnim; + + if (!this.isPlaying || !anim || anim.paused) + { + return; + } + + this.accumulator += delta * this.timeScale; + + if (this._pendingStop === 1) + { + this._pendingStopValue -= delta; + + if (this._pendingStopValue <= 0) + { + return this.stop(); + } + } + + if (!this.hasStarted) + { + if (this.accumulator >= this.delayCounter) + { + this.accumulator -= this.delayCounter; + + this.handleStart(); + } + } + else if (this.accumulator >= this.nextTick) + { + // Process one frame advance as standard + + if (this.forward) + { + anim.nextFrame(this); + } + else + { + anim.previousFrame(this); + } + + // And only do more if we're skipping frames and have time left + if (this.isPlaying && this._pendingStop === 0 && this.skipMissedFrames && this.accumulator > this.nextTick) + { + var safetyNet = 0; + + do + { + if (this.forward) + { + anim.nextFrame(this); + } + else + { + anim.previousFrame(this); + } + + safetyNet++; + + } while (this.accumulator > this.nextTick && safetyNet < 60); + } + } + }, + + /** + * Sets the given Animation Frame as being the current frame + * and applies it to the parent Game Object, adjusting size and origin as needed. + * + * @method Phaser.Animations.AnimationState#setCurrentFrame + * @fires Phaser.Animations.Events#ANIMATION_UPDATE + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setCurrentFrame: function (animationFrame) + { + var gameObject = this.parent; + + this.currentFrame = animationFrame; + + gameObject.texture = animationFrame.frame.texture; + gameObject.frame = animationFrame.frame; + + if (gameObject.isCropped) + { + gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); + } + + if (animationFrame.setAlpha) + { + gameObject.alpha = animationFrame.alpha; + } + + gameObject.setSizeToFrame(); + + if (gameObject._originComponent) + { + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } + } + + if (this.isPlaying && this.hasStarted) + { + this.emitEvents(Events.ANIMATION_UPDATE); + + if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) + { + this.stop(); + } + } + + return gameObject; + }, + + /** + * Advances the animation to the next frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in reverse, calling this method doesn't then change the direction to forwards. + * + * @method Phaser.Animations.AnimationState#nextFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + nextFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.nextFrame(this); + } + + return this.parent; + }, + + /** + * Advances the animation to the previous frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in forwards, calling this method doesn't then change the direction to backwards. + * + * @method Phaser.Animations.AnimationState#previousFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + previousFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.previousFrame(this); + } + + return this.parent; + }, + + /** + * Get an Animation instance that has been created locally on this Sprite. + * + * See the `create` method for more details. + * + * @method Phaser.Animations.AnimationState#get + * @since 3.50.0 + * + * @param {string} key - The key of the Animation to retrieve. + * + * @return {Phaser.Animations.Animation} The Animation, or `undefined` if the key is invalid. + */ + get: function (key) + { + return (this.anims && this.anims.get(key)); + }, + + /** + * Checks to see if the given key is already used locally within the animations stored on this Sprite. + * + * @method Phaser.Animations.AnimationState#exists + * @since 3.50.0 + * + * @param {string} key - The key of the Animation to check. + * + * @return {boolean} `true` if the Animation exists locally, or `false` if the key is available. + */ + exists: function (key) + { + return (this.anims && this.anims.has(key)); + }, + + /** + * Creates a new Animation that is local specifically to this Sprite. + * + * When a Sprite owns an animation, it is kept out of the global Animation Manager, which means + * you're free to use keys that may be already defined there. Unless you specifically need a Sprite + * to have a unique animation, you should favor using global animations instead, as they allow for + * the same animation to be used across multiple Sprites, saving on memory. However, if this Sprite + * is the only one to use this animation, it's sensible to create it here. + * + * If an invalid key is given this method will return `false`. + * + * If you pass the key of an animation that already exists locally, that animation will be returned. + * + * A brand new animation is only created if the key is valid and not already in use by this Sprite. + * + * If you wish to re-use an existing key, call the `remove` method first, then this method. + * + * @method Phaser.Animations.AnimationState#create + * @since 3.50.0 + * + * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. + * + * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` if the key is already in use. + */ + create: function (config) + { + var key = config.key; + + var anim = false; + + if (key) + { + anim = this.get(key); + + if (!anim) + { + anim = new Animation(this, key, config); + + if (!this.anims) + { + this.anims = new CustomMap(); + } + + this.anims.set(key, anim); + } + } + + return anim; + }, + + /** + * Removes a locally created Animation from this Sprite, based on the given key. + * + * Once an Animation has been removed, this Sprite cannot play it again without re-creating it. + * + * @method Phaser.Animations.AnimationState#remove + * @since 3.50.0 + * + * @param {string} key - The key of the animation to remove. + * + * @return {Phaser.Animations.Animation} The Animation instance that was removed from this Sprite, if the key was valid. + */ + remove: function (key) + { + var anim = this.get(key); + + if (anim) + { + if (this.currentAnim === anim) + { + this.stop(); + } + + this.anims.delete(key); + } + + return anim; + }, + + /** + * Destroy this Animation component. + * + * Unregisters event listeners and cleans up its references. + * + * @method Phaser.Animations.AnimationState#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.animationManager.off(Events.REMOVE_ANIMATION, this.globalRemove, this); + + if (this.anims) + { + this.anims.clear(); + } + + this.animationManager = null; + this.parent = null; + this.nextAnim = null; + this.nextAnimsQueue.length = 0; + + this.currentAnim = null; + this.currentFrame = null; + }, + + /** + * `true` if the current animation is paused, otherwise `false`. + * + * @name Phaser.Animations.AnimationState#isPaused + * @readonly + * @type {boolean} + * @since 3.4.0 + */ + isPaused: { + + get: function () + { + return this._paused; + } + + } + +}); + +module.exports = AnimationState; + + +/***/ }), +/* 158 */, +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -33312,7 +35164,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 158 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33356,7 +35208,7 @@ module.exports = Random; /***/ }), -/* 159 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33365,7 +35217,7 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(116); +var Perimeter = __webpack_require__(118); var Point = __webpack_require__(4); /** @@ -33437,7 +35289,7 @@ module.exports = GetPoint; /***/ }), -/* 160 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33502,7 +35354,7 @@ module.exports = GetPoints; /***/ }), -/* 161 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33542,7 +35394,7 @@ module.exports = Random; /***/ }), -/* 162 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33580,8 +35432,8 @@ module.exports = Random; /***/ }), -/* 163 */ -/***/ (function(module, exports) { +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -33589,6 +35441,8 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var PIPELINE_CONST = __webpack_require__(110); + /** * Provides methods used for setting the WebGL rendering pipeline of a Game Object. * @@ -33630,19 +35484,20 @@ var Pipeline = { * @webglOnly * @since 3.0.0 * - * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. + * @param {string} [name=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. * * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. */ - initPipeline: function (pipelineName) + initPipeline: function (name) { - if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } + if (name === undefined) { name = PIPELINE_CONST.MULTI_PIPELINE; } var renderer = this.scene.sys.game.renderer; + var pipelines = renderer.pipelines; - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + if (pipelines && pipelines.has(name)) { - this.defaultPipeline = renderer.getPipeline(pipelineName); + this.defaultPipeline = pipelines.get(name); this.pipeline = this.defaultPipeline; return true; @@ -33658,17 +35513,18 @@ var Pipeline = { * @webglOnly * @since 3.0.0 * - * @param {string} pipelineName - The name of the pipeline to set on this Game Object. + * @param {string} name - The name of the pipeline to set on this Game Object. * * @return {this} This Game Object instance. */ - setPipeline: function (pipelineName) + setPipeline: function (name) { var renderer = this.scene.sys.game.renderer; + var pipelines = renderer.pipelines; - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + if (pipelines && pipelines.has(name)) { - this.pipeline = renderer.getPipeline(pipelineName); + this.pipeline = pipelines.get(name); } return this; @@ -33710,7 +35566,7 @@ module.exports = Pipeline; /***/ }), -/* 164 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33765,7 +35621,7 @@ module.exports = TransformXY; /***/ }), -/* 165 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33806,7 +35662,7 @@ module.exports = Random; /***/ }), -/* 166 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33862,7 +35718,7 @@ module.exports = Random; /***/ }), -/* 167 */ +/* 169 */ /***/ (function(module, exports) { /** @@ -33903,7 +35759,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 168 */ +/* 170 */ /***/ (function(module, exports) { /** @@ -33942,7 +35798,7 @@ module.exports = SmootherStep; /***/ }), -/* 169 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -33989,7 +35845,7 @@ module.exports = SmoothStep; /***/ }), -/* 170 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34000,11 +35856,11 @@ module.exports = SmoothStep; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(120); -var FindClosestInSorted = __webpack_require__(297); -var Frame = __webpack_require__(298); +var Events = __webpack_require__(122); +var FindClosestInSorted = __webpack_require__(298); +var Frame = __webpack_require__(299); var GetValue = __webpack_require__(6); -var SortByDigits = __webpack_require__(299); +var SortByDigits = __webpack_require__(300); /** * @classdesc @@ -34903,7 +36759,7 @@ module.exports = Animation; /***/ }), -/* 171 */ +/* 173 */ /***/ (function(module, exports) { /** @@ -34979,7 +36835,7 @@ module.exports = Pad; /***/ }), -/* 172 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34988,10 +36844,10 @@ module.exports = Pad; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HexStringToColor = __webpack_require__(306); -var IntegerToColor = __webpack_require__(309); -var ObjectToColor = __webpack_require__(311); -var RGBStringToColor = __webpack_require__(312); +var HexStringToColor = __webpack_require__(307); +var IntegerToColor = __webpack_require__(310); +var ObjectToColor = __webpack_require__(312); +var RGBStringToColor = __webpack_require__(313); /** * Converts the given source color value into an instance of a Color class. @@ -35035,7 +36891,7 @@ module.exports = ValueToColor; /***/ }), -/* 173 */ +/* 175 */ /***/ (function(module, exports) { /** @@ -35065,7 +36921,7 @@ module.exports = GetColor; /***/ }), -/* 174 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35074,7 +36930,7 @@ module.exports = GetColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(173); +var GetColor = __webpack_require__(175); /** * RGB space conversion. @@ -35146,7 +37002,7 @@ module.exports = HSVToRGB; /***/ }), -/* 175 */ +/* 177 */ /***/ (function(module, exports) { /** @@ -35278,7 +37134,7 @@ module.exports = Smoothing(); /***/ }), -/* 176 */ +/* 178 */ /***/ (function(module, exports) { /** @@ -35315,7 +37171,7 @@ module.exports = CenterOn; /***/ }), -/* 177 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35324,8 +37180,8 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(124); -var Browser = __webpack_require__(125); +var OS = __webpack_require__(125); +var Browser = __webpack_require__(126); var CanvasPool = __webpack_require__(26); /** @@ -35507,7 +37363,7 @@ module.exports = init(); /***/ }), -/* 178 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35526,63 +37382,63 @@ var Extend = __webpack_require__(19); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(756), - Distance: __webpack_require__(765), - Easing: __webpack_require__(770), - Fuzzy: __webpack_require__(771), - Interpolation: __webpack_require__(774), - Pow2: __webpack_require__(779), - Snap: __webpack_require__(781), + Angle: __webpack_require__(760), + Distance: __webpack_require__(769), + Easing: __webpack_require__(774), + Fuzzy: __webpack_require__(775), + Interpolation: __webpack_require__(778), + Pow2: __webpack_require__(783), + Snap: __webpack_require__(785), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(783), + RandomDataGenerator: __webpack_require__(787), // Single functions - Average: __webpack_require__(784), - Bernstein: __webpack_require__(336), - Between: __webpack_require__(180), - CatmullRom: __webpack_require__(179), - CeilTo: __webpack_require__(785), + Average: __webpack_require__(788), + Bernstein: __webpack_require__(337), + Between: __webpack_require__(182), + CatmullRom: __webpack_require__(181), + CeilTo: __webpack_require__(789), Clamp: __webpack_require__(17), DegToRad: __webpack_require__(41), - Difference: __webpack_require__(786), - Factorial: __webpack_require__(337), - FloatBetween: __webpack_require__(126), - FloorTo: __webpack_require__(787), + Difference: __webpack_require__(790), + Factorial: __webpack_require__(338), + FloatBetween: __webpack_require__(127), + FloorTo: __webpack_require__(791), FromPercent: __webpack_require__(89), - GetSpeed: __webpack_require__(788), - IsEven: __webpack_require__(789), - IsEvenStrict: __webpack_require__(790), - Linear: __webpack_require__(123), - MaxAdd: __webpack_require__(791), - MinSub: __webpack_require__(792), - Percent: __webpack_require__(793), - RadToDeg: __webpack_require__(181), - RandomXY: __webpack_require__(794), - RandomXYZ: __webpack_require__(795), - RandomXYZW: __webpack_require__(796), - Rotate: __webpack_require__(343), - RotateAround: __webpack_require__(284), - RotateAroundDistance: __webpack_require__(167), - RotateTo: __webpack_require__(797), - RoundAwayFromZero: __webpack_require__(344), - RoundTo: __webpack_require__(798), - SinCosTableGenerator: __webpack_require__(799), - SmootherStep: __webpack_require__(168), - SmoothStep: __webpack_require__(169), - ToXY: __webpack_require__(800), - TransformXY: __webpack_require__(164), - Within: __webpack_require__(801), + GetSpeed: __webpack_require__(792), + IsEven: __webpack_require__(793), + IsEvenStrict: __webpack_require__(794), + Linear: __webpack_require__(124), + MaxAdd: __webpack_require__(795), + MinSub: __webpack_require__(796), + Percent: __webpack_require__(797), + RadToDeg: __webpack_require__(183), + RandomXY: __webpack_require__(798), + RandomXYZ: __webpack_require__(799), + RandomXYZW: __webpack_require__(800), + Rotate: __webpack_require__(344), + RotateAround: __webpack_require__(285), + RotateAroundDistance: __webpack_require__(169), + RotateTo: __webpack_require__(801), + RoundAwayFromZero: __webpack_require__(345), + RoundTo: __webpack_require__(802), + SinCosTableGenerator: __webpack_require__(803), + SmootherStep: __webpack_require__(170), + SmoothStep: __webpack_require__(171), + ToXY: __webpack_require__(804), + TransformXY: __webpack_require__(166), + Within: __webpack_require__(805), Wrap: __webpack_require__(59), // Vector classes Vector2: __webpack_require__(3), Vector3: __webpack_require__(81), - Vector4: __webpack_require__(128), - Matrix3: __webpack_require__(345), - Matrix4: __webpack_require__(346), - Quaternion: __webpack_require__(347), - RotateVec3: __webpack_require__(802) + Vector4: __webpack_require__(129), + Matrix3: __webpack_require__(346), + Matrix4: __webpack_require__(347), + Quaternion: __webpack_require__(348), + RotateVec3: __webpack_require__(806) }; @@ -35596,7 +37452,7 @@ module.exports = PhaserMath; /***/ }), -/* 179 */ +/* 181 */ /***/ (function(module, exports) { /** @@ -35633,7 +37489,7 @@ module.exports = CatmullRom; /***/ }), -/* 180 */ +/* 182 */ /***/ (function(module, exports) { /** @@ -35662,7 +37518,7 @@ module.exports = Between; /***/ }), -/* 181 */ +/* 183 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35692,7 +37548,7 @@ module.exports = RadToDeg; /***/ }), -/* 182 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35793,7 +37649,7 @@ module.exports = DefaultPlugins; /***/ }), -/* 183 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -35851,7 +37707,7 @@ module.exports = ProjectOrtho; /***/ }), -/* 184 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35937,7 +37793,7 @@ module.exports = FromPoints; /***/ }), -/* 185 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35948,10 +37804,10 @@ module.exports = FromPoints; var CONST = { - CENTER: __webpack_require__(369), - ORIENTATION: __webpack_require__(370), - SCALE_MODE: __webpack_require__(371), - ZOOM: __webpack_require__(372) + CENTER: __webpack_require__(370), + ORIENTATION: __webpack_require__(371), + SCALE_MODE: __webpack_require__(372), + ZOOM: __webpack_require__(373) }; @@ -35959,7 +37815,7 @@ module.exports = CONST; /***/ }), -/* 186 */ +/* 188 */ /***/ (function(module, exports) { /** @@ -35988,7 +37844,7 @@ module.exports = RemoveFromDOM; /***/ }), -/* 187 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -36086,7 +37942,7 @@ module.exports = INPUT_CONST; /***/ }), -/* 188 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36096,13 +37952,13 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(132); -var DefaultPlugins = __webpack_require__(182); +var CONST = __webpack_require__(133); +var DefaultPlugins = __webpack_require__(184); var Events = __webpack_require__(20); -var GetPhysicsPlugins = __webpack_require__(385); -var GetScenePlugins = __webpack_require__(386); +var GetPhysicsPlugins = __webpack_require__(386); +var GetScenePlugins = __webpack_require__(387); var NOOP = __webpack_require__(1); -var Settings = __webpack_require__(387); +var Settings = __webpack_require__(388); /** * @classdesc @@ -36860,7 +38716,7 @@ module.exports = Systems; /***/ }), -/* 189 */ +/* 191 */ /***/ (function(module, exports) { /** @@ -36897,7 +38753,7 @@ module.exports = UppercaseFirst; /***/ }), -/* 190 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36907,8 +38763,8 @@ module.exports = UppercaseFirst; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(96); -var TextureSource = __webpack_require__(390); +var Frame = __webpack_require__(97); +var TextureSource = __webpack_require__(391); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -37417,7 +39273,7 @@ module.exports = Texture; /***/ }), -/* 191 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37479,7 +39335,7 @@ module.exports = GetAll; /***/ }), -/* 192 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37494,46 +39350,46 @@ module.exports = GetAll; module.exports = { - Matrix: __webpack_require__(938), + Matrix: __webpack_require__(942), - Add: __webpack_require__(945), - AddAt: __webpack_require__(946), - BringToTop: __webpack_require__(947), - CountAllMatching: __webpack_require__(948), - Each: __webpack_require__(949), - EachInRange: __webpack_require__(950), - FindClosestInSorted: __webpack_require__(297), - GetAll: __webpack_require__(191), - GetFirst: __webpack_require__(394), - GetRandom: __webpack_require__(194), - MoveDown: __webpack_require__(951), - MoveTo: __webpack_require__(952), - MoveUp: __webpack_require__(953), - NumberArray: __webpack_require__(301), - NumberArrayStep: __webpack_require__(954), - QuickSelect: __webpack_require__(402), - Range: __webpack_require__(403), - Remove: __webpack_require__(95), - RemoveAt: __webpack_require__(955), - RemoveBetween: __webpack_require__(956), - RemoveRandomElement: __webpack_require__(957), - Replace: __webpack_require__(958), - RotateLeft: __webpack_require__(294), - RotateRight: __webpack_require__(295), + Add: __webpack_require__(949), + AddAt: __webpack_require__(950), + BringToTop: __webpack_require__(951), + CountAllMatching: __webpack_require__(952), + Each: __webpack_require__(953), + EachInRange: __webpack_require__(954), + FindClosestInSorted: __webpack_require__(298), + GetAll: __webpack_require__(193), + GetFirst: __webpack_require__(395), + GetRandom: __webpack_require__(196), + MoveDown: __webpack_require__(955), + MoveTo: __webpack_require__(956), + MoveUp: __webpack_require__(957), + NumberArray: __webpack_require__(302), + NumberArrayStep: __webpack_require__(958), + QuickSelect: __webpack_require__(403), + Range: __webpack_require__(404), + Remove: __webpack_require__(96), + RemoveAt: __webpack_require__(959), + RemoveBetween: __webpack_require__(960), + RemoveRandomElement: __webpack_require__(961), + Replace: __webpack_require__(962), + RotateLeft: __webpack_require__(295), + RotateRight: __webpack_require__(296), SafeRange: __webpack_require__(70), - SendToBack: __webpack_require__(959), - SetAll: __webpack_require__(960), - Shuffle: __webpack_require__(119), - SortByDigits: __webpack_require__(299), + SendToBack: __webpack_require__(963), + SetAll: __webpack_require__(964), + Shuffle: __webpack_require__(121), + SortByDigits: __webpack_require__(300), SpliceOne: __webpack_require__(82), - StableSort: __webpack_require__(138), - Swap: __webpack_require__(961) + StableSort: __webpack_require__(139), + Swap: __webpack_require__(965) }; /***/ }), -/* 193 */ +/* 195 */ /***/ (function(module, exports) { /** @@ -37594,7 +39450,7 @@ module.exports = CheckMatrix; /***/ }), -/* 194 */ +/* 196 */ /***/ (function(module, exports) { /** @@ -37629,7 +39485,7 @@ module.exports = GetRandom; /***/ }), -/* 195 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37640,7 +39496,7 @@ module.exports = GetRandom; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(404); +var Events = __webpack_require__(405); /** * @classdesc @@ -37932,7 +39788,7 @@ module.exports = ProcessQueue; /***/ }), -/* 196 */ +/* 198 */ /***/ (function(module, exports) { /** @@ -38093,7 +39949,7 @@ module.exports = ParseXMLBitmapFont; /***/ }), -/* 197 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38102,13 +39958,13 @@ module.exports = ParseXMLBitmapFont; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(971); -var Bob = __webpack_require__(406); +var BlitterRender = __webpack_require__(975); +var Bob = __webpack_require__(407); var Class = __webpack_require__(0); var Components = __webpack_require__(11); -var Frame = __webpack_require__(96); +var Frame = __webpack_require__(97); var GameObject = __webpack_require__(14); -var List = __webpack_require__(136); +var List = __webpack_require__(137); /** * @callback CreateCallback @@ -38392,7 +40248,7 @@ module.exports = Blitter; /***/ }), -/* 198 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38402,7 +40258,7 @@ module.exports = Blitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(192); +var ArrayUtils = __webpack_require__(194); var BlendModes = __webpack_require__(54); var Class = __webpack_require__(0); var Components = __webpack_require__(11); @@ -38410,8 +40266,8 @@ var Events = __webpack_require__(29); var GameObject = __webpack_require__(14); var GameObjectEvents = __webpack_require__(29); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(974); -var Union = __webpack_require__(407); +var Render = __webpack_require__(978); +var Union = __webpack_require__(408); var Vector2 = __webpack_require__(3); /** @@ -39757,7 +41613,7 @@ module.exports = Container; /***/ }), -/* 199 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39766,9 +41622,9 @@ module.exports = Container; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(139); +var BitmapText = __webpack_require__(140); var Class = __webpack_require__(0); -var Render = __webpack_require__(979); +var Render = __webpack_require__(983); /** * @classdesc @@ -39990,7 +41846,7 @@ module.exports = DynamicBitmapText; /***/ }), -/* 200 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39999,26 +41855,26 @@ module.exports = DynamicBitmapText; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(92); +var BaseCamera = __webpack_require__(93); var Class = __webpack_require__(0); -var Commands = __webpack_require__(201); -var ComponentsAlpha = __webpack_require__(279); -var ComponentsBlendMode = __webpack_require__(280); -var ComponentsDepth = __webpack_require__(281); -var ComponentsMask = __webpack_require__(285); -var ComponentsPipeline = __webpack_require__(163); -var ComponentsTransform = __webpack_require__(290); -var ComponentsVisible = __webpack_require__(291); -var ComponentsScrollFactor = __webpack_require__(288); +var Commands = __webpack_require__(203); +var ComponentsAlpha = __webpack_require__(280); +var ComponentsBlendMode = __webpack_require__(281); +var ComponentsDepth = __webpack_require__(282); +var ComponentsMask = __webpack_require__(286); +var ComponentsPipeline = __webpack_require__(165); +var ComponentsTransform = __webpack_require__(291); +var ComponentsVisible = __webpack_require__(292); +var ComponentsScrollFactor = __webpack_require__(289); var TransformMatrix = __webpack_require__(31); -var Ellipse = __webpack_require__(97); +var Ellipse = __webpack_require__(98); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(985); +var Render = __webpack_require__(989); /** * @classdesc @@ -41544,7 +43400,7 @@ module.exports = Graphics; /***/ }), -/* 201 */ +/* 203 */ /***/ (function(module, exports) { /** @@ -41581,7 +43437,7 @@ module.exports = { /***/ }), -/* 202 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41623,7 +43479,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 203 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41636,10 +43492,10 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GameObjectEvents = __webpack_require__(29); -var GravityWell = __webpack_require__(416); -var List = __webpack_require__(136); -var ParticleEmitter = __webpack_require__(418); -var Render = __webpack_require__(994); +var GravityWell = __webpack_require__(417); +var List = __webpack_require__(137); +var ParticleEmitter = __webpack_require__(419); +var Render = __webpack_require__(998); /** * @classdesc @@ -42128,7 +43984,7 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 204 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42138,18 +43994,18 @@ module.exports = ParticleEmitterManager; */ var BlendModes = __webpack_require__(54); -var Camera = __webpack_require__(92); +var Camera = __webpack_require__(93); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(11); var CONST = __webpack_require__(34); -var Frame = __webpack_require__(96); +var Frame = __webpack_require__(97); var GameObject = __webpack_require__(14); var NOOP = __webpack_require__(1); -var ProjectOrtho = __webpack_require__(183); -var Render = __webpack_require__(998); +var ProjectOrtho = __webpack_require__(185); +var Render = __webpack_require__(1002); var Utils = __webpack_require__(10); -var UUID = __webpack_require__(205); +var UUID = __webpack_require__(207); /** * @classdesc @@ -43400,7 +45256,7 @@ module.exports = RenderTexture; /***/ }), -/* 205 */ +/* 207 */ /***/ (function(module, exports) { /** @@ -43435,7 +45291,7 @@ module.exports = UUID; /***/ }), -/* 206 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43444,11 +45300,13 @@ module.exports = UUID; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var AnimationState = __webpack_require__(157); var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GameObjectEvents = __webpack_require__(29); -var RopeRender = __webpack_require__(1004); +var PIPELINE_CONST = __webpack_require__(110); +var RopeRender = __webpack_require__(1008); var Vector2 = __webpack_require__(3); /** @@ -43523,13 +45381,13 @@ var Rope = new Class({ GameObject.call(this, scene, 'Rope'); /** - * The Animation Controller of this Rope. + * The Animation State of this Rope. * * @name Phaser.GameObjects.Rope#anims - * @type {Phaser.GameObjects.Components.Animation} + * @type {Phaser.Animation.AnimationState} * @since 3.23.0 */ - this.anims = new Components.Animation(this); + this.anims = new AnimationState(this); /** * An array containing the points data for this Rope. @@ -43714,7 +45572,7 @@ var Rope = new Class({ this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); - this.initPipeline('RopePipeline'); + this.initPipeline(PIPELINE_CONST.ROPE_PIPELINE); if (Array.isArray(points)) { @@ -44564,7 +46422,7 @@ module.exports = Rope; /***/ }), -/* 207 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44573,17 +46431,17 @@ module.exports = Rope; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(130); +var AddToDOM = __webpack_require__(131); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var GetTextSize = __webpack_require__(424); +var GetTextSize = __webpack_require__(425); var GetValue = __webpack_require__(6); -var RemoveFromDOM = __webpack_require__(186); -var TextRender = __webpack_require__(1007); -var TextStyle = __webpack_require__(425); +var RemoveFromDOM = __webpack_require__(188); +var TextRender = __webpack_require__(1011); +var TextStyle = __webpack_require__(426); /** * @classdesc @@ -45976,7 +47834,7 @@ module.exports = Text; /***/ }), -/* 208 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45990,9 +47848,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var GetPowerOfTwo = __webpack_require__(341); -var Smoothing = __webpack_require__(175); -var TileSpriteRender = __webpack_require__(1010); +var GetPowerOfTwo = __webpack_require__(342); +var Smoothing = __webpack_require__(177); +var TileSpriteRender = __webpack_require__(1014); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -46628,7 +48486,7 @@ module.exports = TileSprite; /***/ }), -/* 209 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46644,8 +48502,8 @@ var Events = __webpack_require__(29); var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); var SoundEvents = __webpack_require__(61); -var UUID = __webpack_require__(205); -var VideoRender = __webpack_require__(1013); +var UUID = __webpack_require__(207); +var VideoRender = __webpack_require__(1017); var MATH_CONST = __webpack_require__(13); /** @@ -48397,7 +50255,7 @@ module.exports = Video; /***/ }), -/* 210 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48407,8 +50265,8 @@ module.exports = Video; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(211); -var GetPoints = __webpack_require__(436); +var Contains = __webpack_require__(213); +var GetPoints = __webpack_require__(437); var GEOM_CONST = __webpack_require__(49); /** @@ -48631,7 +50489,7 @@ module.exports = Polygon; /***/ }), -/* 211 */ +/* 213 */ /***/ (function(module, exports) { /** @@ -48680,7 +50538,7 @@ module.exports = Contains; /***/ }), -/* 212 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48690,7 +50548,7 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(141); +var Mesh = __webpack_require__(142); /** * @classdesc @@ -49341,7 +51199,7 @@ module.exports = Quad; /***/ }), -/* 213 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49355,51 +51213,51 @@ var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var Extend = __webpack_require__(19); -var SetValue = __webpack_require__(444); -var ShaderRender = __webpack_require__(1096); +var SetValue = __webpack_require__(445); +var ShaderRender = __webpack_require__(1100); var TransformMatrix = __webpack_require__(31); /** * @classdesc * A Shader Game Object. - * + * * This Game Object allows you to easily add a quad with its own shader into the display list, and manipulate it * as you would any other Game Object, including scaling, rotating, positioning and adding to Containers. Shaders * can be masked with either Bitmap or Geometry masks and can also be used as a Bitmap Mask for a Camera or other * Game Object. They can also be made interactive and used for input events. - * + * * It works by taking a reference to a `Phaser.Display.BaseShader` instance, as found in the Shader Cache. These can * be created dynamically at runtime, or loaded in via the GLSL File Loader: - * + * * ```javascript * function preload () * { * this.load.glsl('fire', 'shaders/fire.glsl.js'); * } - * + * * function create () * { * this.add.shader('fire', 400, 300, 512, 512); * } * ``` - * + * * Please see the Phaser 3 Examples GitHub repo for examples of loading and creating shaders dynamically. - * + * * Due to the way in which they work, you cannot directly change the alpha or blend mode of a Shader. This should * be handled via exposed uniforms in the shader code itself. - * + * * By default a Shader will be created with a standard set of uniforms. These were added to match those * found on sites such as ShaderToy or GLSLSandbox, and provide common functionality a shader may need, * such as the timestamp, resolution or pointer position. You can replace them by specifying your own uniforms * in the Base Shader. - * + * * These Shaders work by halting the current pipeline during rendering, creating a viewport matched to the * size of this Game Object and then renders a quad using the bound shader. At the end, the pipeline is restored. - * + * * Because it blocks the pipeline it means it will interrupt any batching that is currently going on, so you should * use these Game Objects sparingly. If you need to have a fully batched custom shader, then please look at using * a custom pipeline instead. However, for background or special masking effects, they are extremely effective. - * + * * @class Shader * @extends Phaser.GameObjects.GameObject * @memberof Phaser.GameObjects @@ -49454,7 +51312,7 @@ var Shader = new Class({ /** * This Game Object cannot have a blend mode, so skip all checks. - * + * * @name Phaser.GameObjects.Shader#blendMode * @type {integer} * @private @@ -49465,7 +51323,7 @@ var Shader = new Class({ /** * The underlying shader object being used. * Empty by default and set during a call to the `setShader` method. - * + * * @name Phaser.GameObjects.Shader#shader * @type {Phaser.Display.BaseShader} * @since 3.17.0 @@ -49477,7 +51335,7 @@ var Shader = new Class({ /** * A reference to the current renderer. * Shaders only work with the WebGL Renderer. - * + * * @name Phaser.GameObjects.Shader#renderer * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} * @since 3.17.0 @@ -49570,7 +51428,7 @@ var Shader = new Class({ /** * The view matrix the shader uses during rendering. - * + * * @name Phaser.GameObjects.Shader#viewMatrix * @type {Float32Array} * @readonly @@ -49580,7 +51438,7 @@ var Shader = new Class({ /** * The projection matrix the shader uses during rendering. - * + * * @name Phaser.GameObjects.Shader#projectionMatrix * @type {Float32Array} * @readonly @@ -49591,16 +51449,16 @@ var Shader = new Class({ /** * The default uniform mappings. These can be added to (or replaced) by specifying your own uniforms when * creating this shader game object. The uniforms are updated automatically during the render step. - * + * * The defaults are: - * + * * `resolution` (2f) - Set to the size of this shader. * `time` (1f) - The elapsed game time, in seconds. * `mouse` (2f) - If a pointer has been bound (with `setPointer`), this uniform contains its position each frame. * `date` (4fv) - A vec4 containing the year, month, day and time in seconds. * `sampleRate` (1f) - Sound sample rate. 44100 by default. * `iChannel0...3` (sampler2D) - Input channels 0 to 3. `null` by default. - * + * * @name Phaser.GameObjects.Shader#uniforms * @type {any} * @since 3.17.0 @@ -49610,7 +51468,7 @@ var Shader = new Class({ /** * The pointer bound to this shader, if any. * Set via the chainable `setPointer` method, or by modifying this property directly. - * + * * @name Phaser.GameObjects.Shader#pointer * @type {Phaser.Input.Pointer} * @since 3.17.0 @@ -49619,7 +51477,7 @@ var Shader = new Class({ /** * The cached width of the renderer. - * + * * @name Phaser.GameObjects.Shader#_rendererWidth * @type {number} * @private @@ -49629,7 +51487,7 @@ var Shader = new Class({ /** * The cached height of the renderer. - * + * * @name Phaser.GameObjects.Shader#_rendererHeight * @type {number} * @private @@ -49639,7 +51497,7 @@ var Shader = new Class({ /** * Internal texture count tracker. - * + * * @name Phaser.GameObjects.Shader#_textureCount * @type {number} * @private @@ -49669,9 +51527,9 @@ var Shader = new Class({ /** * A flag that indicates if this Shader has been set to render to a texture instead of the display list. - * + * * This property is `true` if you have called `Shader.setRenderToTexture`, otherwise it's `false`. - * + * * A Shader that is rendering to a texture _does not_ appear on the display list. * * @name Phaser.GameObjects.Shader#renderToTexture @@ -49683,7 +51541,7 @@ var Shader = new Class({ /** * A reference to the Phaser.Textures.Texture that has been stored in the Texture Manager for this Shader. - * + * * This property is only set if you have called `Shader.setRenderToTexture`, otherwise it is `null`. * * @name Phaser.GameObjects.Shader#texture @@ -49726,28 +51584,28 @@ var Shader = new Class({ * WebGL Framebuffer and WebGL Texture instead. This allows you to use the output * of this shader as an input for another shader, by mapping a sampler2D uniform * to it. - * + * * After calling this method the `Shader.framebuffer` and `Shader.glTexture` properties * are populated. - * + * * Additionally, you can provide a key to this method. Doing so will create a Phaser Texture * from this Shader and save it into the Texture Manager, allowing you to then use it for * any texture-based Game Object, such as a Sprite or Image: - * + * * ```javascript * var shader = this.add.shader('myShader', x, y, width, height); - * + * * shader.setRenderToTexture('doodle'); - * + * * this.add.image(400, 300, 'doodle'); * ``` - * + * * Note that it stores an active reference to this Shader. That means as this shader updates, * so does the texture and any object using it to render with. Also, if you destroy this * shader, be sure to clear any objects that may have been using it as a texture too. - * + * * You can access the Phaser Texture that is created via the `Shader.texture` property. - * + * * By default it will create a single base texture. You can add frames to the texture * by using the `Texture.add` method. After doing this, you can then allow Game Objects * to use a specific frame from a Render Texture. @@ -49793,16 +51651,14 @@ var Shader = new Class({ if (this.shader) { - var pipeline = renderer.currentPipeline; + renderer.pipelines.clear(); - renderer.clearPipeline(); - this.load(); this.flush(); - - renderer.rebindPipeline(pipeline); + + renderer.pipelines.rebind(); } - + return this; }, @@ -49813,11 +51669,11 @@ var Shader = new Class({ * * @method Phaser.GameObjects.Shader#setShader * @since 3.17.0 - * + * * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance. * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setShader: function (key, textures, textureData) @@ -49833,7 +51689,7 @@ var Shader = new Class({ console.warn('Shader missing: ' + key); return this; } - + this.shader = cache.get(key); } else @@ -49872,7 +51728,7 @@ var Shader = new Class({ iChannel2: { type: 'sampler2D', value: null, textureData: { repeat: true } }, iChannel3: { type: 'sampler2D', value: null, textureData: { repeat: true } } }; - + if (this.shader.uniforms) { this.uniforms = Extend(true, {}, this.shader.uniforms, defaultUniforms); @@ -49899,15 +51755,15 @@ var Shader = new Class({ /** * Binds a Phaser Pointer object to this Shader. - * + * * The screen position of the pointer will be set in to the shaders `mouse` uniform * automatically every frame. Call this method with no arguments to unbind the pointer. * * @method Phaser.GameObjects.Shader#setPointer * @since 3.17.0 - * + * * @param {Phaser.Input.Pointer} [pointer] - The Pointer to bind to this shader. - * + * * @return {this} This Shader instance. */ setPointer: function (pointer) @@ -49921,7 +51777,7 @@ var Shader = new Class({ * Sets this shader to use an orthographic projection matrix. * This matrix is stored locally in the `projectionMatrix` property, * as well as being bound to the `uProjectionMatrix` uniform. - * + * * @method Phaser.GameObjects.Shader#projOrtho * @since 3.17.0 * @@ -49961,7 +51817,7 @@ var Shader = new Class({ /** * Initializes all of the uniforms this shader uses. - * + * * @method Phaser.GameObjects.Shader#initUniforms * @private * @since 3.17.0 @@ -49994,33 +51850,33 @@ var Shader = new Class({ /** * Sets a sampler2D uniform on this shader where the source texture is a WebGLTexture. - * + * * This allows you to feed the output from one Shader into another: - * + * * ```javascript * let shader1 = this.add.shader(baseShader1, 0, 0, 512, 512).setRenderToTexture(); * let shader2 = this.add.shader(baseShader2, 0, 0, 512, 512).setRenderToTexture('output'); - * + * * shader1.setSampler2DBuffer('iChannel0', shader2.glTexture, 512, 512); * shader2.setSampler2DBuffer('iChannel0', shader1.glTexture, 512, 512); * ``` - * + * * In the above code, the result of baseShader1 is fed into Shader2 as the `iChannel0` sampler2D uniform. * The result of baseShader2 is then fed back into shader1 again, creating a feedback loop. - * + * * If you wish to use an image from the Texture Manager as a sampler2D input for this shader, * see the `Shader.setSampler2D` method. - * + * * @method Phaser.GameObjects.Shader#setSampler2DBuffer * @since 3.19.0 - * + * * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`. * @param {WebGLTexture} texture - A WebGLTexture reference. * @param {integer} width - The width of the texture. * @param {integer} height - The height of the texture. * @param {integer} [textureIndex=0] - The texture index. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setSampler2DBuffer: function (uniformKey, texture, width, height, textureIndex, textureData) @@ -50046,20 +51902,20 @@ var Shader = new Class({ /** * Sets a sampler2D uniform on this shader. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * If you wish to use another Shader as a sampler2D input for this shader, see the `Shader.setSampler2DBuffer` method. - * + * * @method Phaser.GameObjects.Shader#setSampler2D * @since 3.17.0 - * + * * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`. * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {integer} [textureIndex=0] - The texture index. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setSampler2D: function (uniformKey, textureKey, textureIndex, textureData) @@ -50104,27 +51960,27 @@ var Shader = new Class({ /** * Sets a property of a uniform already present on this shader. - * + * * To modify the value of a uniform such as a 1f or 1i use the `value` property directly: - * + * * ```javascript * shader.setUniform('size.value', 16); * ``` - * + * * You can use dot notation to access deeper values, for example: - * + * * ```javascript * shader.setUniform('resolution.value.x', 512); * ``` - * + * * The change to the uniform will take effect the next time the shader is rendered. - * + * * @method Phaser.GameObjects.Shader#setUniform * @since 3.17.0 - * + * * @param {string} key - The key of the uniform to modify. Use dots for deep properties, i.e. `resolution.value.x`. * @param {any} value - The value to set into the uniform. - * + * * @return {this} This Shader instance. */ setUniform: function (key, value) @@ -50136,12 +51992,12 @@ var Shader = new Class({ /** * Returns the uniform object for the given key, or `null` if the uniform couldn't be found. - * + * * @method Phaser.GameObjects.Shader#getUniform * @since 3.17.0 - * + * * @param {string} key - The key of the uniform to return the value for. - * + * * @return {any} A reference to the uniform object. This is not a copy, so modifying it will update the original object also. */ getUniform: function (key) @@ -50151,16 +52007,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel0` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel0 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel0: function (textureKey, textureData) @@ -50170,16 +52026,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel1` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel1 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel1: function (textureKey, textureData) @@ -50189,16 +52045,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel2` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel2 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel2: function (textureKey, textureData) @@ -50208,16 +52064,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel3` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel3 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel3: function (textureKey, textureData) @@ -50228,11 +52084,11 @@ var Shader = new Class({ /** * Internal method that takes a sampler2D uniform and prepares it for use by setting the * gl texture parameters. - * + * * @method Phaser.GameObjects.Shader#initSampler2D * @private * @since 3.17.0 - * + * * @param {any} uniform - The sampler2D uniform to process. */ initSampler2D: function (uniform) @@ -50246,7 +52102,7 @@ var Shader = new Class({ gl.activeTexture(gl.TEXTURE0 + this._textureCount); gl.bindTexture(gl.TEXTURE_2D, uniform.value); - + // Extended texture data var data = uniform.textureData; @@ -50254,11 +52110,11 @@ var Shader = new Class({ if (data) { // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D - + // mag / minFilter can be: gl.LINEAR, gl.LINEAR_MIPMAP_LINEAR or gl.NEAREST // wrapS/T can be: gl.CLAMP_TO_EDGE or gl.REPEAT // format can be: gl.LUMINANCE or gl.RGBA - + var magFilter = gl[GetFastValue(data, 'magFilter', 'linear').toUpperCase()]; var minFilter = gl[GetFastValue(data, 'minFilter', 'linear').toUpperCase()]; var wrapS = gl[GetFastValue(data, 'wrapS', 'repeat').toUpperCase()]; @@ -50278,7 +52134,7 @@ var Shader = new Class({ var width = GetFastValue(data, 'width', 512); var height = GetFastValue(data, 'height', 2); var border = GetFastValue(data, 'border', 0); - + // texImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, ArrayBufferView? pixels) gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, border, format, gl.UNSIGNED_BYTE, null); } @@ -50287,7 +52143,7 @@ var Shader = new Class({ // texImage2D(GLenum target, GLint level, GLenum internalformat, GLenum format, GLenum type, ImageData? pixels) gl.texImage2D(gl.TEXTURE_2D, 0, format, gl.RGBA, gl.UNSIGNED_BYTE, uniform.source); } - + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrapS); @@ -50295,16 +52151,16 @@ var Shader = new Class({ } this.renderer.setProgram(this.program); - + gl.uniform1i(uniform.uniformLocation, this._textureCount); - + this._textureCount++; }, /** * Synchronizes all of the uniforms this shader uses. * Each uniforms gl function is called in turn. - * + * * @method Phaser.GameObjects.Shader#syncUniforms * @private * @since 3.17.0 @@ -50320,7 +52176,7 @@ var Shader = new Class({ var location; var value; var textureCount = 0; - + for (var key in uniforms) { uniform = uniforms[key]; @@ -50373,14 +52229,14 @@ var Shader = new Class({ /** * Called automatically during render. - * + * * This method performs matrix ITRS and then stores the resulting value in the `uViewMatrix` uniform. * It then sets up the vertex buffer and shader, updates and syncs the uniforms ready * for flush to be called. - * + * * @method Phaser.GameObjects.Shader#load * @since 3.17.0 - * + * * @param {Phaser.GameObjects.Components.TransformMatrix} [matrix2D] - The transform matrix to use during rendering. */ load: function (matrix2D) @@ -50398,7 +52254,7 @@ var Shader = new Class({ { var x = -this._displayOriginX; var y = -this._displayOriginY; - + vm[0] = matrix2D[0]; vm[1] = matrix2D[1]; vm[4] = matrix2D[2]; @@ -50434,7 +52290,7 @@ var Shader = new Class({ var px = pointer.x / width; var py = 1 - pointer.y / height; - + mouse.value.x = px.toFixed(2); mouse.value.y = py.toFixed(2); } @@ -50444,9 +52300,9 @@ var Shader = new Class({ /** * Called automatically during render. - * + * * Sets the active shader, loads the vertex buffer and then draws. - * + * * @method Phaser.GameObjects.Shader#flush * @since 3.17.0 */ @@ -50519,7 +52375,7 @@ var Shader = new Class({ setAlpha: function () { }, - + /** * A NOOP method so you can pass a Shader to a Container. * Calling this method will do nothing. It is intentionally empty. @@ -50564,7 +52420,7 @@ module.exports = Shader; /***/ }), -/* 214 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50595,7 +52451,7 @@ module.exports = CircleToCircle; /***/ }), -/* 215 */ +/* 217 */ /***/ (function(module, exports) { /** @@ -50649,7 +52505,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 216 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50660,7 +52516,7 @@ module.exports = CircleToRectangle; */ var Point = __webpack_require__(4); -var LineToCircle = __webpack_require__(217); +var LineToCircle = __webpack_require__(219); /** * Checks for intersection between the line segment and circle, @@ -50741,7 +52597,7 @@ module.exports = GetLineToCircle; /***/ }), -/* 217 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50825,7 +52681,7 @@ module.exports = LineToCircle; /***/ }), -/* 218 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50837,7 +52693,7 @@ module.exports = LineToCircle; var Point = __webpack_require__(4); var LineToLine = __webpack_require__(86); -var LineToRectangle = __webpack_require__(452); +var LineToRectangle = __webpack_require__(453); /** * Checks for intersection between the Line and a Rectangle shape, @@ -50885,7 +52741,7 @@ module.exports = GetLineToRectangle; /***/ }), -/* 219 */ +/* 221 */ /***/ (function(module, exports) { /** @@ -50972,7 +52828,7 @@ module.exports = ContainsArray; /***/ }), -/* 220 */ +/* 222 */ /***/ (function(module, exports) { /** @@ -51020,7 +52876,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 221 */ +/* 223 */ /***/ (function(module, exports) { /** @@ -51048,7 +52904,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 222 */ +/* 224 */ /***/ (function(module, exports) { /** @@ -51102,7 +52958,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 223 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51117,18 +52973,18 @@ module.exports = RotateAroundXY; module.exports = { - BUTTON_DOWN: __webpack_require__(1222), - BUTTON_UP: __webpack_require__(1223), - CONNECTED: __webpack_require__(1224), - DISCONNECTED: __webpack_require__(1225), - GAMEPAD_BUTTON_DOWN: __webpack_require__(1226), - GAMEPAD_BUTTON_UP: __webpack_require__(1227) + BUTTON_DOWN: __webpack_require__(1226), + BUTTON_UP: __webpack_require__(1227), + CONNECTED: __webpack_require__(1228), + DISCONNECTED: __webpack_require__(1229), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1230), + GAMEPAD_BUTTON_UP: __webpack_require__(1231) }; /***/ }), -/* 224 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51138,7 +52994,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var XHRSettings = __webpack_require__(146); +var XHRSettings = __webpack_require__(147); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -51176,7 +53032,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 225 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51191,7 +53047,7 @@ var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(374); +var ParseXML = __webpack_require__(375); /** * @classdesc @@ -51361,7 +53217,7 @@ module.exports = XMLFile; /***/ }), -/* 226 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51376,26 +53232,26 @@ module.exports = XMLFile; module.exports = { - Acceleration: __webpack_require__(1281), - Angular: __webpack_require__(1282), - Bounce: __webpack_require__(1283), - Debug: __webpack_require__(1284), - Drag: __webpack_require__(1285), - Enable: __webpack_require__(1286), - Friction: __webpack_require__(1287), - Gravity: __webpack_require__(1288), - Immovable: __webpack_require__(1289), - Mass: __webpack_require__(1290), - OverlapCirc: __webpack_require__(483), - OverlapRect: __webpack_require__(227), - Size: __webpack_require__(1291), - Velocity: __webpack_require__(1292) + Acceleration: __webpack_require__(1285), + Angular: __webpack_require__(1286), + Bounce: __webpack_require__(1287), + Debug: __webpack_require__(1288), + Drag: __webpack_require__(1289), + Enable: __webpack_require__(1290), + Friction: __webpack_require__(1291), + Gravity: __webpack_require__(1292), + Immovable: __webpack_require__(1293), + Mass: __webpack_require__(1294), + OverlapCirc: __webpack_require__(484), + OverlapRect: __webpack_require__(229), + Size: __webpack_require__(1295), + Velocity: __webpack_require__(1296) }; /***/ }), -/* 227 */ +/* 229 */ /***/ (function(module, exports) { /** @@ -51480,7 +53336,7 @@ module.exports = OverlapRect; /***/ }), -/* 228 */ +/* 230 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51495,20 +53351,20 @@ module.exports = OverlapRect; module.exports = { - COLLIDE: __webpack_require__(1293), - OVERLAP: __webpack_require__(1294), - PAUSE: __webpack_require__(1295), - RESUME: __webpack_require__(1296), - TILE_COLLIDE: __webpack_require__(1297), - TILE_OVERLAP: __webpack_require__(1298), - WORLD_BOUNDS: __webpack_require__(1299), - WORLD_STEP: __webpack_require__(1300) + COLLIDE: __webpack_require__(1297), + OVERLAP: __webpack_require__(1298), + PAUSE: __webpack_require__(1299), + RESUME: __webpack_require__(1300), + TILE_COLLIDE: __webpack_require__(1301), + TILE_OVERLAP: __webpack_require__(1302), + WORLD_BOUNDS: __webpack_require__(1303), + WORLD_STEP: __webpack_require__(1304) }; /***/ }), -/* 229 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51616,7 +53472,7 @@ module.exports = GetOverlapX; /***/ }), -/* 230 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51724,7 +53580,7 @@ module.exports = GetOverlapY; /***/ }), -/* 231 */ +/* 233 */ /***/ (function(module, exports) { /** @@ -51760,8 +53616,8 @@ module.exports = TileIntersectsBody; /***/ }), -/* 232 */, -/* 233 */ +/* 234 */, +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51770,7 +53626,7 @@ module.exports = TileIntersectsBody; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(149); +var GetTileAt = __webpack_require__(150); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -51855,7 +53711,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 234 */ +/* 236 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51865,8 +53721,8 @@ module.exports = CalculateFacesAt; */ var Tile = __webpack_require__(75); -var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(233); +var IsInLayerBounds = __webpack_require__(104); +var CalculateFacesAt = __webpack_require__(235); var SetTileCollision = __webpack_require__(65); /** @@ -51936,7 +53792,7 @@ module.exports = PutTileAt; /***/ }), -/* 235 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51946,8 +53802,8 @@ module.exports = PutTileAt; */ var Formats = __webpack_require__(33); -var LayerData = __webpack_require__(104); -var MapData = __webpack_require__(105); +var LayerData = __webpack_require__(105); +var MapData = __webpack_require__(106); var Tile = __webpack_require__(75); /** @@ -52028,7 +53884,7 @@ module.exports = Parse2DArray; /***/ }), -/* 236 */ +/* 238 */ /***/ (function(module, exports) { /** @@ -52118,7 +53974,7 @@ module.exports = ParseGID; /***/ }), -/* 237 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52127,8 +53983,8 @@ module.exports = ParseGID; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(513); -var ParseGID = __webpack_require__(236); +var Pick = __webpack_require__(514); +var ParseGID = __webpack_require__(238); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -52198,7 +54054,7 @@ module.exports = ParseObject; /***/ }), -/* 238 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52208,9 +54064,9 @@ module.exports = ParseObject; */ var Formats = __webpack_require__(33); -var MapData = __webpack_require__(105); -var Parse = __webpack_require__(505); -var Tilemap = __webpack_require__(521); +var MapData = __webpack_require__(106); +var Parse = __webpack_require__(506); +var Tilemap = __webpack_require__(522); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -52284,7 +54140,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 239 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52333,7 +54189,7 @@ module.exports = GetTargets; /***/ }), -/* 240 */ +/* 242 */ /***/ (function(module, exports) { /** @@ -52601,7 +54457,7 @@ module.exports = GetValueOp; /***/ }), -/* 241 */ +/* 243 */ /***/ (function(module, exports) { /** @@ -52645,7 +54501,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 242 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52656,7 +54512,7 @@ module.exports = TWEEN_DEFAULTS; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(243); +var Events = __webpack_require__(245); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var TWEEN_CONST = __webpack_require__(91); @@ -54288,7 +56144,7 @@ module.exports = Tween; /***/ }), -/* 243 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54303,26 +56159,26 @@ module.exports = Tween; module.exports = { - TIMELINE_COMPLETE: __webpack_require__(1372), - TIMELINE_LOOP: __webpack_require__(1373), - TIMELINE_PAUSE: __webpack_require__(1374), - TIMELINE_RESUME: __webpack_require__(1375), - TIMELINE_START: __webpack_require__(1376), - TIMELINE_UPDATE: __webpack_require__(1377), - TWEEN_ACTIVE: __webpack_require__(1378), - TWEEN_COMPLETE: __webpack_require__(1379), - TWEEN_LOOP: __webpack_require__(1380), - TWEEN_REPEAT: __webpack_require__(1381), - TWEEN_START: __webpack_require__(1382), - TWEEN_STOP: __webpack_require__(1383), - TWEEN_UPDATE: __webpack_require__(1384), - TWEEN_YOYO: __webpack_require__(1385) + TIMELINE_COMPLETE: __webpack_require__(1376), + TIMELINE_LOOP: __webpack_require__(1377), + TIMELINE_PAUSE: __webpack_require__(1378), + TIMELINE_RESUME: __webpack_require__(1379), + TIMELINE_START: __webpack_require__(1380), + TIMELINE_UPDATE: __webpack_require__(1381), + TWEEN_ACTIVE: __webpack_require__(1382), + TWEEN_COMPLETE: __webpack_require__(1383), + TWEEN_LOOP: __webpack_require__(1384), + TWEEN_REPEAT: __webpack_require__(1385), + TWEEN_START: __webpack_require__(1386), + TWEEN_STOP: __webpack_require__(1387), + TWEEN_UPDATE: __webpack_require__(1388), + TWEEN_YOYO: __webpack_require__(1389) }; /***/ }), -/* 244 */ +/* 246 */ /***/ (function(module, exports) { /** @@ -54449,7 +56305,7 @@ module.exports = TweenData; /***/ }), -/* 245 */ +/* 247 */ /***/ (function(module, exports) { /** @@ -54503,7 +56359,7 @@ module.exports = ScaleModes; /***/ }), -/* 246 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54535,7 +56391,7 @@ module.exports = Wrap; /***/ }), -/* 247 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54567,1786 +56423,9 @@ module.exports = WrapDegrees; /***/ }), -/* 248 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(121); -var GetFastValue = __webpack_require__(2); -var Events = __webpack_require__(120); -var Animation = __webpack_require__(170); - -/** - * @classdesc - * The Animation State Component. - * - * This component provides features to apply animations to Game Objects. It is responsible for - * loading, queuing animations for later playback, mixing between animations and setting - * the current animation frame to the Game Object that owns this component. - * - * This component lives as an instance within any Game Object that has it defined, such as Sprites. - * - * You can access its properties and methods via the `anims` property, i.e. `Sprite.anims`. - * - * As well as playing animations stored in the global Animation Manager, this component - * can also create animations that are stored locally within it. See the `create` method - * for more details. - * - * Prior to Phaser 3.50 this component was called just `Animation` and lived in the - * `Phaser.GameObjects.Components` namespace. It was renamed to `AnimationState` - * in 3.50 to help better identify its true purpose when browsing the documentation. - * - * @class AnimationState - * @memberof Phaser.Animations - * @constructor - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation component belongs. - */ -var AnimationState = new Class({ - - initialize: - - function AnimationState (parent) - { - /** - * The Game Object to which this animation component belongs. - * - * You can typically access this component from the Game Object - * via the `this.anims` property. - * - * @name Phaser.Animations.AnimationState#parent - * @type {Phaser.GameObjects.GameObject} - * @since 3.0.0 - */ - this.parent = parent; - - /** - * A reference to the global Animation Manager. - * - * @name Phaser.Animations.AnimationState#animationManager - * @type {Phaser.Animations.AnimationManager} - * @since 3.0.0 - */ - this.animationManager = parent.scene.sys.anims; - - this.animationManager.on(Events.REMOVE_ANIMATION, this.globalRemove, this); - - /** - * A reference to the Texture Manager. - * - * @name Phaser.Animations.AnimationState#textureManager - * @type {Phaser.Textures.TextureManager} - * @protected - * @since 3.50.0 - */ - this.textureManager = this.animationManager.textureManager; - - /** - * The Animations stored locally in this Animation component. - * - * Do not modify the contents of this Map directly, instead use the - * `add`, `create` and `remove` methods of this class instead. - * - * @name Phaser.Animations.AnimationState#anims - * @type {Phaser.Structs.Map.} - * @protected - * @since 3.50.0 - */ - this.anims = null; - - /** - * Is an animation currently playing or not? - * - * @name Phaser.Animations.AnimationState#isPlaying - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.isPlaying = false; - - /** - * Has the current animation started playing, or is it waiting for a delay to expire? - * - * @name Phaser.Animations.AnimationState#hasStarted - * @type {boolean} - * @default false - * @since 3.50.0 - */ - this.hasStarted = false; - - /** - * The current Animation loaded into this Animation component. - * - * Will by `null` if no animation is yet loaded. - * - * @name Phaser.Animations.AnimationState#currentAnim - * @type {?Phaser.Animations.Animation} - * @default null - * @since 3.0.0 - */ - this.currentAnim = null; - - /** - * The current AnimationFrame being displayed by this Animation component. - * - * Will by `null` if no animation is yet loaded. - * - * @name Phaser.Animations.AnimationState#currentFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @since 3.0.0 - */ - this.currentFrame = null; - - /** - * The key, instance, or config of the next Animation to be loaded into this Animation component - * when the current animation completes. - * - * Will by `null` if no animation has been queued. - * - * @name Phaser.Animations.AnimationState#nextAnim - * @type {?(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} - * @default null - * @since 3.16.0 - */ - this.nextAnim = null; - - /** - * A queue of Animations to be loaded into this Animation component when the current animation completes. - * - * Populate this queue via the `chain` method. - * - * @name Phaser.Animations.AnimationState#nextAnimsQueue - * @type {array} - * @since 3.24.0 - */ - this.nextAnimsQueue = []; - - /** - * The Time Scale factor. - * - * You can adjust this value to modify the passage of time for the animation that is currently - * playing. For example, setting it to 2 will make the animation play twice as fast. Or setting - * it to 0.5 will slow the animation down. - * - * You can change this value at run-time, or set it via the `PlayAnimationConfig`. - * - * Prior to Phaser 3.50 this property was private and called `_timeScale`. - * - * @name Phaser.Animations.AnimationState#timeScale - * @type {number} - * @default 1 - * @since 3.50.0 - */ - this.timeScale = 1; - - /** - * The frame rate of playback, of the current animation, in frames per second. - * - * This value is set when a new animation is loaded into this component and should - * be treated as read-only, as changing it once playback has started will not alter - * the animation. To change the frame rate, provide a new value in the `PlayAnimationConfig` object. - * - * @name Phaser.Animations.AnimationState#frameRate - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.frameRate = 0; - - /** - * The duration of the current animation, in milliseconds. - * - * This value is set when a new animation is loaded into this component and should - * be treated as read-only, as changing it once playback has started will not alter - * the animation. To change the duration, provide a new value in the `PlayAnimationConfig` object. - * - * @name Phaser.Animations.AnimationState#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.duration = 0; - - /** - * The number of milliseconds per frame, not including frame specific modifiers that may be present in the - * Animation data. - * - * This value is calculated when a new animation is loaded into this component and should - * be treated as read-only. Changing it will not alter playback speed. - * - * @name Phaser.Animations.AnimationState#msPerFrame - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.msPerFrame = 0; - - /** - * Skip frames if the time lags, or always advanced anyway? - * - * @name Phaser.Animations.AnimationState#skipMissedFrames - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.skipMissedFrames = true; - - /** - * The delay before starting playback of the current animation, in milliseconds. - * - * This value is set when a new animation is loaded into this component and should - * be treated as read-only, as changing it once playback has started will not alter - * the animation. To change the delay, provide a new value in the `PlayAnimationConfig` object. - * - * Prior to Phaser 3.50 this property was private and called `_delay`. - * - * @name Phaser.Animations.AnimationState#delay - * @type {number} - * @default 0 - * @since 3.50.0 - */ - this.delay = 0; - - /** - * The number of times to repeat playback of the current animation. - * - * If -1, it means the animation will repeat forever. - * - * This value is set when a new animation is loaded into this component and should - * be treated as read-only, as changing it once playback has started will not alter - * the animation. To change the number of repeats, provide a new value in the `PlayAnimationConfig` object. - * - * Prior to Phaser 3.50 this property was private and called `_repeat`. - * - * @name Phaser.Animations.AnimationState#repeat - * @type {number} - * @default 0 - * @since 3.50.0 - */ - this.repeat = 0; - - /** - * The number of milliseconds to wait before starting the repeat playback of the current animation. - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time. - * - * You can change the repeat delay by providing a new value in the `PlayAnimationConfig` object. - * - * Prior to Phaser 3.50 this property was private and called `_repeatDelay`. - * - * @name Phaser.Animations.AnimationState#repeatDelay - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.repeatDelay = 0; - - /** - * Should the current animation yoyo? An animation that yoyos will play in reverse, from the end - * to the start, before then repeating or completing. An animation that does not yoyo will just - * play from the start to the end. - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time. - * - * You can change the yoyo by providing a new value in the `PlayAnimationConfig` object. - * - * Prior to Phaser 3.50 this property was private and called `_yoyo`. - * - * @name Phaser.Animations.AnimationState#yoyo - * @type {boolean} - * @default false - * @since 3.50.0 - */ - this.yoyo = false; - - /** - * Should the GameObject's `visible` property be set to `true` when the animation starts to play? - * - * This will happen _after_ any delay that may have been set. - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time, assuming the animation is currently delayed. - * - * @name Phaser.Animations.AnimationState#showOnStart - * @type {boolean} - * @since 3.50.0 - */ - this.showOnStart = false; - - /** - * Should the GameObject's `visible` property be set to `false` when the animation completes? - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time, assuming the animation is still actively playing. - * - * @name Phaser.Animations.AnimationState#hideOnComplete - * @type {boolean} - * @since 3.50.0 - */ - this.hideOnComplete = false; - - /** - * Is the playhead moving forwards (`true`) or in reverse (`false`) ? - * - * @name Phaser.Animations.AnimationState#forward - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.forward = true; - - /** - * An internal trigger that tells the component if it should plays the animation - * in reverse mode ('true') or not ('false'). This is used because `forward` can - * be changed by the `yoyo` feature. - * - * Prior to Phaser 3.50 this property was private and called `_reverse`. - * - * @name Phaser.Animations.AnimationState#inReverse - * @type {boolean} - * @default false - * @since 3.50.0 - */ - this.inReverse = false; - - /** - * Internal time overflow accumulator. - * - * This has the `delta` time added to it as part of the `update` step. - * - * @name Phaser.Animations.AnimationState#accumulator - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.accumulator = 0; - - /** - * The time point at which the next animation frame will change. - * - * This value is compared against the `accumulator` as part of the `update` step. - * - * @name Phaser.Animations.AnimationState#nextTick - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.nextTick = 0; - - /** - * A counter keeping track of how much delay time, in milliseconds, is left before playback begins. - * - * This is set via the `playAfterDelay` method, although it can be modified at run-time - * if required, as long as the animation has not already started playing. - * - * @name Phaser.Animations.AnimationState#delayCounter - * @type {number} - * @default 0 - * @since 3.50.0 - */ - this.delayCounter = 0; - - /** - * A counter that keeps track of how many repeats are left to run. - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time. - * - * @name Phaser.Animations.AnimationState#repeatCounter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.repeatCounter = 0; - - /** - * An internal flag keeping track of pending repeats. - * - * @name Phaser.Animations.AnimationState#pendingRepeat - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.pendingRepeat = false; - - /** - * Is the Animation paused? - * - * @name Phaser.Animations.AnimationState#_paused - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._paused = false; - - /** - * Was the animation previously playing before being paused? - * - * @name Phaser.Animations.AnimationState#_wasPlaying - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._wasPlaying = false; - - /** - * Internal property tracking if this Animation is waiting to stop. - * - * 0 = No - * 1 = Waiting for ms to pass - * 2 = Waiting for repeat - * 3 = Waiting for specific frame - * - * @name Phaser.Animations.AnimationState#_pendingStop - * @type {integer} - * @private - * @since 3.4.0 - */ - this._pendingStop = 0; - - /** - * Internal property used by _pendingStop. - * - * @name Phaser.Animations.AnimationState#_pendingStopValue - * @type {any} - * @private - * @since 3.4.0 - */ - this._pendingStopValue; - }, - - /** - * Sets an animation, or an array of animations, to be played in the future, after the current one completes or stops. - * - * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, - * or have one of the `stop` methods called. - * - * An animation set to repeat forever will never enter a completed state unless stopped. - * - * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event). - * - * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. - * - * Call this method with no arguments to reset all currently chained animations. - * - * @method Phaser.Animations.AnimationState#chain - * @since 3.16.0 - * - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - chain: function (key) - { - var parent = this.parent; - - if (key === undefined) - { - this.nextAnimsQueue.length = 0; - this.nextAnim = null; - - return parent; - } - - if (!Array.isArray(key)) - { - key = [ key ]; - } - - for (var i = 0; i < key.length; i++) - { - var anim = key[i]; - - if (this.nextAnim === null) - { - this.nextAnim = anim; - } - else - { - this.nextAnimsQueue.push(anim); - } - } - - return this.parent; - }, - - /** - * Returns the key of the animation currently loaded into this component. - * - * Prior to Phaser 3.50 this method was called `getCurrentKey`. - * - * @method Phaser.Animations.AnimationState#getName - * @since 3.50.0 - * - * @return {string} The key of the Animation currently loaded into this component, or an empty string if none loaded. - */ - getName: function () - { - return (this.currentAnim) ? this.currentAnim.key : ''; - }, - - /** - * Returns the key of the animation frame currently displayed by this component. - * - * @method Phaser.Animations.AnimationState#getFrameName - * @since 3.50.0 - * - * @return {string} The key of the Animation Frame currently displayed by this component, or an empty string if no animation has been loaded. - */ - getFrameName: function () - { - return (this.currentFrame) ? this.currentFrame.textureFrame : ''; - }, - - /** - * Internal method used to load an animation into this component. - * - * @method Phaser.Animations.AnimationState#load - * @protected - * @since 3.0.0 - * - * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - load: function (key) - { - if (this.isPlaying) - { - this.stop(); - } - - var manager = this.animationManager; - var animKey = (typeof key === 'string') ? key : GetFastValue(key, 'key', null); - - // Get the animation, first from the local map and, if not found, from the Animation Manager - var anim = (this.exists(animKey)) ? this.get(animKey) : manager.get(animKey); - - if (!anim) - { - console.warn('Missing animation: ' + animKey); - } - else - { - this.currentAnim = anim; - - // And now override the animation values, if set in the config. - - var totalFrames = anim.getTotalFrames(); - var frameRate = GetFastValue(key, 'frameRate', anim.frameRate); - var duration = GetFastValue(key, 'duration', anim.duration); - - anim.calculateDuration(this, totalFrames, duration, frameRate); - - this.delay = GetFastValue(key, 'delay', anim.delay); - this.repeat = GetFastValue(key, 'repeat', anim.repeat); - this.repeatDelay = GetFastValue(key, 'repeatDelay', anim.repeatDelay); - this.yoyo = GetFastValue(key, 'yoyo', anim.yoyo); - this.showOnStart = GetFastValue(key, 'showOnStart', anim.showOnStart); - this.hideOnComplete = GetFastValue(key, 'hideOnComplete', anim.hideOnComplete); - this.skipMissedFrames = GetFastValue(key, 'skipMissedFrames', anim.skipMissedFrames); - - this.timeScale = GetFastValue(key, 'timeScale', this.timeScale); - - var startFrame = GetFastValue(key, 'startFrame', 0); - - if (startFrame > anim.getTotalFrames()) - { - startFrame = 0; - } - - var frame = anim.frames[startFrame]; - - if (startFrame === 0 && !this.forward) - { - frame = anim.getLastFrame(); - } - - this.currentFrame = frame; - } - - return this.parent; - }, - - /** - * Pause the current animation and set the `isPlaying` property to `false`. - * You can optionally pause it at a specific frame. - * - * @method Phaser.Animations.AnimationState#pause - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - pause: function (atFrame) - { - if (!this._paused) - { - this._paused = true; - this._wasPlaying = this.isPlaying; - this.isPlaying = false; - } - - if (atFrame !== undefined) - { - this.setCurrentFrame(atFrame); - } - - return this.parent; - }, - - /** - * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. - * You can optionally tell it to start playback from a specific frame. - * - * @method Phaser.Animations.AnimationState#resume - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - resume: function (fromFrame) - { - if (this._paused) - { - this._paused = false; - this.isPlaying = this._wasPlaying; - } - - if (fromFrame !== undefined) - { - this.setCurrentFrame(fromFrame); - } - - return this.parent; - }, - - /** - * Waits for the specified delay, in milliseconds, then starts playback of the given animation. - * - * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here. - * - * If an animation is already running and a new animation is given to this method, it will wait for - * the given delay before starting the new animation. - * - * If no animation is currently running, the given one begins after the delay. - * - * Prior to Phaser 3.50 this method was called 'delayedPlay' and the parameters were in the reverse order. - * - * @method Phaser.Animations.AnimationState#playAfterDelay - * @fires Phaser.Animations.Events#ANIMATION_START - * @since 3.50.0 - * - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. - * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - playAfterDelay: function (key, delay) - { - if (!this.isPlaying) - { - this.delayCounter = delay; - - this.play(key, true); - } - else - { - // If we've got a nextAnim, move it to the queue - var nextAnim = this.nextAnim; - var queue = this.nextAnimsQueue; - - if (nextAnim) - { - queue.unshift(nextAnim); - } - - this.nextAnim = key; - - this._pendingStop = 1; - this._pendingStopValue = delay; - } - - return this.parent; - }, - - /** - * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback - * of the given animation. - * - * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an - * idle animation to a walking animation, by making them blend smoothly into each other. - * - * If no animation is currently running, the given one will start immediately. - * - * @method Phaser.Animations.AnimationState#playAfterRepeat - * @fires Phaser.Animations.Events#ANIMATION_START - * @since 3.50.0 - * - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. - * @param {integer} [repeatCount=1] - How many times should the animation repeat before the next one starts? - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - playAfterRepeat: function (key, repeatCount) - { - if (repeatCount === undefined) { repeatCount = 1; } - - if (!this.isPlaying) - { - this.play(key); - } - else - { - // If we've got a nextAnim, move it to the queue - var nextAnim = this.nextAnim; - var queue = this.nextAnimsQueue; - - if (nextAnim) - { - queue.unshift(nextAnim); - } - - if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) - { - repeatCount = this.repeatCounter; - } - - this.nextAnim = key; - - this._pendingStop = 2; - this._pendingStopValue = repeatCount; - } - - return this.parent; - }, - - /** - * Start playing the given animation on this Sprite. - * - * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. - * - * The benefit of a global animation is that multiple Sprites can all play the same animation, without - * having to duplicate the data. You can just create it once and then play it on any Sprite. - * - * The following code shows how to create a global repeating animation. The animation will be created - * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': - * - * ```javascript - * var config = { - * key: 'run', - * frames: 'muybridge', - * frameRate: 15, - * repeat: -1 - * }; - * - * // This code should be run from within a Scene: - * this.anims.create(config); - * ``` - * - * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, - * you can call the `Animation.create` method instead. It accepts the exact same parameters as when - * creating a global animation, however the resulting data is kept locally in this Sprite. - * - * With the animation created, either globally or locally, you can now play it on this Sprite: - * - * ```javascript - * this.add.sprite(x, y).play('run'); - * ``` - * - * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config - * object instead: - * - * ```javascript - * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 }); - * ``` - * - * When playing an animation on a Sprite it will first check to see if it can find a matching key - * locally within the Sprite. If it can, it will play the local animation. If not, it will then - * search the global Animation Manager and look for it there. - * - * If you need a Sprite to be able to play both local and global animations, make sure they don't - * have conflicting keys. - * - * See the documentation for the `PlayAnimationConfig` config object for more details about this. - * - * Also, see the documentation in the Animation Manager for further details on creating animations. - * - * @method Phaser.Animations.AnimationState#play - * @fires Phaser.Animations.Events#ANIMATION_START - * @since 3.0.0 - * - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. - * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - play: function (key, ignoreIfPlaying) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - - var currentAnim = this.currentAnim; - var parent = this.parent; - - // Must be either an Animation instance, or a PlayAnimationConfig object - var animKey = (typeof key === 'string') ? key : key.key; - - if (ignoreIfPlaying && this.isPlaying && currentAnim.key === animKey) - { - return parent; - } - - // Are we mixing? - if (currentAnim && this.isPlaying) - { - var mix = this.animationManager.getMix(currentAnim.key, key); - - if (mix > 0) - { - return this.playAfterDelay(key, mix); - } - } - - this.forward = true; - this.inReverse = false; - - this._paused = false; - this._wasPlaying = true; - - return this.startAnimation(key); - }, - - /** - * Start playing the given animation on this Sprite, in reverse. - * - * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. - * - * The benefit of a global animation is that multiple Sprites can all play the same animation, without - * having to duplicate the data. You can just create it once and then play it on any Sprite. - * - * The following code shows how to create a global repeating animation. The animation will be created - * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': - * - * ```javascript - * var config = { - * key: 'run', - * frames: 'muybridge', - * frameRate: 15, - * repeat: -1 - * }; - * - * // This code should be run from within a Scene: - * this.anims.create(config); - * ``` - * - * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, - * you can call the `Animation.create` method instead. It accepts the exact same parameters as when - * creating a global animation, however the resulting data is kept locally in this Sprite. - * - * With the animation created, either globally or locally, you can now play it on this Sprite: - * - * ```javascript - * this.add.sprite(x, y).playReverse('run'); - * ``` - * - * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config - * object instead: - * - * ```javascript - * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 }); - * ``` - * - * When playing an animation on a Sprite it will first check to see if it can find a matching key - * locally within the Sprite. If it can, it will play the local animation. If not, it will then - * search the global Animation Manager and look for it there. - * - * If you need a Sprite to be able to play both local and global animations, make sure they don't - * have conflicting keys. - * - * See the documentation for the `PlayAnimationConfig` config object for more details about this. - * - * Also, see the documentation in the Animation Manager for further details on creating animations. - * - * @method Phaser.Animations.AnimationState#playReverse - * @fires Phaser.Animations.Events#ANIMATION_START - * @since 3.12.0 - * - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. - * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - playReverse: function (key, ignoreIfPlaying) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - - // Must be either an Animation instance, or a PlayAnimationConfig object - var animKey = (typeof key === 'string') ? key : key.key; - - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === animKey) - { - return this.parent; - } - - this.forward = false; - this.inReverse = true; - - this._paused = false; - this._wasPlaying = true; - - return this.startAnimation(key); - }, - - /** - * Load the animation based on the key and set-up all of the internal values - * needed for playback to start. If there is no delay, it will also fire the start events. - * - * @method Phaser.Animations.AnimationState#startAnimation - * @fires Phaser.Animations.Events#ANIMATION_START - * @since 3.50.0 - * - * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - startAnimation: function (key) - { - this.load(key); - - var anim = this.currentAnim; - var gameObject = this.parent; - - if (!anim) - { - return gameObject; - } - - // Should give us 9,007,199,254,740,991 safe repeats - this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; - - anim.getFirstTick(this); - - this.isPlaying = true; - this.pendingRepeat = false; - this.hasStarted = false; - - this._pendingStop = 0; - this._pendingStopValue = 0; - this._paused = false; - - // Add any delay the animation itself may have had as well - this.delayCounter += this.delay; - - if (this.delayCounter === 0) - { - this.handleStart(); - } - - return gameObject; - }, - - /** - * Handles the start of an animation playback. - * - * @method Phaser.Animations.AnimationState#handleStart - * @private - * @since 3.50.0 - */ - handleStart: function () - { - if (this.showOnStart) - { - this.parent.setVisible(true); - } - - this.setCurrentFrame(this.currentFrame); - - this.hasStarted = true; - - this.emitEvents(Events.ANIMATION_START); - }, - - /** - * Handles the repeat of an animation. - * - * @method Phaser.Animations.AnimationState#handleRepeat - * @private - * @since 3.50.0 - */ - handleRepeat: function () - { - this.pendingRepeat = false; - - this.emitEvents(Events.ANIMATION_REPEAT); - }, - - /** - * Handles the stop of an animation playback. - * - * @method Phaser.Animations.AnimationState#handleStop - * @private - * @since 3.50.0 - */ - handleStop: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - this.emitEvents(Events.ANIMATION_STOP); - }, - - /** - * Handles the completion of an animation playback. - * - * @method Phaser.Animations.AnimationState#handleComplete - * @private - * @since 3.50.0 - */ - handleComplete: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - if (this.hideOnComplete) - { - this.parent.setVisible(false); - } - - this.emitEvents(Events.ANIMATION_COMPLETE); - }, - - /** - * Fires the given animation event. - * - * @method Phaser.Animations.AnimationState#emitEvents - * @private - * @since 3.50.0 - * - * @param {string} event - The Animation Event to dispatch. - */ - emitEvents: function (event) - { - var anim = this.currentAnim; - var frame = this.currentFrame; - var gameObject = this.parent; - - gameObject.emit(event, anim, frame, gameObject, frame.textureFrame); - }, - - /** - * Reverse the Animation that is already playing on the Game Object. - * - * @method Phaser.Animations.AnimationState#reverse - * @since 3.12.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - reverse: function () - { - if (this.isPlaying) - { - this.inReverse = !this.inReverse; - - this.forward = !this.forward; - } - - return this.parent; - }, - - /** - * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. - * - * The value is based on the current frame and how far that is in the animation, it is not based on - * the duration of the animation. - * - * @method Phaser.Animations.AnimationState#getProgress - * @since 3.4.0 - * - * @return {number} The progress of the current animation in frames, between 0 and 1. - */ - getProgress: function () - { - var frame = this.currentFrame; - - if (!frame) - { - return 0; - } - - var p = frame.progress; - - if (this.inReverse) - { - p *= -1; - } - - return p; - }, - - /** - * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. - * - * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. - * - * The value is based on the current frame and how far that is in the animation, it is not based on - * the duration of the animation. - * - * @method Phaser.Animations.AnimationState#setProgress - * @since 3.4.0 - * - * @param {number} [value=0] - The progress value, between 0 and 1. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setProgress: function (value) - { - if (!this.forward) - { - value = 1 - value; - } - - this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); - - return this.parent; - }, - - /** - * Sets the number of times that the animation should repeat after its first play through. - * For example, if repeat is 1, the animation will play a total of twice: the initial play plus 1 repeat. - * - * To repeat indefinitely, use -1. - * The value should always be an integer. - * - * Calling this method only works if the animation is already running. Otherwise, any - * value specified here will be overwritten when the next animation loads in. To avoid this, - * use the `repeat` property of the `PlayAnimationConfig` object instead. - * - * @method Phaser.Animations.AnimationState#setRepeat - * @since 3.4.0 - * - * @param {integer} value - The number of times that the animation should repeat. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeat: function (value) - { - this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; - - return this.parent; - }, - - /** - * Handle the removal of an animation from the Animation Manager. - * - * @method Phaser.Animations.AnimationState#globalRemove - * @since 3.50.0 - * - * @param {string} [key] - The key of the removed Animation. - * @param {Phaser.Animations.Animation} [animation] - The removed Animation. - */ - globalRemove: function (key, animation) - { - if (animation === undefined) { animation = this.currentAnim; } - - if (this.isPlaying && animation.key === this.currentAnim.key) - { - this.stop(); - - this.setCurrentFrame(this.currentAnim.frames[0]); - } - }, - - /** - * Restarts the current animation from its beginning. - * - * You can optionally reset the delay and repeat counters as well. - * - * Calling this will fire the `ANIMATION_RESTART` event immediately. - * - * If you `includeDelay` then it will also fire the `ANIMATION_START` event once - * the delay has expired, otherwise, playback will just begin immediately. - * - * @method Phaser.Animations.AnimationState#restart - * @fires Phaser.Animations.Events#ANIMATION_RESTART - * @since 3.0.0 - * - * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. - * @param {boolean} [resetRepeats=false] - Whether to reset the repeat counter or not? - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - restart: function (includeDelay, resetRepeats) - { - if (includeDelay === undefined) { includeDelay = false; } - if (resetRepeats === undefined) { resetRepeats = false; } - - var anim = this.currentAnim; - var gameObject = this.parent; - - if (!anim) - { - return gameObject; - } - - if (resetRepeats) - { - this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; - } - - anim.getFirstTick(this); - - this.emitEvents(Events.ANIMATION_RESTART); - - this.isPlaying = true; - this.pendingRepeat = false; - - // Set this to `true` if there is no delay to include, so it skips the `hasStarted` check in `update`. - this.hasStarted = !includeDelay; - - this._pendingStop = 0; - this._pendingStopValue = 0; - this._paused = false; - - this.setCurrentFrame(anim.frames[0]); - - return this.parent; - }, - - /** - * The current animation has completed. This dispatches the `ANIMATION_COMPLETE` event. - * - * This method is called by the Animation instance and should not usually be invoked directly. - * - * If no animation is loaded, no events will be dispatched. - * - * If another animation has been queued for playback, it will be started after the events fire. - * - * @method Phaser.Animations.AnimationState#complete - * @fires Phaser.Animations.Events#ANIMATION_COMPLETE - * @since 3.50.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - complete: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - if (this.currentAnim) - { - this.handleComplete(); - } - - if (this.nextAnim) - { - var key = this.nextAnim; - - this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; - - this.play(key); - } - - return this.parent; - }, - - /** - * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` event. - * - * If no animation is running, no events will be dispatched. - * - * If there is another animation in the queue (set via the `chain` method) then it will start playing. - * - * @method Phaser.Animations.AnimationState#stop - * @fires Phaser.Animations.Events#ANIMATION_STOP - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stop: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - if (this.currentAnim) - { - this.handleStop(); - } - - if (this.nextAnim) - { - var key = this.nextAnim; - - this.nextAnim = this.nextAnimsQueue.shift(); - - this.play(key); - } - - return this.parent; - }, - - /** - * Stops the current animation from playing after the specified time delay, given in milliseconds. - * - * It then dispatches the `ANIMATION_STOP` event. - * - * If no animation is running, no events will be dispatched. - * - * If there is another animation in the queue (set via the `chain` method) then it will start playing, - * when the current one stops. - * - * @method Phaser.Animations.AnimationState#stopAfterDelay - * @fires Phaser.Animations.Events#ANIMATION_STOP - * @since 3.4.0 - * - * @param {integer} delay - The number of milliseconds to wait before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopAfterDelay: function (delay) - { - this._pendingStop = 1; - this._pendingStopValue = delay; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next repeats. - * - * It then dispatches the `ANIMATION_STOP` event. - * - * If no animation is running, no events will be dispatched. - * - * If there is another animation in the queue (set via the `chain` method) then it will start playing, - * when the current one stops. - * - * Prior to Phaser 3.50 this method was called `stopOnRepeat` and had no parameters. - * - * @method Phaser.Animations.AnimationState#stopAfterRepeat - * @fires Phaser.Animations.Events#ANIMATION_STOP - * @since 3.50.0 - * - * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopAfterRepeat: function (repeatCount) - { - if (repeatCount === undefined) { repeatCount = 1; } - - if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) - { - repeatCount = this.repeatCounter; - } - - this._pendingStop = 2; - this._pendingStopValue = repeatCount; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next sets the given frame. - * If this frame doesn't exist within the animation it will not stop it from playing. - * - * It then dispatches the `ANIMATION_STOP` event. - * - * If no animation is running, no events will be dispatched. - * - * If there is another animation in the queue (set via the `chain` method) then it will start playing, - * when the current one stops. - * - * @method Phaser.Animations.AnimationState#stopOnFrame - * @fires Phaser.Animations.Events#ANIMATION_STOP - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopOnFrame: function (frame) - { - this._pendingStop = 3; - this._pendingStopValue = frame; - - return this.parent; - }, - - /** - * Returns the total number of frames in this animation, or returns zero if no - * animation has been loaded. - * - * @method Phaser.Animations.AnimationState#getTotalFrames - * @since 3.4.0 - * - * @return {integer} The total number of frames in the current animation, or zero if no animation has been loaded. - */ - getTotalFrames: function () - { - return (this.currentAnim) ? this.currentAnim.getTotalFrames() : 0; - }, - - /** - * The internal update loop for the AnimationState Component. - * - * This is called automatically by the `Sprite.preUpdate` method. - * - * @method Phaser.Animations.AnimationState#update - * @since 3.0.0 - * - * @param {number} time - The current timestamp. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. - */ - update: function (time, delta) - { - var anim = this.currentAnim; - - if (!this.isPlaying || !anim || anim.paused) - { - return; - } - - this.accumulator += delta * this.timeScale; - - if (this._pendingStop === 1) - { - this._pendingStopValue -= delta; - - if (this._pendingStopValue <= 0) - { - return this.stop(); - } - } - - if (!this.hasStarted) - { - if (this.accumulator >= this.delayCounter) - { - this.accumulator -= this.delayCounter; - - this.handleStart(); - } - } - else if (this.accumulator >= this.nextTick) - { - // Process one frame advance as standard - - if (this.forward) - { - anim.nextFrame(this); - } - else - { - anim.previousFrame(this); - } - - // And only do more if we're skipping frames and have time left - if (this.isPlaying && this._pendingStop === 0 && this.skipMissedFrames && this.accumulator > this.nextTick) - { - var safetyNet = 0; - - do - { - if (this.forward) - { - anim.nextFrame(this); - } - else - { - anim.previousFrame(this); - } - - safetyNet++; - - } while (this.accumulator > this.nextTick && safetyNet < 60); - } - } - }, - - /** - * Sets the given Animation Frame as being the current frame - * and applies it to the parent Game Object, adjusting size and origin as needed. - * - * @method Phaser.Animations.AnimationState#setCurrentFrame - * @fires Phaser.Animations.Events#ANIMATION_UPDATE - * @fires Phaser.Animations.Events#ANIMATION_STOP - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - setCurrentFrame: function (animationFrame) - { - var gameObject = this.parent; - - this.currentFrame = animationFrame; - - gameObject.texture = animationFrame.frame.texture; - gameObject.frame = animationFrame.frame; - - if (gameObject.isCropped) - { - gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); - } - - if (animationFrame.setAlpha) - { - gameObject.alpha = animationFrame.alpha; - } - - gameObject.setSizeToFrame(); - - if (gameObject._originComponent) - { - if (animationFrame.frame.customPivot) - { - gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); - } - else - { - gameObject.updateDisplayOrigin(); - } - } - - if (this.isPlaying && this.hasStarted) - { - this.emitEvents(Events.ANIMATION_UPDATE); - - if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) - { - this.stop(); - } - } - - return gameObject; - }, - - /** - * Advances the animation to the next frame, regardless of the time or animation state. - * If the animation is set to repeat, or yoyo, this will still take effect. - * - * Calling this does not change the direction of the animation. I.e. if it was currently - * playing in reverse, calling this method doesn't then change the direction to forwards. - * - * @method Phaser.Animations.AnimationState#nextFrame - * @since 3.16.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - nextFrame: function () - { - if (this.currentAnim) - { - this.currentAnim.nextFrame(this); - } - - return this.parent; - }, - - /** - * Advances the animation to the previous frame, regardless of the time or animation state. - * If the animation is set to repeat, or yoyo, this will still take effect. - * - * Calling this does not change the direction of the animation. I.e. if it was currently - * playing in forwards, calling this method doesn't then change the direction to backwards. - * - * @method Phaser.Animations.AnimationState#previousFrame - * @since 3.16.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - previousFrame: function () - { - if (this.currentAnim) - { - this.currentAnim.previousFrame(this); - } - - return this.parent; - }, - - /** - * Get an Animation instance that has been created locally on this Sprite. - * - * See the `create` method for more details. - * - * @method Phaser.Animations.AnimationState#get - * @since 3.50.0 - * - * @param {string} key - The key of the Animation to retrieve. - * - * @return {Phaser.Animations.Animation} The Animation, or `undefined` if the key is invalid. - */ - get: function (key) - { - return (this.anims && this.anims.get(key)); - }, - - /** - * Checks to see if the given key is already used locally within the animations stored on this Sprite. - * - * @method Phaser.Animations.AnimationState#exists - * @since 3.50.0 - * - * @param {string} key - The key of the Animation to check. - * - * @return {boolean} `true` if the Animation exists locally, or `false` if the key is available. - */ - exists: function (key) - { - return (this.anims && this.anims.has(key)); - }, - - /** - * Creates a new Animation that is local specifically to this Sprite. - * - * When a Sprite owns an animation, it is kept out of the global Animation Manager, which means - * you're free to use keys that may be already defined there. Unless you specifically need a Sprite - * to have a unique animation, you should favor using global animations instead, as they allow for - * the same animation to be used across multiple Sprites, saving on memory. However, if this Sprite - * is the only one to use this animation, it's sensible to create it here. - * - * If an invalid key is given this method will return `false`. - * - * If you pass the key of an animation that already exists locally, that animation will be returned. - * - * A brand new animation is only created if the key is valid and not already in use by this Sprite. - * - * If you wish to re-use an existing key, call the `remove` method first, then this method. - * - * @method Phaser.Animations.AnimationState#create - * @since 3.50.0 - * - * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. - * - * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` if the key is already in use. - */ - create: function (config) - { - var key = config.key; - - var anim = false; - - if (key) - { - anim = this.get(key); - - if (!anim) - { - anim = new Animation(this, key, config); - - if (!this.anims) - { - this.anims = new CustomMap(); - } - - this.anims.set(key, anim); - } - } - - return anim; - }, - - /** - * Removes a locally created Animation from this Sprite, based on the given key. - * - * Once an Animation has been removed, this Sprite cannot play it again without re-creating it. - * - * @method Phaser.Animations.AnimationState#remove - * @since 3.50.0 - * - * @param {string} key - The key of the animation to remove. - * - * @return {Phaser.Animations.Animation} The Animation instance that was removed from this Sprite, if the key was valid. - */ - remove: function (key) - { - var anim = this.get(key); - - if (anim) - { - if (this.currentAnim === anim) - { - this.stop(); - } - - this.anims.delete(key); - } - - return anim; - }, - - /** - * Destroy this Animation component. - * - * Unregisters event listeners and cleans up its references. - * - * @method Phaser.Animations.AnimationState#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.animationManager.off(Events.REMOVE_ANIMATION, this.globalRemove, this); - - if (this.anims) - { - this.anims.clear(); - } - - this.animationManager = null; - this.parent = null; - this.nextAnim = null; - this.nextAnimsQueue.length = 0; - - this.currentAnim = null; - this.currentFrame = null; - }, - - /** - * `true` if the current animation is paused, otherwise `false`. - * - * @name Phaser.Animations.AnimationState#isPaused - * @readonly - * @type {boolean} - * @since 3.4.0 - */ - isPaused: { - - get: function () - { - return this._paused; - } - - } - -}); - -module.exports = AnimationState; - - -/***/ }), -/* 249 */, /* 250 */, -/* 251 */ +/* 251 */, +/* 252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56361,65 +56440,65 @@ module.exports = AnimationState; module.exports = { - AlignTo: __webpack_require__(553), - Angle: __webpack_require__(554), - Call: __webpack_require__(555), - GetFirst: __webpack_require__(556), - GetLast: __webpack_require__(557), - GridAlign: __webpack_require__(558), - IncAlpha: __webpack_require__(603), - IncX: __webpack_require__(604), - IncXY: __webpack_require__(605), - IncY: __webpack_require__(606), - PlaceOnCircle: __webpack_require__(607), - PlaceOnEllipse: __webpack_require__(608), - PlaceOnLine: __webpack_require__(609), - PlaceOnRectangle: __webpack_require__(610), - PlaceOnTriangle: __webpack_require__(611), - PlayAnimation: __webpack_require__(612), + AlignTo: __webpack_require__(556), + Angle: __webpack_require__(557), + Call: __webpack_require__(558), + GetFirst: __webpack_require__(559), + GetLast: __webpack_require__(560), + GridAlign: __webpack_require__(561), + IncAlpha: __webpack_require__(606), + IncX: __webpack_require__(607), + IncXY: __webpack_require__(608), + IncY: __webpack_require__(609), + PlaceOnCircle: __webpack_require__(610), + PlaceOnEllipse: __webpack_require__(611), + PlaceOnLine: __webpack_require__(612), + PlaceOnRectangle: __webpack_require__(613), + PlaceOnTriangle: __webpack_require__(614), + PlayAnimation: __webpack_require__(615), PropertyValueInc: __webpack_require__(39), PropertyValueSet: __webpack_require__(25), - RandomCircle: __webpack_require__(613), - RandomEllipse: __webpack_require__(614), - RandomLine: __webpack_require__(615), - RandomRectangle: __webpack_require__(616), - RandomTriangle: __webpack_require__(617), - Rotate: __webpack_require__(618), - RotateAround: __webpack_require__(619), - RotateAroundDistance: __webpack_require__(620), - ScaleX: __webpack_require__(621), - ScaleXY: __webpack_require__(622), - ScaleY: __webpack_require__(623), - SetAlpha: __webpack_require__(624), - SetBlendMode: __webpack_require__(625), - SetDepth: __webpack_require__(626), - SetHitArea: __webpack_require__(627), - SetOrigin: __webpack_require__(628), - SetRotation: __webpack_require__(629), - SetScale: __webpack_require__(630), - SetScaleX: __webpack_require__(631), - SetScaleY: __webpack_require__(632), - SetScrollFactor: __webpack_require__(633), - SetScrollFactorX: __webpack_require__(634), - SetScrollFactorY: __webpack_require__(635), - SetTint: __webpack_require__(636), - SetVisible: __webpack_require__(637), - SetX: __webpack_require__(638), - SetXY: __webpack_require__(639), - SetY: __webpack_require__(640), - ShiftPosition: __webpack_require__(641), - Shuffle: __webpack_require__(642), - SmootherStep: __webpack_require__(643), - SmoothStep: __webpack_require__(644), - Spread: __webpack_require__(645), - ToggleVisible: __webpack_require__(646), - WrapInRectangle: __webpack_require__(647) + RandomCircle: __webpack_require__(616), + RandomEllipse: __webpack_require__(617), + RandomLine: __webpack_require__(618), + RandomRectangle: __webpack_require__(619), + RandomTriangle: __webpack_require__(620), + Rotate: __webpack_require__(621), + RotateAround: __webpack_require__(622), + RotateAroundDistance: __webpack_require__(623), + ScaleX: __webpack_require__(624), + ScaleXY: __webpack_require__(625), + ScaleY: __webpack_require__(626), + SetAlpha: __webpack_require__(627), + SetBlendMode: __webpack_require__(628), + SetDepth: __webpack_require__(629), + SetHitArea: __webpack_require__(630), + SetOrigin: __webpack_require__(631), + SetRotation: __webpack_require__(632), + SetScale: __webpack_require__(633), + SetScaleX: __webpack_require__(634), + SetScaleY: __webpack_require__(635), + SetScrollFactor: __webpack_require__(636), + SetScrollFactorX: __webpack_require__(637), + SetScrollFactorY: __webpack_require__(638), + SetTint: __webpack_require__(639), + SetVisible: __webpack_require__(640), + SetX: __webpack_require__(641), + SetXY: __webpack_require__(642), + SetY: __webpack_require__(643), + ShiftPosition: __webpack_require__(644), + Shuffle: __webpack_require__(645), + SmootherStep: __webpack_require__(646), + SmoothStep: __webpack_require__(647), + Spread: __webpack_require__(648), + ToggleVisible: __webpack_require__(649), + WrapInRectangle: __webpack_require__(650) }; /***/ }), -/* 252 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56428,22 +56507,22 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(107); +var ALIGN_CONST = __webpack_require__(108); var AlignToMap = []; -AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(253); -AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(254); -AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(255); -AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(256); -AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(257); -AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(258); -AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(259); -AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(260); -AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(261); -AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(262); -AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(263); -AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(264); +AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(254); +AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(255); +AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(256); +AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(257); +AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(258); +AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(259); +AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(260); +AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(261); +AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(262); +AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(263); +AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(264); +AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(265); /** * Takes a Game Object and aligns it next to another, at the given position. @@ -56471,7 +56550,7 @@ module.exports = QuickSet; /***/ }), -/* 253 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56515,7 +56594,7 @@ module.exports = BottomCenter; /***/ }), -/* 254 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56559,7 +56638,7 @@ module.exports = BottomLeft; /***/ }), -/* 255 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56603,7 +56682,7 @@ module.exports = BottomRight; /***/ }), -/* 256 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56647,7 +56726,7 @@ module.exports = LeftBottom; /***/ }), -/* 257 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56691,7 +56770,7 @@ module.exports = LeftCenter; /***/ }), -/* 258 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56735,7 +56814,7 @@ module.exports = LeftTop; /***/ }), -/* 259 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56779,7 +56858,7 @@ module.exports = RightBottom; /***/ }), -/* 260 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56823,7 +56902,7 @@ module.exports = RightCenter; /***/ }), -/* 261 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56867,7 +56946,7 @@ module.exports = RightTop; /***/ }), -/* 262 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56911,7 +56990,7 @@ module.exports = TopCenter; /***/ }), -/* 263 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56955,7 +57034,7 @@ module.exports = TopLeft; /***/ }), -/* 264 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56999,7 +57078,7 @@ module.exports = TopRight; /***/ }), -/* 265 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57008,19 +57087,19 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(107); +var ALIGN_CONST = __webpack_require__(108); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(266); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(267); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(268); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(269); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(271); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(272); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(273); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(274); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(275); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(267); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(268); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(269); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(270); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(272); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(273); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(274); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(275); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(276); AlignInMap[ALIGN_CONST.LEFT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_LEFT]; AlignInMap[ALIGN_CONST.LEFT_TOP] = AlignInMap[ALIGN_CONST.TOP_LEFT]; AlignInMap[ALIGN_CONST.RIGHT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_RIGHT]; @@ -57052,7 +57131,7 @@ module.exports = QuickSet; /***/ }), -/* 266 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57096,7 +57175,7 @@ module.exports = BottomCenter; /***/ }), -/* 267 */ +/* 268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57140,7 +57219,7 @@ module.exports = BottomLeft; /***/ }), -/* 268 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57184,7 +57263,7 @@ module.exports = BottomRight; /***/ }), -/* 269 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57193,7 +57272,7 @@ module.exports = BottomRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(270); +var CenterOn = __webpack_require__(271); var GetCenterX = __webpack_require__(77); var GetCenterY = __webpack_require__(79); @@ -57226,7 +57305,7 @@ module.exports = Center; /***/ }), -/* 270 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57263,7 +57342,7 @@ module.exports = CenterOn; /***/ }), -/* 271 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57307,7 +57386,7 @@ module.exports = LeftCenter; /***/ }), -/* 272 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57351,7 +57430,7 @@ module.exports = RightCenter; /***/ }), -/* 273 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57395,7 +57474,7 @@ module.exports = TopCenter; /***/ }), -/* 274 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57439,7 +57518,7 @@ module.exports = TopLeft; /***/ }), -/* 275 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57483,7 +57562,7 @@ module.exports = TopRight; /***/ }), -/* 276 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57492,7 +57571,7 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(157); +var CircumferencePoint = __webpack_require__(159); var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -57526,7 +57605,7 @@ module.exports = GetPoint; /***/ }), -/* 277 */ +/* 278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57535,8 +57614,8 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(278); -var CircumferencePoint = __webpack_require__(157); +var Circumference = __webpack_require__(279); +var CircumferencePoint = __webpack_require__(159); var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); @@ -57578,7 +57657,7 @@ module.exports = GetPoints; /***/ }), -/* 278 */ +/* 279 */ /***/ (function(module, exports) { /** @@ -57606,7 +57685,7 @@ module.exports = Circumference; /***/ }), -/* 279 */ +/* 280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57716,7 +57795,7 @@ module.exports = AlphaSingle; /***/ }), -/* 280 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57838,7 +57917,7 @@ module.exports = BlendMode; /***/ }), -/* 281 */ +/* 282 */ /***/ (function(module, exports) { /** @@ -57931,7 +58010,7 @@ module.exports = Depth; /***/ }), -/* 282 */ +/* 283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57940,8 +58019,8 @@ module.exports = Depth; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(159); -var Perimeter = __webpack_require__(116); +var GetPoint = __webpack_require__(161); +var Perimeter = __webpack_require__(118); // Return an array of points from the perimeter of the rectangle // each spaced out based on the quantity or step required @@ -57985,7 +58064,7 @@ module.exports = GetPoints; /***/ }), -/* 283 */ +/* 284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58024,7 +58103,7 @@ module.exports = GetPoint; /***/ }), -/* 284 */ +/* 285 */ /***/ (function(module, exports) { /** @@ -58068,7 +58147,7 @@ module.exports = RotateAround; /***/ }), -/* 285 */ +/* 286 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58077,8 +58156,8 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapMask = __webpack_require__(286); -var GeometryMask = __webpack_require__(287); +var BitmapMask = __webpack_require__(287); +var GeometryMask = __webpack_require__(288); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -58215,7 +58294,7 @@ module.exports = Mask; /***/ }), -/* 286 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58425,7 +58504,7 @@ var BitmapMask = new Class({ */ preRenderWebGL: function (renderer, maskedObject, camera) { - renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera); + renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera); }, /** @@ -58440,7 +58519,7 @@ var BitmapMask = new Class({ */ postRenderWebGL: function (renderer, camera) { - renderer.pipelines.BitmapMaskPipeline.endMask(this, camera); + renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera); }, /** @@ -58473,7 +58552,7 @@ var BitmapMask = new Class({ /** * Destroys this BitmapMask and nulls any references it holds. - * + * * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, * so be sure to call `clearMask` on any Game Object using it, before destroying it. * @@ -58508,7 +58587,7 @@ module.exports = BitmapMask; /***/ }), -/* 287 */ +/* 288 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58823,7 +58902,7 @@ module.exports = GeometryMask; /***/ }), -/* 288 */ +/* 289 */ /***/ (function(module, exports) { /** @@ -58930,7 +59009,7 @@ module.exports = ScrollFactor; /***/ }), -/* 289 */ +/* 290 */ /***/ (function(module, exports) { /** @@ -58991,7 +59070,7 @@ module.exports = ToJSON; /***/ }), -/* 290 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59002,9 +59081,9 @@ module.exports = ToJSON; var MATH_CONST = __webpack_require__(13); var TransformMatrix = __webpack_require__(31); -var TransformXY = __webpack_require__(164); -var WrapAngle = __webpack_require__(246); -var WrapAngleDegrees = __webpack_require__(247); +var TransformXY = __webpack_require__(166); +var WrapAngle = __webpack_require__(248); +var WrapAngleDegrees = __webpack_require__(249); var Vector2 = __webpack_require__(3); // global bitmask flag for GameObject.renderMask (used by Scale) @@ -59582,7 +59661,7 @@ module.exports = Transform; /***/ }), -/* 291 */ +/* 292 */ /***/ (function(module, exports) { /** @@ -59671,7 +59750,7 @@ module.exports = Visible; /***/ }), -/* 292 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59686,16 +59765,16 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(586), - CHANGE_DATA_KEY: __webpack_require__(587), - REMOVE_DATA: __webpack_require__(588), - SET_DATA: __webpack_require__(589) + CHANGE_DATA: __webpack_require__(589), + CHANGE_DATA_KEY: __webpack_require__(590), + REMOVE_DATA: __webpack_require__(591), + SET_DATA: __webpack_require__(592) }; /***/ }), -/* 293 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59704,7 +59783,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(116); +var Perimeter = __webpack_require__(118); var Point = __webpack_require__(4); @@ -59814,7 +59893,7 @@ module.exports = MarchingAnts; /***/ }), -/* 294 */ +/* 295 */ /***/ (function(module, exports) { /** @@ -59854,7 +59933,7 @@ module.exports = RotateLeft; /***/ }), -/* 295 */ +/* 296 */ /***/ (function(module, exports) { /** @@ -59894,7 +59973,7 @@ module.exports = RotateRight; /***/ }), -/* 296 */ +/* 297 */ /***/ (function(module, exports) { /** @@ -59968,7 +60047,7 @@ module.exports = BresenhamPoints; /***/ }), -/* 297 */ +/* 298 */ /***/ (function(module, exports) { /** @@ -60052,7 +60131,7 @@ module.exports = FindClosestInSorted; /***/ }), -/* 298 */ +/* 299 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60226,7 +60305,7 @@ module.exports = AnimationFrame; /***/ }), -/* 299 */ +/* 300 */ /***/ (function(module, exports) { /** @@ -60264,7 +60343,7 @@ module.exports = SortByDigits; /***/ }), -/* 300 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60273,16 +60352,16 @@ module.exports = SortByDigits; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(170); +var Animation = __webpack_require__(172); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(121); +var CustomMap = __webpack_require__(92); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(120); +var Events = __webpack_require__(122); var GameEvents = __webpack_require__(21); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -var Pad = __webpack_require__(171); -var NumberArray = __webpack_require__(301); +var Pad = __webpack_require__(173); +var NumberArray = __webpack_require__(302); /** * @classdesc @@ -61243,7 +61322,7 @@ module.exports = AnimationManager; /***/ }), -/* 301 */ +/* 302 */ /***/ (function(module, exports) { /** @@ -61336,7 +61415,7 @@ module.exports = NumberArray; /***/ }), -/* 302 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61346,9 +61425,9 @@ module.exports = NumberArray; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(121); +var CustomMap = __webpack_require__(92); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(303); +var Events = __webpack_require__(304); /** * @classdesc @@ -61522,7 +61601,7 @@ module.exports = BaseCache; /***/ }), -/* 303 */ +/* 304 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61537,14 +61616,14 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(660), - REMOVE: __webpack_require__(661) + ADD: __webpack_require__(664), + REMOVE: __webpack_require__(665) }; /***/ }), -/* 304 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61553,7 +61632,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCache = __webpack_require__(302); +var BaseCache = __webpack_require__(303); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(21); @@ -61778,7 +61857,7 @@ module.exports = CacheManager; /***/ }), -/* 305 */ +/* 306 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61787,14 +61866,14 @@ module.exports = CacheManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(92); +var BaseCamera = __webpack_require__(93); var CanvasPool = __webpack_require__(26); -var CenterOn = __webpack_require__(176); +var CenterOn = __webpack_require__(178); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); var Components = __webpack_require__(11); -var Effects = __webpack_require__(313); -var Linear = __webpack_require__(123); +var Effects = __webpack_require__(314); +var Linear = __webpack_require__(124); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -62004,12 +62083,12 @@ var Camera = new Class({ /** * If this Camera is rendering to a texture (via `setRenderToTexture`) then you * have the option to control if it should also render to the Game canvas as well. - * + * * By default, a Camera will render both to its texture and to the Game canvas. - * + * * However, if you set ths property to `false` it will only render to the texture * and skip rendering to the Game canvas. - * + * * Setting this property if the Camera isn't rendering to a texture has no effect. * * @name Phaser.Cameras.Scene2D.Camera#renderToGame @@ -62084,7 +62163,7 @@ var Camera = new Class({ * This is only set if Phaser is running with the WebGL Renderer. * * @name Phaser.Cameras.Scene2D.Camera#pipeline - * @type {any} + * @type {?Phaser.Renderer.WebGL.WebGLPipeline} * @since 3.13.0 */ this.pipeline = null; @@ -62115,7 +62194,7 @@ var Camera = new Class({ * * You should not enable this unless you plan on actually using the texture it creates * somehow, otherwise you're just doubling the work required to render your game. - * + * * If you only require the Camera to render to a texture, and not also to the Game, * them set the `renderToGame` parameter to `false`. * @@ -62180,9 +62259,9 @@ var Camera = new Class({ { var renderer = this.scene.sys.game.renderer; - if (renderer.gl && renderer.hasPipeline(pipeline)) + if (renderer.gl && renderer.pipelines.has(pipeline)) { - this.pipeline = renderer.getPipeline(pipeline); + this.pipeline = renderer.pipelines.get(pipeline); } } else @@ -62832,7 +62911,7 @@ module.exports = Camera; /***/ }), -/* 306 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62885,7 +62964,7 @@ module.exports = HexStringToColor; /***/ }), -/* 307 */ +/* 308 */ /***/ (function(module, exports) { /** @@ -62916,7 +62995,7 @@ module.exports = GetColor32; /***/ }), -/* 308 */ +/* 309 */ /***/ (function(module, exports) { /** @@ -62996,7 +63075,7 @@ module.exports = RGBToHSV; /***/ }), -/* 309 */ +/* 310 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63006,7 +63085,7 @@ module.exports = RGBToHSV; */ var Color = __webpack_require__(32); -var IntegerToRGB = __webpack_require__(310); +var IntegerToRGB = __webpack_require__(311); /** * Converts the given color value into an instance of a Color object. @@ -63029,7 +63108,7 @@ module.exports = IntegerToColor; /***/ }), -/* 310 */ +/* 311 */ /***/ (function(module, exports) { /** @@ -63077,7 +63156,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 311 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63107,7 +63186,7 @@ module.exports = ObjectToColor; /***/ }), -/* 312 */ +/* 313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63153,7 +63232,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 313 */ +/* 314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63168,35 +63247,12 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(684), - Flash: __webpack_require__(685), - Pan: __webpack_require__(686), - Shake: __webpack_require__(719), - RotateTo: __webpack_require__(720), - Zoom: __webpack_require__(721) - -}; - - -/***/ }), -/* 314 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Back - */ - -module.exports = { - - In: __webpack_require__(687), - Out: __webpack_require__(688), - InOut: __webpack_require__(689) + Fade: __webpack_require__(688), + Flash: __webpack_require__(689), + Pan: __webpack_require__(690), + Shake: __webpack_require__(723), + RotateTo: __webpack_require__(724), + Zoom: __webpack_require__(725) }; @@ -63212,14 +63268,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Bounce + * @namespace Phaser.Math.Easing.Back */ module.exports = { - In: __webpack_require__(690), - Out: __webpack_require__(691), - InOut: __webpack_require__(692) + In: __webpack_require__(691), + Out: __webpack_require__(692), + InOut: __webpack_require__(693) }; @@ -63235,14 +63291,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Circular + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { - In: __webpack_require__(693), - Out: __webpack_require__(694), - InOut: __webpack_require__(695) + In: __webpack_require__(694), + Out: __webpack_require__(695), + InOut: __webpack_require__(696) }; @@ -63258,14 +63314,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Cubic + * @namespace Phaser.Math.Easing.Circular */ module.exports = { - In: __webpack_require__(696), - Out: __webpack_require__(697), - InOut: __webpack_require__(698) + In: __webpack_require__(697), + Out: __webpack_require__(698), + InOut: __webpack_require__(699) }; @@ -63281,14 +63337,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Elastic + * @namespace Phaser.Math.Easing.Cubic */ module.exports = { - In: __webpack_require__(699), - Out: __webpack_require__(700), - InOut: __webpack_require__(701) + In: __webpack_require__(700), + Out: __webpack_require__(701), + InOut: __webpack_require__(702) }; @@ -63304,14 +63360,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Expo + * @namespace Phaser.Math.Easing.Elastic */ module.exports = { - In: __webpack_require__(702), - Out: __webpack_require__(703), - InOut: __webpack_require__(704) + In: __webpack_require__(703), + Out: __webpack_require__(704), + InOut: __webpack_require__(705) }; @@ -63326,13 +63382,36 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -module.exports = __webpack_require__(705); +/** + * @namespace Phaser.Math.Easing.Expo + */ + +module.exports = { + + In: __webpack_require__(706), + Out: __webpack_require__(707), + InOut: __webpack_require__(708) + +}; /***/ }), /* 321 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +module.exports = __webpack_require__(709); + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -63345,32 +63424,9 @@ module.exports = __webpack_require__(705); module.exports = { - In: __webpack_require__(706), - Out: __webpack_require__(707), - InOut: __webpack_require__(708) - -}; - - -/***/ }), -/* 322 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Quartic - */ - -module.exports = { - - In: __webpack_require__(709), - Out: __webpack_require__(710), - InOut: __webpack_require__(711) + In: __webpack_require__(710), + Out: __webpack_require__(711), + InOut: __webpack_require__(712) }; @@ -63386,14 +63442,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quintic + * @namespace Phaser.Math.Easing.Quartic */ module.exports = { - In: __webpack_require__(712), - Out: __webpack_require__(713), - InOut: __webpack_require__(714) + In: __webpack_require__(713), + Out: __webpack_require__(714), + InOut: __webpack_require__(715) }; @@ -63409,14 +63465,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Sine + * @namespace Phaser.Math.Easing.Quintic */ module.exports = { - In: __webpack_require__(715), - Out: __webpack_require__(716), - InOut: __webpack_require__(717) + In: __webpack_require__(716), + Out: __webpack_require__(717), + InOut: __webpack_require__(718) }; @@ -63432,16 +63488,39 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Stepped + * @namespace Phaser.Math.Easing.Sine */ -module.exports = __webpack_require__(718); +module.exports = { + + In: __webpack_require__(719), + Out: __webpack_require__(720), + InOut: __webpack_require__(721) + +}; /***/ }), /* 326 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Stepped + */ + +module.exports = __webpack_require__(722); + + +/***/ }), +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -63450,14 +63529,14 @@ module.exports = __webpack_require__(718); var Class = __webpack_require__(0); var CONST = __webpack_require__(34); -var Device = __webpack_require__(327); +var Device = __webpack_require__(328); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var PhaserMath = __webpack_require__(178); +var PhaserMath = __webpack_require__(180); var NOOP = __webpack_require__(1); -var DefaultPlugins = __webpack_require__(182); -var ValueToColor = __webpack_require__(172); +var DefaultPlugins = __webpack_require__(184); +var ValueToColor = __webpack_require__(174); /** * @classdesc @@ -64025,7 +64104,7 @@ module.exports = Config; /***/ }), -/* 327 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64059,20 +64138,20 @@ module.exports = Config; module.exports = { - os: __webpack_require__(124), - browser: __webpack_require__(125), - features: __webpack_require__(177), - input: __webpack_require__(752), - audio: __webpack_require__(753), - video: __webpack_require__(754), - fullscreen: __webpack_require__(755), - canvasFeatures: __webpack_require__(328) + os: __webpack_require__(125), + browser: __webpack_require__(126), + features: __webpack_require__(179), + input: __webpack_require__(756), + audio: __webpack_require__(757), + video: __webpack_require__(758), + fullscreen: __webpack_require__(759), + canvasFeatures: __webpack_require__(329) }; /***/ }), -/* 328 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64186,7 +64265,7 @@ module.exports = init(); /***/ }), -/* 329 */ +/* 330 */ /***/ (function(module, exports) { /** @@ -64217,7 +64296,7 @@ module.exports = Between; /***/ }), -/* 330 */ +/* 331 */ /***/ (function(module, exports) { /** @@ -64248,7 +64327,7 @@ module.exports = BetweenPoints; /***/ }), -/* 331 */ +/* 332 */ /***/ (function(module, exports) { /** @@ -64285,7 +64364,7 @@ module.exports = Normalize; /***/ }), -/* 332 */ +/* 333 */ /***/ (function(module, exports) { /** @@ -64317,7 +64396,7 @@ module.exports = DistanceBetweenPoints; /***/ }), -/* 333 */ +/* 334 */ /***/ (function(module, exports) { /** @@ -64351,7 +64430,7 @@ module.exports = DistanceSquared; /***/ }), -/* 334 */ +/* 335 */ /***/ (function(module, exports) { /** @@ -64385,7 +64464,7 @@ module.exports = GreaterThan; /***/ }), -/* 335 */ +/* 336 */ /***/ (function(module, exports) { /** @@ -64419,7 +64498,7 @@ module.exports = LessThan; /***/ }), -/* 336 */ +/* 337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64428,7 +64507,7 @@ module.exports = LessThan; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(337); +var Factorial = __webpack_require__(338); /** * Calculates the Bernstein basis from the three factorial coefficients. @@ -64450,7 +64529,7 @@ module.exports = Bernstein; /***/ }), -/* 337 */ +/* 338 */ /***/ (function(module, exports) { /** @@ -64490,7 +64569,7 @@ module.exports = Factorial; /***/ }), -/* 338 */ +/* 339 */ /***/ (function(module, exports) { /** @@ -64560,7 +64639,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 339 */ +/* 340 */ /***/ (function(module, exports) { /** @@ -64619,7 +64698,7 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 340 */ +/* 341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64628,7 +64707,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(169); +var SmoothStep = __webpack_require__(171); /** * A Smooth Step interpolation method. @@ -64652,7 +64731,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 341 */ +/* 342 */ /***/ (function(module, exports) { /** @@ -64682,7 +64761,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 342 */ +/* 343 */ /***/ (function(module, exports) { /** @@ -64726,7 +64805,7 @@ module.exports = SnapCeil; /***/ }), -/* 343 */ +/* 344 */ /***/ (function(module, exports) { /** @@ -64761,7 +64840,7 @@ module.exports = Rotate; /***/ }), -/* 344 */ +/* 345 */ /***/ (function(module, exports) { /** @@ -64790,7 +64869,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 345 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65383,7 +65462,7 @@ module.exports = Matrix3; /***/ }), -/* 346 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66845,7 +66924,7 @@ module.exports = Matrix4; /***/ }), -/* 347 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66859,7 +66938,7 @@ module.exports = Matrix4; var Class = __webpack_require__(0); var Vector3 = __webpack_require__(81); -var Matrix3 = __webpack_require__(345); +var Matrix3 = __webpack_require__(346); var EPSILON = 0.000001; @@ -67617,7 +67696,7 @@ module.exports = Quaternion; /***/ }), -/* 348 */ +/* 349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67626,10 +67705,10 @@ module.exports = Quaternion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasInterpolation = __webpack_require__(349); +var CanvasInterpolation = __webpack_require__(350); var CanvasPool = __webpack_require__(26); var CONST = __webpack_require__(34); -var Features = __webpack_require__(177); +var Features = __webpack_require__(179); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -67719,8 +67798,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(531); - WebGLRenderer = __webpack_require__(534); + CanvasRenderer = __webpack_require__(532); + WebGLRenderer = __webpack_require__(535); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -67745,7 +67824,7 @@ module.exports = CreateRenderer; /***/ }), -/* 349 */ +/* 350 */ /***/ (function(module, exports) { /** @@ -67808,7 +67887,7 @@ module.exports = CanvasInterpolation; /***/ }), -/* 350 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67938,7 +68017,7 @@ module.exports = DebugHeader; /***/ }), -/* 351 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67950,7 +68029,7 @@ module.exports = DebugHeader; var Class = __webpack_require__(0); var GetValue = __webpack_require__(6); var NOOP = __webpack_require__(1); -var RequestAnimationFrame = __webpack_require__(352); +var RequestAnimationFrame = __webpack_require__(353); // http://www.testufo.com/#test=animation-time-graph @@ -68668,7 +68747,7 @@ module.exports = TimeStep; /***/ }), -/* 352 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68882,7 +68961,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 353 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68973,7 +69052,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 354 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68982,7 +69061,7 @@ module.exports = VisibilityHandler; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arne16 = __webpack_require__(355); +var Arne16 = __webpack_require__(356); var CanvasPool = __webpack_require__(26); var GetValue = __webpack_require__(6); @@ -69095,7 +69174,7 @@ module.exports = GenerateTexture; /***/ }), -/* 355 */ +/* 356 */ /***/ (function(module, exports) { /** @@ -69133,7 +69212,7 @@ module.exports = { /***/ }), -/* 356 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69145,7 +69224,7 @@ module.exports = { // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezier = __webpack_require__(338); +var CubicBezier = __webpack_require__(339); var Curve = __webpack_require__(83); var Vector2 = __webpack_require__(3); @@ -69360,7 +69439,7 @@ module.exports = CubicBezierCurve; /***/ }), -/* 357 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69375,7 +69454,7 @@ var Class = __webpack_require__(0); var Curve = __webpack_require__(83); var DegToRad = __webpack_require__(41); var GetValue = __webpack_require__(6); -var RadToDeg = __webpack_require__(181); +var RadToDeg = __webpack_require__(183); var Vector2 = __webpack_require__(3); /** @@ -69984,7 +70063,7 @@ module.exports = EllipseCurve; /***/ }), -/* 358 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69997,7 +70076,7 @@ module.exports = EllipseCurve; var Class = __webpack_require__(0); var Curve = __webpack_require__(83); -var FromPoints = __webpack_require__(184); +var FromPoints = __webpack_require__(186); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -70287,7 +70366,7 @@ module.exports = LineCurve; /***/ }), -/* 359 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70426,7 +70505,7 @@ module.exports = MoveTo; /***/ }), -/* 360 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70437,7 +70516,7 @@ module.exports = MoveTo; var Class = __webpack_require__(0); var Curve = __webpack_require__(83); -var QuadraticBezierInterpolation = __webpack_require__(339); +var QuadraticBezierInterpolation = __webpack_require__(340); var Vector2 = __webpack_require__(3); /** @@ -70643,7 +70722,7 @@ module.exports = QuadraticBezier; /***/ }), -/* 361 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70654,7 +70733,7 @@ module.exports = QuadraticBezier; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(179); +var CatmullRom = __webpack_require__(181); var Class = __webpack_require__(0); var Curve = __webpack_require__(83); var Vector2 = __webpack_require__(3); @@ -70868,7 +70947,7 @@ module.exports = SplineCurve; /***/ }), -/* 362 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70994,7 +71073,7 @@ module.exports = BaseShader; /***/ }), -/* 363 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71005,31 +71084,31 @@ module.exports = BaseShader; var Color = __webpack_require__(32); -Color.ColorToRGBA = __webpack_require__(836); -Color.ComponentToHex = __webpack_require__(364); -Color.GetColor = __webpack_require__(173); -Color.GetColor32 = __webpack_require__(307); -Color.GetColorFromValue = __webpack_require__(117); -Color.HexStringToColor = __webpack_require__(306); -Color.HSLToColor = __webpack_require__(837); -Color.HSVColorWheel = __webpack_require__(838); -Color.HSVToRGB = __webpack_require__(174); -Color.HueToComponent = __webpack_require__(365); -Color.IntegerToColor = __webpack_require__(309); -Color.IntegerToRGB = __webpack_require__(310); -Color.Interpolate = __webpack_require__(839); -Color.ObjectToColor = __webpack_require__(311); -Color.RandomRGB = __webpack_require__(840); -Color.RGBStringToColor = __webpack_require__(312); -Color.RGBToHSV = __webpack_require__(308); -Color.RGBToString = __webpack_require__(841); -Color.ValueToColor = __webpack_require__(172); +Color.ColorToRGBA = __webpack_require__(840); +Color.ComponentToHex = __webpack_require__(365); +Color.GetColor = __webpack_require__(175); +Color.GetColor32 = __webpack_require__(308); +Color.GetColorFromValue = __webpack_require__(119); +Color.HexStringToColor = __webpack_require__(307); +Color.HSLToColor = __webpack_require__(841); +Color.HSVColorWheel = __webpack_require__(842); +Color.HSVToRGB = __webpack_require__(176); +Color.HueToComponent = __webpack_require__(366); +Color.IntegerToColor = __webpack_require__(310); +Color.IntegerToRGB = __webpack_require__(311); +Color.Interpolate = __webpack_require__(843); +Color.ObjectToColor = __webpack_require__(312); +Color.RandomRGB = __webpack_require__(844); +Color.RGBStringToColor = __webpack_require__(313); +Color.RGBToHSV = __webpack_require__(309); +Color.RGBToString = __webpack_require__(845); +Color.ValueToColor = __webpack_require__(174); module.exports = Color; /***/ }), -/* 364 */ +/* 365 */ /***/ (function(module, exports) { /** @@ -71059,7 +71138,7 @@ module.exports = ComponentToHex; /***/ }), -/* 365 */ +/* 366 */ /***/ (function(module, exports) { /** @@ -71115,7 +71194,7 @@ module.exports = HueToComponent; /***/ }), -/* 366 */ +/* 367 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71124,7 +71203,7 @@ module.exports = HueToComponent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(124); +var OS = __webpack_require__(125); /** * @callback ContentLoadedCallback @@ -71178,7 +71257,7 @@ module.exports = DOMContentLoaded; /***/ }), -/* 367 */ +/* 368 */ /***/ (function(module, exports) { /** @@ -71237,7 +71316,7 @@ module.exports = GetInnerHeight; /***/ }), -/* 368 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71246,7 +71325,7 @@ module.exports = GetInnerHeight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(185); +var CONST = __webpack_require__(187); /** * Attempts to determine the screen orientation using the Orientation API. @@ -71303,7 +71382,7 @@ module.exports = GetScreenOrientation; /***/ }), -/* 369 */ +/* 370 */ /***/ (function(module, exports) { /** @@ -71389,7 +71468,7 @@ module.exports = { /***/ }), -/* 370 */ +/* 371 */ /***/ (function(module, exports) { /** @@ -71442,7 +71521,7 @@ module.exports = { /***/ }), -/* 371 */ +/* 372 */ /***/ (function(module, exports) { /** @@ -71540,7 +71619,7 @@ module.exports = { /***/ }), -/* 372 */ +/* 373 */ /***/ (function(module, exports) { /** @@ -71614,7 +71693,7 @@ module.exports = { /***/ }), -/* 373 */ +/* 374 */ /***/ (function(module, exports) { /** @@ -71665,7 +71744,7 @@ module.exports = GetTarget; /***/ }), -/* 374 */ +/* 375 */ /***/ (function(module, exports) { /** @@ -71722,7 +71801,7 @@ module.exports = ParseXML; /***/ }), -/* 375 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71732,16 +71811,16 @@ module.exports = ParseXML; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(187); +var CONST = __webpack_require__(189); var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(56); var GameEvents = __webpack_require__(21); -var Keyboard = __webpack_require__(376); -var Mouse = __webpack_require__(377); -var Pointer = __webpack_require__(378); -var Touch = __webpack_require__(379); +var Keyboard = __webpack_require__(377); +var Mouse = __webpack_require__(378); +var Pointer = __webpack_require__(379); +var Touch = __webpack_require__(380); var TransformMatrix = __webpack_require__(31); -var TransformXY = __webpack_require__(164); +var TransformXY = __webpack_require__(166); /** * @classdesc @@ -72804,7 +72883,7 @@ module.exports = InputManager; /***/ }), -/* 376 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72813,11 +72892,11 @@ module.exports = InputManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(95); +var ArrayRemove = __webpack_require__(96); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(21); var InputEvents = __webpack_require__(56); -var KeyCodes = __webpack_require__(131); +var KeyCodes = __webpack_require__(132); var NOOP = __webpack_require__(1); /** @@ -73248,7 +73327,7 @@ module.exports = KeyboardManager; /***/ }), -/* 377 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73258,7 +73337,7 @@ module.exports = KeyboardManager; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(177); +var Features = __webpack_require__(179); var InputEvents = __webpack_require__(56); var NOOP = __webpack_require__(1); @@ -73734,7 +73813,7 @@ module.exports = MouseManager; /***/ }), -/* 378 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73743,11 +73822,11 @@ module.exports = MouseManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(329); +var Angle = __webpack_require__(330); var Class = __webpack_require__(0); var Distance = __webpack_require__(55); -var FuzzyEqual = __webpack_require__(108); -var SmoothStepInterpolation = __webpack_require__(340); +var FuzzyEqual = __webpack_require__(109); +var SmoothStepInterpolation = __webpack_require__(341); var Vector2 = __webpack_require__(3); /** @@ -75021,7 +75100,7 @@ module.exports = Pointer; /***/ }), -/* 379 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75434,7 +75513,7 @@ module.exports = TouchManager; /***/ }), -/* 380 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75451,7 +75530,7 @@ var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var Remove = __webpack_require__(95); +var Remove = __webpack_require__(96); /** * @classdesc @@ -76336,7 +76415,7 @@ module.exports = PluginManager; /***/ }), -/* 381 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76345,18 +76424,18 @@ module.exports = PluginManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(185); +var CONST = __webpack_require__(187); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(93); +var Events = __webpack_require__(94); var GameEvents = __webpack_require__(21); -var GetInnerHeight = __webpack_require__(367); -var GetTarget = __webpack_require__(373); -var GetScreenOrientation = __webpack_require__(368); +var GetInnerHeight = __webpack_require__(368); +var GetTarget = __webpack_require__(374); +var GetScreenOrientation = __webpack_require__(369); var NOOP = __webpack_require__(1); var Rectangle = __webpack_require__(9); -var Size = __webpack_require__(382); -var SnapFloor = __webpack_require__(94); +var Size = __webpack_require__(383); +var SnapFloor = __webpack_require__(95); var Vector2 = __webpack_require__(3); /** @@ -78047,7 +78126,7 @@ module.exports = ScaleManager; /***/ }), -/* 382 */ +/* 383 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78058,7 +78137,7 @@ module.exports = ScaleManager; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var SnapFloor = __webpack_require__(94); +var SnapFloor = __webpack_require__(95); var Vector2 = __webpack_require__(3); /** @@ -78825,7 +78904,7 @@ module.exports = Size; /***/ }), -/* 383 */ +/* 384 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78835,14 +78914,14 @@ module.exports = Size; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(132); +var CONST = __webpack_require__(133); var Events = __webpack_require__(20); var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(6); var LoaderEvents = __webpack_require__(84); var NOOP = __webpack_require__(1); -var Scene = __webpack_require__(384); -var Systems = __webpack_require__(188); +var Scene = __webpack_require__(385); +var Systems = __webpack_require__(190); /** * @classdesc @@ -80463,7 +80542,7 @@ module.exports = SceneManager; /***/ }), -/* 384 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80473,7 +80552,7 @@ module.exports = SceneManager; */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(188); +var Systems = __webpack_require__(190); /** * @classdesc @@ -80749,7 +80828,7 @@ module.exports = Scene; /***/ }), -/* 385 */ +/* 386 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80759,7 +80838,7 @@ module.exports = Scene; */ var GetFastValue = __webpack_require__(2); -var UppercaseFirst = __webpack_require__(189); +var UppercaseFirst = __webpack_require__(191); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -80811,7 +80890,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 386 */ +/* 387 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80858,7 +80937,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 387 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80867,10 +80946,10 @@ module.exports = GetScenePlugins; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(132); +var CONST = __webpack_require__(133); var GetValue = __webpack_require__(6); -var Merge = __webpack_require__(133); -var InjectionMap = __webpack_require__(904); +var Merge = __webpack_require__(134); +var InjectionMap = __webpack_require__(908); /** * @namespace Phaser.Scenes.Settings @@ -80954,7 +81033,7 @@ module.exports = Settings; /***/ }), -/* 388 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80964,17 +81043,17 @@ module.exports = Settings; */ var CanvasPool = __webpack_require__(26); -var CanvasTexture = __webpack_require__(389); +var CanvasTexture = __webpack_require__(390); var Class = __webpack_require__(0); var Color = __webpack_require__(32); var CONST = __webpack_require__(34); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(129); +var Events = __webpack_require__(130); var GameEvents = __webpack_require__(21); -var GenerateTexture = __webpack_require__(354); +var GenerateTexture = __webpack_require__(355); var GetValue = __webpack_require__(6); -var Parser = __webpack_require__(391); -var Texture = __webpack_require__(190); +var Parser = __webpack_require__(392); +var Texture = __webpack_require__(192); /** * @callback EachTextureCallback @@ -82156,7 +82235,7 @@ module.exports = TextureManager; /***/ }), -/* 389 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82169,8 +82248,8 @@ var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); var Color = __webpack_require__(32); var CONST = __webpack_require__(34); -var IsSizePowerOfTwo = __webpack_require__(127); -var Texture = __webpack_require__(190); +var IsSizePowerOfTwo = __webpack_require__(128); +var Texture = __webpack_require__(192); /** * @classdesc @@ -82791,7 +82870,7 @@ module.exports = CanvasTexture; /***/ }), -/* 390 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82802,8 +82881,8 @@ module.exports = CanvasTexture; var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var IsSizePowerOfTwo = __webpack_require__(127); -var ScaleModes = __webpack_require__(245); +var IsSizePowerOfTwo = __webpack_require__(128); +var ScaleModes = __webpack_require__(247); /** * @classdesc @@ -83156,7 +83235,7 @@ module.exports = TextureSource; /***/ }), -/* 391 */ +/* 392 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83171,20 +83250,20 @@ module.exports = TextureSource; module.exports = { - AtlasXML: __webpack_require__(905), - Canvas: __webpack_require__(906), - Image: __webpack_require__(907), - JSONArray: __webpack_require__(908), - JSONHash: __webpack_require__(909), - SpriteSheet: __webpack_require__(910), - SpriteSheetFromAtlas: __webpack_require__(911), - UnityYAML: __webpack_require__(912) + AtlasXML: __webpack_require__(909), + Canvas: __webpack_require__(910), + Image: __webpack_require__(911), + JSONArray: __webpack_require__(912), + JSONHash: __webpack_require__(913), + SpriteSheet: __webpack_require__(914), + SpriteSheetFromAtlas: __webpack_require__(915), + UnityYAML: __webpack_require__(916) }; /***/ }), -/* 392 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83194,9 +83273,9 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(393); -var NoAudioSoundManager = __webpack_require__(396); -var WebAudioSoundManager = __webpack_require__(398); +var HTML5AudioSoundManager = __webpack_require__(394); +var NoAudioSoundManager = __webpack_require__(397); +var WebAudioSoundManager = __webpack_require__(399); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -83236,7 +83315,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 393 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83246,10 +83325,10 @@ module.exports = SoundManagerCreator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(134); +var BaseSoundManager = __webpack_require__(135); var Class = __webpack_require__(0); var Events = __webpack_require__(61); -var HTML5AudioSound = __webpack_require__(395); +var HTML5AudioSound = __webpack_require__(396); /** * HTML5 Audio implementation of the Sound Manager. @@ -83705,7 +83784,7 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 394 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83764,7 +83843,7 @@ module.exports = GetFirst; /***/ }), -/* 395 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83774,7 +83853,7 @@ module.exports = GetFirst; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(135); +var BaseSound = __webpack_require__(136); var Class = __webpack_require__(0); var Events = __webpack_require__(61); var Clamp = __webpack_require__(17); @@ -84694,7 +84773,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 396 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84704,10 +84783,10 @@ module.exports = HTML5AudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(134); +var BaseSoundManager = __webpack_require__(135); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var NoAudioSound = __webpack_require__(397); +var NoAudioSound = __webpack_require__(398); var NOOP = __webpack_require__(1); /** @@ -84812,7 +84891,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 397 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84822,7 +84901,7 @@ module.exports = NoAudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(135); +var BaseSound = __webpack_require__(136); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); var Extend = __webpack_require__(19); @@ -85003,7 +85082,7 @@ module.exports = NoAudioSound; /***/ }), -/* 398 */ +/* 399 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85013,11 +85092,11 @@ module.exports = NoAudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64ToArrayBuffer = __webpack_require__(399); -var BaseSoundManager = __webpack_require__(134); +var Base64ToArrayBuffer = __webpack_require__(400); +var BaseSoundManager = __webpack_require__(135); var Class = __webpack_require__(0); var Events = __webpack_require__(61); -var WebAudioSound = __webpack_require__(400); +var WebAudioSound = __webpack_require__(401); /** * @classdesc @@ -85466,7 +85545,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 399 */ +/* 400 */ /***/ (function(module, exports) { /** @@ -85541,7 +85620,7 @@ module.exports = Base64ToArrayBuffer; /***/ }), -/* 400 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85551,7 +85630,7 @@ module.exports = Base64ToArrayBuffer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(135); +var BaseSound = __webpack_require__(136); var Class = __webpack_require__(0); var Events = __webpack_require__(61); @@ -86447,7 +86526,7 @@ module.exports = WebAudioSound; /***/ }), -/* 401 */ +/* 402 */ /***/ (function(module, exports) { /** @@ -86495,7 +86574,7 @@ module.exports = TransposeMatrix; /***/ }), -/* 402 */ +/* 403 */ /***/ (function(module, exports) { /** @@ -86617,7 +86696,7 @@ module.exports = QuickSelect; /***/ }), -/* 403 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86627,7 +86706,7 @@ module.exports = QuickSelect; */ var GetValue = __webpack_require__(6); -var Shuffle = __webpack_require__(119); +var Shuffle = __webpack_require__(121); var BuildChunk = function (a, b, qty) { @@ -86755,7 +86834,7 @@ module.exports = Range; /***/ }), -/* 404 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86770,14 +86849,14 @@ module.exports = Range; module.exports = { - PROCESS_QUEUE_ADD: __webpack_require__(963), - PROCESS_QUEUE_REMOVE: __webpack_require__(964) + PROCESS_QUEUE_ADD: __webpack_require__(967), + PROCESS_QUEUE_REMOVE: __webpack_require__(968) }; /***/ }), -/* 405 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86874,7 +86953,7 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 406 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86884,7 +86963,7 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(96); +var Frame = __webpack_require__(97); /** * @classdesc @@ -87304,7 +87383,7 @@ module.exports = Bob; /***/ }), -/* 407 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87346,7 +87425,7 @@ module.exports = Union; /***/ }), -/* 408 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87357,13 +87436,13 @@ module.exports = Union; var Class = __webpack_require__(0); var Components = __webpack_require__(11); -var DOMElementRender = __webpack_require__(977); +var DOMElementRender = __webpack_require__(981); var GameObject = __webpack_require__(14); var GameObjectEvents = __webpack_require__(29); var IsPlainObject = __webpack_require__(7); -var RemoveFromDOM = __webpack_require__(186); +var RemoveFromDOM = __webpack_require__(188); var SCENE_EVENTS = __webpack_require__(20); -var Vector4 = __webpack_require__(128); +var Vector4 = __webpack_require__(129); /** * @classdesc @@ -88342,7 +88421,7 @@ module.exports = DOMElement; /***/ }), -/* 409 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88351,7 +88430,7 @@ module.exports = DOMElement; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(978); +var CSSBlendModes = __webpack_require__(982); var GameObject = __webpack_require__(14); /** @@ -88464,7 +88543,7 @@ module.exports = DOMElementCSSRenderer; /***/ }), -/* 410 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88477,7 +88556,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GameObjectEvents = __webpack_require__(29); -var ExternRender = __webpack_require__(982); +var ExternRender = __webpack_require__(986); /** * @classdesc @@ -88576,7 +88655,7 @@ module.exports = Extern; /***/ }), -/* 411 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88585,7 +88664,7 @@ module.exports = Extern; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(202); +var CircumferencePoint = __webpack_require__(204); var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -88619,7 +88698,7 @@ module.exports = GetPoint; /***/ }), -/* 412 */ +/* 413 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88628,8 +88707,8 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(413); -var CircumferencePoint = __webpack_require__(202); +var Circumference = __webpack_require__(414); +var CircumferencePoint = __webpack_require__(204); var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); @@ -88673,7 +88752,7 @@ module.exports = GetPoints; /***/ }), -/* 413 */ +/* 414 */ /***/ (function(module, exports) { /** @@ -88705,7 +88784,7 @@ module.exports = Circumference; /***/ }), -/* 414 */ +/* 415 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88714,7 +88793,7 @@ module.exports = Circumference; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(201); +var Commands = __webpack_require__(203); var SetTransform = __webpack_require__(28); /** @@ -88955,7 +89034,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 415 */ +/* 416 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88965,7 +89044,7 @@ module.exports = GraphicsCanvasRenderer; */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(126); +var FloatBetween = __webpack_require__(127); var GetEaseFunction = __webpack_require__(71); var GetFastValue = __webpack_require__(2); var Wrap = __webpack_require__(59); @@ -89546,7 +89625,7 @@ module.exports = EmitterOp; /***/ }), -/* 416 */ +/* 417 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89765,7 +89844,7 @@ module.exports = GravityWell; /***/ }), -/* 417 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90334,7 +90413,7 @@ module.exports = Particle; /***/ }), -/* 418 */ +/* 419 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90346,17 +90425,17 @@ module.exports = Particle; var BlendModes = __webpack_require__(54); var Class = __webpack_require__(0); var Components = __webpack_require__(11); -var DeathZone = __webpack_require__(419); -var EdgeZone = __webpack_require__(420); -var EmitterOp = __webpack_require__(415); +var DeathZone = __webpack_require__(420); +var EdgeZone = __webpack_require__(421); +var EmitterOp = __webpack_require__(416); var GetFastValue = __webpack_require__(2); -var GetRandom = __webpack_require__(194); -var HasAny = __webpack_require__(421); -var HasValue = __webpack_require__(113); -var Particle = __webpack_require__(417); -var RandomZone = __webpack_require__(422); +var GetRandom = __webpack_require__(196); +var HasAny = __webpack_require__(422); +var HasValue = __webpack_require__(115); +var Particle = __webpack_require__(418); +var RandomZone = __webpack_require__(423); var Rectangle = __webpack_require__(9); -var StableSort = __webpack_require__(138); +var StableSort = __webpack_require__(139); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(59); @@ -92405,7 +92484,7 @@ module.exports = ParticleEmitter; /***/ }), -/* 419 */ +/* 420 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92483,7 +92562,7 @@ module.exports = DeathZone; /***/ }), -/* 420 */ +/* 421 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92727,7 +92806,7 @@ module.exports = EdgeZone; /***/ }), -/* 421 */ +/* 422 */ /***/ (function(module, exports) { /** @@ -92764,7 +92843,7 @@ module.exports = HasAny; /***/ }), -/* 422 */ +/* 423 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92837,7 +92916,7 @@ module.exports = RandomZone; /***/ }), -/* 423 */ +/* 424 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92919,7 +92998,7 @@ module.exports = PathFollower; /***/ }), -/* 424 */ +/* 425 */ /***/ (function(module, exports) { /** @@ -93001,7 +93080,7 @@ module.exports = GetTextSize; /***/ }), -/* 425 */ +/* 426 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93013,7 +93092,7 @@ module.exports = GetTextSize; var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var MeasureText = __webpack_require__(426); +var MeasureText = __webpack_require__(427); // Key: [ Object Key, Default Value ] @@ -94107,7 +94186,7 @@ module.exports = TextStyle; /***/ }), -/* 426 */ +/* 427 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94242,7 +94321,7 @@ module.exports = MeasureText; /***/ }), -/* 427 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94251,7 +94330,7 @@ module.exports = MeasureText; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(1016); +var ArcRender = __webpack_require__(1020); var Class = __webpack_require__(0); var DegToRad = __webpack_require__(41); var Earcut = __webpack_require__(60); @@ -94651,7 +94730,7 @@ module.exports = Arc; /***/ }), -/* 428 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94661,7 +94740,7 @@ module.exports = Arc; */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(1019); +var CurveRender = __webpack_require__(1023); var Earcut = __webpack_require__(60); var Rectangle = __webpack_require__(9); var Shape = __webpack_require__(30); @@ -94833,7 +94912,7 @@ module.exports = Curve; /***/ }), -/* 429 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94844,8 +94923,8 @@ module.exports = Curve; var Class = __webpack_require__(0); var Earcut = __webpack_require__(60); -var EllipseRender = __webpack_require__(1022); -var GeomEllipse = __webpack_require__(97); +var EllipseRender = __webpack_require__(1026); +var GeomEllipse = __webpack_require__(98); var Shape = __webpack_require__(30); /** @@ -95020,7 +95099,7 @@ module.exports = Ellipse; /***/ }), -/* 430 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95031,7 +95110,7 @@ module.exports = Ellipse; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); -var GridRender = __webpack_require__(1025); +var GridRender = __webpack_require__(1029); /** * @classdesc @@ -95295,7 +95374,7 @@ module.exports = Grid; /***/ }), -/* 431 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95304,7 +95383,7 @@ module.exports = Grid; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(1028); +var IsoBoxRender = __webpack_require__(1032); var Class = __webpack_require__(0); var Shape = __webpack_require__(30); @@ -95510,7 +95589,7 @@ module.exports = IsoBox; /***/ }), -/* 432 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95520,7 +95599,7 @@ module.exports = IsoBox; */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(1031); +var IsoTriangleRender = __webpack_require__(1035); var Shape = __webpack_require__(30); /** @@ -95756,7 +95835,7 @@ module.exports = IsoTriangle; /***/ }), -/* 433 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95768,7 +95847,7 @@ module.exports = IsoTriangle; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); var GeomLine = __webpack_require__(40); -var LineRender = __webpack_require__(1034); +var LineRender = __webpack_require__(1038); /** * @classdesc @@ -95923,7 +96002,7 @@ module.exports = Line; /***/ }), -/* 434 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95932,13 +96011,13 @@ module.exports = Line; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1037); +var PolygonRender = __webpack_require__(1041); var Class = __webpack_require__(0); var Earcut = __webpack_require__(60); -var GetAABB = __webpack_require__(435); -var GeomPolygon = __webpack_require__(210); +var GetAABB = __webpack_require__(436); +var GeomPolygon = __webpack_require__(212); var Shape = __webpack_require__(30); -var Smooth = __webpack_require__(438); +var Smooth = __webpack_require__(439); /** * @classdesc @@ -96062,7 +96141,7 @@ module.exports = Polygon; /***/ }), -/* 435 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96118,7 +96197,7 @@ module.exports = GetAABB; /***/ }), -/* 436 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96129,7 +96208,7 @@ module.exports = GetAABB; var Length = __webpack_require__(58); var Line = __webpack_require__(40); -var Perimeter = __webpack_require__(437); +var Perimeter = __webpack_require__(438); /** * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon, @@ -96195,7 +96274,7 @@ module.exports = GetPoints; /***/ }), -/* 437 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96243,7 +96322,7 @@ module.exports = Perimeter; /***/ }), -/* 438 */ +/* 439 */ /***/ (function(module, exports) { /** @@ -96319,7 +96398,7 @@ module.exports = Smooth; /***/ }), -/* 439 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96331,7 +96410,7 @@ module.exports = Smooth; var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(9); var Shape = __webpack_require__(30); -var RectangleRender = __webpack_require__(1040); +var RectangleRender = __webpack_require__(1044); /** * @classdesc @@ -96462,7 +96541,7 @@ module.exports = Rectangle; /***/ }), -/* 440 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96471,7 +96550,7 @@ module.exports = Rectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1043); +var StarRender = __webpack_require__(1047); var Class = __webpack_require__(0); var Earcut = __webpack_require__(60); var Shape = __webpack_require__(30); @@ -96750,7 +96829,7 @@ module.exports = Star; /***/ }), -/* 441 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96762,7 +96841,7 @@ module.exports = Star; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); var GeomTriangle = __webpack_require__(73); -var TriangleRender = __webpack_require__(1046); +var TriangleRender = __webpack_require__(1050); /** * @classdesc @@ -96893,7 +96972,7 @@ module.exports = Triangle; /***/ }), -/* 442 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96980,7 +97059,7 @@ module.exports = GetPoint; /***/ }), -/* 443 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97073,7 +97152,7 @@ module.exports = GetPoints; /***/ }), -/* 444 */ +/* 445 */ /***/ (function(module, exports) { /** @@ -97156,7 +97235,7 @@ module.exports = SetValue; /***/ }), -/* 445 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97647,7 +97726,7 @@ module.exports = Light; /***/ }), -/* 446 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97657,7 +97736,7 @@ module.exports = Light; */ var Class = __webpack_require__(0); -var Light = __webpack_require__(445); +var Light = __webpack_require__(446); var Utils = __webpack_require__(10); /** @@ -98016,7 +98095,7 @@ module.exports = LightsManager; /***/ }), -/* 447 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98034,14 +98113,14 @@ var Extend = __webpack_require__(19); var Geom = { - Circle: __webpack_require__(1106), - Ellipse: __webpack_require__(1116), - Intersects: __webpack_require__(448), - Line: __webpack_require__(1136), - Point: __webpack_require__(1158), - Polygon: __webpack_require__(1172), - Rectangle: __webpack_require__(464), - Triangle: __webpack_require__(1205) + Circle: __webpack_require__(1110), + Ellipse: __webpack_require__(1120), + Intersects: __webpack_require__(449), + Line: __webpack_require__(1140), + Point: __webpack_require__(1162), + Polygon: __webpack_require__(1176), + Rectangle: __webpack_require__(465), + Triangle: __webpack_require__(1209) }; @@ -98052,7 +98131,7 @@ module.exports = Geom; /***/ }), -/* 448 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98067,39 +98146,39 @@ module.exports = Geom; module.exports = { - CircleToCircle: __webpack_require__(214), - CircleToRectangle: __webpack_require__(215), - GetCircleToCircle: __webpack_require__(1126), - GetCircleToRectangle: __webpack_require__(1127), - GetLineToCircle: __webpack_require__(216), - GetLineToLine: __webpack_require__(449), - GetLineToPoints: __webpack_require__(450), - GetLineToPolygon: __webpack_require__(451), - GetLineToRectangle: __webpack_require__(218), - GetRaysFromPointToPolygon: __webpack_require__(1128), - GetRectangleIntersection: __webpack_require__(1129), - GetRectangleToRectangle: __webpack_require__(1130), - GetRectangleToTriangle: __webpack_require__(1131), - GetTriangleToCircle: __webpack_require__(1132), - GetTriangleToLine: __webpack_require__(456), - GetTriangleToTriangle: __webpack_require__(1133), - LineToCircle: __webpack_require__(217), + CircleToCircle: __webpack_require__(216), + CircleToRectangle: __webpack_require__(217), + GetCircleToCircle: __webpack_require__(1130), + GetCircleToRectangle: __webpack_require__(1131), + GetLineToCircle: __webpack_require__(218), + GetLineToLine: __webpack_require__(450), + GetLineToPoints: __webpack_require__(451), + GetLineToPolygon: __webpack_require__(452), + GetLineToRectangle: __webpack_require__(220), + GetRaysFromPointToPolygon: __webpack_require__(1132), + GetRectangleIntersection: __webpack_require__(1133), + GetRectangleToRectangle: __webpack_require__(1134), + GetRectangleToTriangle: __webpack_require__(1135), + GetTriangleToCircle: __webpack_require__(1136), + GetTriangleToLine: __webpack_require__(457), + GetTriangleToTriangle: __webpack_require__(1137), + LineToCircle: __webpack_require__(219), LineToLine: __webpack_require__(86), - LineToRectangle: __webpack_require__(452), - PointToLine: __webpack_require__(460), - PointToLineSegment: __webpack_require__(1134), - RectangleToRectangle: __webpack_require__(142), - RectangleToTriangle: __webpack_require__(453), - RectangleToValues: __webpack_require__(1135), - TriangleToCircle: __webpack_require__(455), - TriangleToLine: __webpack_require__(457), - TriangleToTriangle: __webpack_require__(458) + LineToRectangle: __webpack_require__(453), + PointToLine: __webpack_require__(461), + PointToLineSegment: __webpack_require__(1138), + RectangleToRectangle: __webpack_require__(143), + RectangleToTriangle: __webpack_require__(454), + RectangleToValues: __webpack_require__(1139), + TriangleToCircle: __webpack_require__(456), + TriangleToLine: __webpack_require__(458), + TriangleToTriangle: __webpack_require__(459) }; /***/ }), -/* 449 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98168,7 +98247,7 @@ module.exports = GetLineToLine; /***/ }), -/* 450 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98178,7 +98257,7 @@ module.exports = GetLineToLine; */ var Vector3 = __webpack_require__(81); -var GetLineToLine = __webpack_require__(449); +var GetLineToLine = __webpack_require__(450); var Line = __webpack_require__(40); // Temp calculation segment @@ -98245,7 +98324,7 @@ module.exports = GetLineToPoints; /***/ }), -/* 451 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98255,8 +98334,8 @@ module.exports = GetLineToPoints; */ var Vector3 = __webpack_require__(81); -var Vector4 = __webpack_require__(128); -var GetLineToPoints = __webpack_require__(450); +var Vector4 = __webpack_require__(129); +var GetLineToPoints = __webpack_require__(451); // Temp vec3 var tempIntersect = new Vector3(); @@ -98316,7 +98395,7 @@ module.exports = GetLineToPolygon; /***/ }), -/* 452 */ +/* 453 */ /***/ (function(module, exports) { /** @@ -98417,7 +98496,7 @@ module.exports = LineToRectangle; /***/ }), -/* 453 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98428,8 +98507,8 @@ module.exports = LineToRectangle; var LineToLine = __webpack_require__(86); var Contains = __webpack_require__(50); -var ContainsArray = __webpack_require__(219); -var Decompose = __webpack_require__(454); +var ContainsArray = __webpack_require__(221); +var Decompose = __webpack_require__(455); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -98510,7 +98589,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 454 */ +/* 455 */ /***/ (function(module, exports) { /** @@ -98547,7 +98626,7 @@ module.exports = Decompose; /***/ }), -/* 455 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98556,7 +98635,7 @@ module.exports = Decompose; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToCircle = __webpack_require__(217); +var LineToCircle = __webpack_require__(219); var Contains = __webpack_require__(85); /** @@ -98612,7 +98691,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 456 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98623,7 +98702,7 @@ module.exports = TriangleToCircle; */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(457); +var TriangleToLine = __webpack_require__(458); var LineToLine = __webpack_require__(86); /** @@ -98671,7 +98750,7 @@ module.exports = GetTriangleToLine; /***/ }), -/* 457 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98727,7 +98806,7 @@ module.exports = TriangleToLine; /***/ }), -/* 458 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98736,8 +98815,8 @@ module.exports = TriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ContainsArray = __webpack_require__(219); -var Decompose = __webpack_require__(459); +var ContainsArray = __webpack_require__(221); +var Decompose = __webpack_require__(460); var LineToLine = __webpack_require__(86); /** @@ -98817,7 +98896,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 459 */ +/* 460 */ /***/ (function(module, exports) { /** @@ -98852,7 +98931,7 @@ module.exports = Decompose; /***/ }), -/* 460 */ +/* 461 */ /***/ (function(module, exports) { /** @@ -98922,7 +99001,7 @@ module.exports = PointToLine; /***/ }), -/* 461 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98956,7 +99035,7 @@ module.exports = NormalAngle; /***/ }), -/* 462 */ +/* 463 */ /***/ (function(module, exports) { /** @@ -98984,7 +99063,7 @@ module.exports = GetMagnitude; /***/ }), -/* 463 */ +/* 464 */ /***/ (function(module, exports) { /** @@ -99012,7 +99091,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 464 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99023,50 +99102,50 @@ module.exports = GetMagnitudeSq; var Rectangle = __webpack_require__(9); -Rectangle.Area = __webpack_require__(1179); -Rectangle.Ceil = __webpack_require__(1180); -Rectangle.CeilAll = __webpack_require__(1181); -Rectangle.CenterOn = __webpack_require__(176); -Rectangle.Clone = __webpack_require__(1182); +Rectangle.Area = __webpack_require__(1183); +Rectangle.Ceil = __webpack_require__(1184); +Rectangle.CeilAll = __webpack_require__(1185); +Rectangle.CenterOn = __webpack_require__(178); +Rectangle.Clone = __webpack_require__(1186); Rectangle.Contains = __webpack_require__(50); -Rectangle.ContainsPoint = __webpack_require__(1183); -Rectangle.ContainsRect = __webpack_require__(465); -Rectangle.CopyFrom = __webpack_require__(1184); -Rectangle.Decompose = __webpack_require__(454); -Rectangle.Equals = __webpack_require__(1185); -Rectangle.FitInside = __webpack_require__(1186); -Rectangle.FitOutside = __webpack_require__(1187); -Rectangle.Floor = __webpack_require__(1188); -Rectangle.FloorAll = __webpack_require__(1189); -Rectangle.FromPoints = __webpack_require__(184); -Rectangle.FromXY = __webpack_require__(1190); -Rectangle.GetAspectRatio = __webpack_require__(221); -Rectangle.GetCenter = __webpack_require__(1191); -Rectangle.GetPoint = __webpack_require__(159); -Rectangle.GetPoints = __webpack_require__(282); -Rectangle.GetSize = __webpack_require__(1192); -Rectangle.Inflate = __webpack_require__(1193); -Rectangle.Intersection = __webpack_require__(1194); -Rectangle.MarchingAnts = __webpack_require__(293); -Rectangle.MergePoints = __webpack_require__(1195); -Rectangle.MergeRect = __webpack_require__(1196); -Rectangle.MergeXY = __webpack_require__(1197); -Rectangle.Offset = __webpack_require__(1198); -Rectangle.OffsetPoint = __webpack_require__(1199); -Rectangle.Overlaps = __webpack_require__(1200); -Rectangle.Perimeter = __webpack_require__(116); -Rectangle.PerimeterPoint = __webpack_require__(1201); -Rectangle.Random = __webpack_require__(162); -Rectangle.RandomOutside = __webpack_require__(1202); -Rectangle.SameDimensions = __webpack_require__(1203); -Rectangle.Scale = __webpack_require__(1204); -Rectangle.Union = __webpack_require__(407); +Rectangle.ContainsPoint = __webpack_require__(1187); +Rectangle.ContainsRect = __webpack_require__(466); +Rectangle.CopyFrom = __webpack_require__(1188); +Rectangle.Decompose = __webpack_require__(455); +Rectangle.Equals = __webpack_require__(1189); +Rectangle.FitInside = __webpack_require__(1190); +Rectangle.FitOutside = __webpack_require__(1191); +Rectangle.Floor = __webpack_require__(1192); +Rectangle.FloorAll = __webpack_require__(1193); +Rectangle.FromPoints = __webpack_require__(186); +Rectangle.FromXY = __webpack_require__(1194); +Rectangle.GetAspectRatio = __webpack_require__(223); +Rectangle.GetCenter = __webpack_require__(1195); +Rectangle.GetPoint = __webpack_require__(161); +Rectangle.GetPoints = __webpack_require__(283); +Rectangle.GetSize = __webpack_require__(1196); +Rectangle.Inflate = __webpack_require__(1197); +Rectangle.Intersection = __webpack_require__(1198); +Rectangle.MarchingAnts = __webpack_require__(294); +Rectangle.MergePoints = __webpack_require__(1199); +Rectangle.MergeRect = __webpack_require__(1200); +Rectangle.MergeXY = __webpack_require__(1201); +Rectangle.Offset = __webpack_require__(1202); +Rectangle.OffsetPoint = __webpack_require__(1203); +Rectangle.Overlaps = __webpack_require__(1204); +Rectangle.Perimeter = __webpack_require__(118); +Rectangle.PerimeterPoint = __webpack_require__(1205); +Rectangle.Random = __webpack_require__(164); +Rectangle.RandomOutside = __webpack_require__(1206); +Rectangle.SameDimensions = __webpack_require__(1207); +Rectangle.Scale = __webpack_require__(1208); +Rectangle.Union = __webpack_require__(408); module.exports = Rectangle; /***/ }), -/* 465 */ +/* 466 */ /***/ (function(module, exports) { /** @@ -99106,7 +99185,7 @@ module.exports = ContainsRect; /***/ }), -/* 466 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99150,7 +99229,7 @@ module.exports = Centroid; /***/ }), -/* 467 */ +/* 468 */ /***/ (function(module, exports) { /** @@ -99191,7 +99270,7 @@ module.exports = Offset; /***/ }), -/* 468 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99256,7 +99335,7 @@ module.exports = InCenter; /***/ }), -/* 469 */ +/* 470 */ /***/ (function(module, exports) { /** @@ -99292,7 +99371,7 @@ module.exports = CreatePixelPerfectHandler; /***/ }), -/* 470 */ +/* 471 */ /***/ (function(module, exports) { /** @@ -99363,7 +99442,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 471 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99488,7 +99567,7 @@ module.exports = Axis; /***/ }), -/* 472 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99498,7 +99577,7 @@ module.exports = Axis; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(223); +var Events = __webpack_require__(225); /** * @classdesc @@ -99634,7 +99713,7 @@ module.exports = Button; /***/ }), -/* 473 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99643,8 +99722,8 @@ module.exports = Button; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(471); -var Button = __webpack_require__(472); +var Axis = __webpack_require__(472); +var Button = __webpack_require__(473); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); var Vector2 = __webpack_require__(3); @@ -100392,7 +100471,7 @@ module.exports = Gamepad; /***/ }), -/* 474 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100403,7 +100482,7 @@ module.exports = Gamepad; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(144); +var Events = __webpack_require__(145); /** * @classdesc @@ -100794,7 +100873,7 @@ module.exports = Key; /***/ }), -/* 475 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100804,10 +100883,10 @@ module.exports = Key; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(144); +var Events = __webpack_require__(145); var GetFastValue = __webpack_require__(2); -var ProcessKeyCombo = __webpack_require__(1243); -var ResetKeyCombo = __webpack_require__(1245); +var ProcessKeyCombo = __webpack_require__(1247); +var ResetKeyCombo = __webpack_require__(1249); /** * @classdesc @@ -101087,7 +101166,7 @@ module.exports = KeyCombo; /***/ }), -/* 476 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101096,7 +101175,7 @@ module.exports = KeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(224); +var MergeXHRSettings = __webpack_require__(226); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -101168,7 +101247,7 @@ module.exports = XHRLoader; /***/ }), -/* 477 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101182,7 +101261,7 @@ var CONST = __webpack_require__(18); var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var HTML5AudioFile = __webpack_require__(478); +var HTML5AudioFile = __webpack_require__(479); var IsPlainObject = __webpack_require__(7); /** @@ -101442,7 +101521,7 @@ module.exports = AudioFile; /***/ }), -/* 478 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101455,7 +101534,7 @@ var Class = __webpack_require__(0); var Events = __webpack_require__(84); var File = __webpack_require__(22); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(145); +var GetURL = __webpack_require__(146); var IsPlainObject = __webpack_require__(7); /** @@ -101645,7 +101724,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 479 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101816,7 +101895,7 @@ module.exports = ScriptFile; /***/ }), -/* 480 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101991,7 +102070,7 @@ module.exports = TextFile; /***/ }), -/* 481 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102000,12 +102079,12 @@ module.exports = TextFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(482); -var ArcadeSprite = __webpack_require__(147); +var ArcadeImage = __webpack_require__(483); +var ArcadeSprite = __webpack_require__(148); var Class = __webpack_require__(0); var CONST = __webpack_require__(52); -var PhysicsGroup = __webpack_require__(484); -var StaticPhysicsGroup = __webpack_require__(485); +var PhysicsGroup = __webpack_require__(485); +var StaticPhysicsGroup = __webpack_require__(486); /** * @classdesc @@ -102264,7 +102343,7 @@ module.exports = Factory; /***/ }), -/* 482 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102274,8 +102353,8 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(226); -var Image = __webpack_require__(112); +var Components = __webpack_require__(228); +var Image = __webpack_require__(114); /** * @classdesc @@ -102364,13 +102443,13 @@ module.exports = ArcadeImage; /***/ }), -/* 483 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { -var OverlapRect = __webpack_require__(227); +var OverlapRect = __webpack_require__(229); var Circle = __webpack_require__(68); -var CircleToCircle = __webpack_require__(214); -var CircleToRectangle = __webpack_require__(215); +var CircleToCircle = __webpack_require__(216); +var CircleToRectangle = __webpack_require__(217); /** * This method will search the given circular area and return an array of all physics bodies that @@ -102432,7 +102511,7 @@ module.exports = OverlapCirc; /***/ }), -/* 484 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102441,11 +102520,11 @@ module.exports = OverlapCirc; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(147); +var ArcadeSprite = __webpack_require__(148); var Class = __webpack_require__(0); var CONST = __webpack_require__(52); var GetFastValue = __webpack_require__(2); -var Group = __webpack_require__(99); +var Group = __webpack_require__(100); var IsPlainObject = __webpack_require__(7); /** @@ -102726,7 +102805,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 485 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102735,11 +102814,11 @@ module.exports = PhysicsGroup; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(147); +var ArcadeSprite = __webpack_require__(148); var Class = __webpack_require__(0); var CONST = __webpack_require__(52); var GetFastValue = __webpack_require__(2); -var Group = __webpack_require__(99); +var Group = __webpack_require__(100); var IsPlainObject = __webpack_require__(7); /** @@ -102925,7 +103004,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 486 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102934,32 +103013,32 @@ module.exports = StaticPhysicsGroup; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AngleBetweenPoints = __webpack_require__(330); -var Body = __webpack_require__(487); +var AngleBetweenPoints = __webpack_require__(331); +var Body = __webpack_require__(488); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Collider = __webpack_require__(488); +var Collider = __webpack_require__(489); var CONST = __webpack_require__(52); var DistanceBetween = __webpack_require__(55); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(228); -var FuzzyEqual = __webpack_require__(108); -var FuzzyGreaterThan = __webpack_require__(334); -var FuzzyLessThan = __webpack_require__(335); -var GetOverlapX = __webpack_require__(229); -var GetOverlapY = __webpack_require__(230); +var Events = __webpack_require__(230); +var FuzzyEqual = __webpack_require__(109); +var FuzzyGreaterThan = __webpack_require__(335); +var FuzzyLessThan = __webpack_require__(336); +var GetOverlapX = __webpack_require__(231); +var GetOverlapY = __webpack_require__(232); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var ProcessQueue = __webpack_require__(195); -var ProcessTileCallbacks = __webpack_require__(489); +var ProcessQueue = __webpack_require__(197); +var ProcessTileCallbacks = __webpack_require__(490); var Rectangle = __webpack_require__(9); -var RTree = __webpack_require__(490); -var SeparateTile = __webpack_require__(491); -var SeparateX = __webpack_require__(496); -var SeparateY = __webpack_require__(497); -var Set = __webpack_require__(140); -var StaticBody = __webpack_require__(498); -var TileIntersectsBody = __webpack_require__(231); +var RTree = __webpack_require__(491); +var SeparateTile = __webpack_require__(492); +var SeparateX = __webpack_require__(497); +var SeparateY = __webpack_require__(498); +var Set = __webpack_require__(141); +var StaticBody = __webpack_require__(499); +var TileIntersectsBody = __webpack_require__(233); var TransformMatrix = __webpack_require__(31); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(59); @@ -105358,7 +105437,7 @@ module.exports = World; /***/ }), -/* 487 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105370,8 +105449,8 @@ module.exports = World; var Class = __webpack_require__(0); var CONST = __webpack_require__(52); -var Events = __webpack_require__(228); -var RadToDeg = __webpack_require__(181); +var Events = __webpack_require__(230); +var RadToDeg = __webpack_require__(183); var Rectangle = __webpack_require__(9); var RectangleContains = __webpack_require__(50); var Vector2 = __webpack_require__(3); @@ -105765,7 +105844,7 @@ var Body = new Class({ * You can also change it by using the `Body.setBoundsRectangle` method. * * @name Phaser.Physics.Arcade.Body#customBoundsRectangle - * @type {?Phaser.Geom.Rectangle} + * @type {Phaser.Geom.Rectangle} * @since 3.20 */ this.customBoundsRectangle = world.bounds; @@ -107735,7 +107814,7 @@ module.exports = Body; /***/ }), -/* 488 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107918,7 +107997,7 @@ module.exports = Collider; /***/ }), -/* 489 */ +/* 490 */ /***/ (function(module, exports) { /** @@ -107959,7 +108038,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 490 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107969,7 +108048,7 @@ module.exports = ProcessTileCallbacks; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var quickselect = __webpack_require__(402); +var quickselect = __webpack_require__(403); /** * @classdesc @@ -108570,7 +108649,7 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 491 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108579,9 +108658,9 @@ module.exports = rbush; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileCheckX = __webpack_require__(492); -var TileCheckY = __webpack_require__(494); -var TileIntersectsBody = __webpack_require__(231); +var TileCheckX = __webpack_require__(493); +var TileCheckY = __webpack_require__(495); +var TileIntersectsBody = __webpack_require__(233); /** * The core separation function to separate a physics body and a tile. @@ -108690,7 +108769,7 @@ module.exports = SeparateTile; /***/ }), -/* 492 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108699,7 +108778,7 @@ module.exports = SeparateTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(493); +var ProcessTileSeparationX = __webpack_require__(494); /** * Check the body against the given tile on the X axis. @@ -108780,7 +108859,7 @@ module.exports = TileCheckX; /***/ }), -/* 493 */ +/* 494 */ /***/ (function(module, exports) { /** @@ -108827,7 +108906,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 494 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108836,7 +108915,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(495); +var ProcessTileSeparationY = __webpack_require__(496); /** * Check the body against the given tile on the Y axis. @@ -108917,7 +108996,7 @@ module.exports = TileCheckY; /***/ }), -/* 495 */ +/* 496 */ /***/ (function(module, exports) { /** @@ -108964,7 +109043,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 496 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108973,7 +109052,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(229); +var GetOverlapX = __webpack_require__(231); /** * Separates two overlapping bodies on the X-axis (horizontally). @@ -109057,7 +109136,7 @@ module.exports = SeparateX; /***/ }), -/* 497 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109066,7 +109145,7 @@ module.exports = SeparateX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapY = __webpack_require__(230); +var GetOverlapY = __webpack_require__(232); /** * Separates two overlapping bodies on the Y-axis (vertically). @@ -109150,7 +109229,7 @@ module.exports = SeparateY; /***/ }), -/* 498 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110139,9 +110218,9 @@ module.exports = StaticBody; /***/ }), -/* 499 */, /* 500 */, -/* 501 */ +/* 501 */, +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110271,7 +110350,7 @@ module.exports = BasePlugin; /***/ }), -/* 502 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110315,7 +110394,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 503 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110324,7 +110403,7 @@ module.exports = ReplaceByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(103); +var IsInLayerBounds = __webpack_require__(104); /** * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns @@ -110357,7 +110436,7 @@ module.exports = HasTileAt; /***/ }), -/* 504 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110367,8 +110446,8 @@ module.exports = HasTileAt; */ var Tile = __webpack_require__(75); -var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(233); +var IsInLayerBounds = __webpack_require__(104); +var CalculateFacesAt = __webpack_require__(235); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -110419,7 +110498,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 505 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110429,10 +110508,10 @@ module.exports = RemoveTileAt; */ var Formats = __webpack_require__(33); -var Parse2DArray = __webpack_require__(235); -var ParseCSV = __webpack_require__(506); -var ParseJSONTiled = __webpack_require__(507); -var ParseWeltmeister = __webpack_require__(518); +var Parse2DArray = __webpack_require__(237); +var ParseCSV = __webpack_require__(507); +var ParseJSONTiled = __webpack_require__(508); +var ParseWeltmeister = __webpack_require__(519); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -110489,7 +110568,7 @@ module.exports = Parse; /***/ }), -/* 506 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110499,7 +110578,7 @@ module.exports = Parse; */ var Formats = __webpack_require__(33); -var Parse2DArray = __webpack_require__(235); +var Parse2DArray = __webpack_require__(237); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -110537,7 +110616,7 @@ module.exports = ParseCSV; /***/ }), -/* 507 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110547,13 +110626,13 @@ module.exports = ParseCSV; */ var Formats = __webpack_require__(33); -var MapData = __webpack_require__(105); -var ParseTileLayers = __webpack_require__(508); -var ParseImageLayers = __webpack_require__(510); -var ParseTilesets = __webpack_require__(511); -var ParseObjectLayers = __webpack_require__(514); -var BuildTilesetIndex = __webpack_require__(516); -var AssignTileProperties = __webpack_require__(517); +var MapData = __webpack_require__(106); +var ParseTileLayers = __webpack_require__(509); +var ParseImageLayers = __webpack_require__(511); +var ParseTilesets = __webpack_require__(512); +var ParseObjectLayers = __webpack_require__(515); +var BuildTilesetIndex = __webpack_require__(517); +var AssignTileProperties = __webpack_require__(518); /** * Parses a Tiled JSON object into a new MapData object. @@ -110615,7 +110694,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 508 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110624,12 +110703,12 @@ module.exports = ParseJSONTiled; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(509); +var Base64Decode = __webpack_require__(510); var GetFastValue = __webpack_require__(2); -var LayerData = __webpack_require__(104); -var ParseGID = __webpack_require__(236); +var LayerData = __webpack_require__(105); +var ParseGID = __webpack_require__(238); var Tile = __webpack_require__(75); -var CreateGroupLayer = __webpack_require__(153); +var CreateGroupLayer = __webpack_require__(154); /** * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. @@ -110873,7 +110952,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 509 */ +/* 510 */ /***/ (function(module, exports) { /** @@ -110916,7 +110995,7 @@ module.exports = Base64Decode; /***/ }), -/* 510 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110926,7 +111005,7 @@ module.exports = Base64Decode; */ var GetFastValue = __webpack_require__(2); -var CreateGroupLayer = __webpack_require__(153); +var CreateGroupLayer = __webpack_require__(154); /** * Parses a Tiled JSON object into an array of objects with details about the image layers. @@ -111004,7 +111083,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 511 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111013,9 +111092,9 @@ module.exports = ParseImageLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(106); -var ImageCollection = __webpack_require__(512); -var ParseObject = __webpack_require__(237); +var Tileset = __webpack_require__(107); +var ImageCollection = __webpack_require__(513); +var ParseObject = __webpack_require__(239); /** * Tilesets and Image Collections @@ -111173,7 +111252,7 @@ module.exports = ParseTilesets; /***/ }), -/* 512 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111345,7 +111424,7 @@ module.exports = ImageCollection; /***/ }), -/* 513 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111354,7 +111433,7 @@ module.exports = ImageCollection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasValue = __webpack_require__(113); +var HasValue = __webpack_require__(115); /** * Returns a new object that only contains the `keys` that were found on the object provided. @@ -111389,7 +111468,7 @@ module.exports = Pick; /***/ }), -/* 514 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111399,9 +111478,9 @@ module.exports = Pick; */ var GetFastValue = __webpack_require__(2); -var ParseObject = __webpack_require__(237); -var ObjectLayer = __webpack_require__(515); -var CreateGroupLayer = __webpack_require__(153); +var ParseObject = __webpack_require__(239); +var ObjectLayer = __webpack_require__(516); +var CreateGroupLayer = __webpack_require__(154); /** * Parses a Tiled JSON object into an array of ObjectLayer objects. @@ -111488,7 +111567,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 515 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111610,7 +111689,7 @@ module.exports = ObjectLayer; /***/ }), -/* 516 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111619,7 +111698,7 @@ module.exports = ObjectLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(106); +var Tileset = __webpack_require__(107); /** * Master list of tiles -> x, y, index in tileset. @@ -111704,7 +111783,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 517 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111777,7 +111856,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 518 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111787,9 +111866,9 @@ module.exports = AssignTileProperties; */ var Formats = __webpack_require__(33); -var MapData = __webpack_require__(105); -var ParseTileLayers = __webpack_require__(519); -var ParseTilesets = __webpack_require__(520); +var MapData = __webpack_require__(106); +var ParseTileLayers = __webpack_require__(520); +var ParseTilesets = __webpack_require__(521); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -111844,7 +111923,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 519 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111853,7 +111932,7 @@ module.exports = ParseWeltmeister; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LayerData = __webpack_require__(104); +var LayerData = __webpack_require__(105); var Tile = __webpack_require__(75); /** @@ -111930,7 +112009,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 520 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111939,7 +112018,7 @@ module.exports = ParseTileLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(106); +var Tileset = __webpack_require__(107); /** * Tilesets and Image Collections @@ -111981,7 +112060,7 @@ module.exports = ParseTilesets; /***/ }), -/* 521 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111992,16 +112071,16 @@ module.exports = ParseTilesets; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(41); -var DynamicTilemapLayer = __webpack_require__(522); +var DynamicTilemapLayer = __webpack_require__(523); var Extend = __webpack_require__(19); var Formats = __webpack_require__(33); -var LayerData = __webpack_require__(104); -var Rotate = __webpack_require__(343); +var LayerData = __webpack_require__(105); +var Rotate = __webpack_require__(344); var SpliceOne = __webpack_require__(82); -var StaticTilemapLayer = __webpack_require__(523); +var StaticTilemapLayer = __webpack_require__(524); var Tile = __webpack_require__(75); -var TilemapComponents = __webpack_require__(148); -var Tileset = __webpack_require__(106); +var TilemapComponents = __webpack_require__(149); +var Tileset = __webpack_require__(107); /** * @callback TilemapFilterCallback @@ -114538,7 +114617,7 @@ module.exports = Tilemap; /***/ }), -/* 522 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114549,9 +114628,9 @@ module.exports = Tilemap; var Class = __webpack_require__(0); var Components = __webpack_require__(11); -var DynamicTilemapLayerRender = __webpack_require__(1354); +var DynamicTilemapLayerRender = __webpack_require__(1358); var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(148); +var TilemapComponents = __webpack_require__(149); /** * @classdesc @@ -114790,7 +114869,7 @@ var DynamicTilemapLayer = new Class({ this.setOrigin(); this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height); - this.initPipeline('MultiPipeline'); + this.initPipeline(); }, /** @@ -115859,7 +115938,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 523 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115872,9 +115951,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var ModelViewProjection = __webpack_require__(111); -var StaticTilemapLayerRender = __webpack_require__(1357); -var TilemapComponents = __webpack_require__(148); +var ModelViewProjection = __webpack_require__(113); +var StaticTilemapLayerRender = __webpack_require__(1361); +var TilemapComponents = __webpack_require__(149); var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); @@ -116224,7 +116303,7 @@ var StaticTilemapLayer = new Class({ this.updateVBOData(); - this.initPipeline('MultiPipeline'); + this.initPipeline(); this.mvpInit(); @@ -117379,7 +117458,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 524 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117692,7 +117771,7 @@ module.exports = TimerEvent; /***/ }), -/* 525 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117701,7 +117780,7 @@ module.exports = TimerEvent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1371); +var RESERVED = __webpack_require__(1375); /** * Internal function used by the Tween Builder to return an array of properties @@ -117753,7 +117832,7 @@ module.exports = GetProps; /***/ }), -/* 526 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117801,7 +117880,7 @@ module.exports = GetTweens; /***/ }), -/* 527 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117810,15 +117889,15 @@ module.exports = GetTweens; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(241); +var Defaults = __webpack_require__(243); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(90); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(154); +var GetNewValue = __webpack_require__(155); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(240); -var Tween = __webpack_require__(242); -var TweenData = __webpack_require__(244); +var GetValueOp = __webpack_require__(242); +var Tween = __webpack_require__(244); +var TweenData = __webpack_require__(246); /** * Creates a new Number Tween. @@ -117931,7 +118010,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 528 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118177,7 +118256,7 @@ module.exports = StaggerBuilder; /***/ }), -/* 529 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118187,16 +118266,16 @@ module.exports = StaggerBuilder; */ var Clone = __webpack_require__(69); -var Defaults = __webpack_require__(241); +var Defaults = __webpack_require__(243); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(90); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(154); -var GetTargets = __webpack_require__(239); -var GetTweens = __webpack_require__(526); +var GetNewValue = __webpack_require__(155); +var GetTargets = __webpack_require__(241); +var GetTweens = __webpack_require__(527); var GetValue = __webpack_require__(6); -var Timeline = __webpack_require__(530); -var TweenBuilder = __webpack_require__(155); +var Timeline = __webpack_require__(531); +var TweenBuilder = __webpack_require__(156); /** * Builds a Timeline of Tweens based on a configuration object. @@ -118331,7 +118410,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 530 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118342,8 +118421,8 @@ module.exports = TimelineBuilder; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(243); -var TweenBuilder = __webpack_require__(155); +var Events = __webpack_require__(245); +var TweenBuilder = __webpack_require__(156); var TWEEN_CONST = __webpack_require__(91); /** @@ -119236,7 +119315,7 @@ module.exports = Timeline; /***/ }), -/* 531 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119246,12 +119325,12 @@ module.exports = Timeline; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(532); +var CanvasSnapshot = __webpack_require__(533); var CameraEvents = __webpack_require__(42); var Class = __webpack_require__(0); var CONST = __webpack_require__(34); -var GetBlendModes = __webpack_require__(533); -var ScaleEvents = __webpack_require__(93); +var GetBlendModes = __webpack_require__(534); +var ScaleEvents = __webpack_require__(94); var TransformMatrix = __webpack_require__(31); /** @@ -120043,7 +120122,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 532 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120136,7 +120215,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 533 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120146,7 +120225,7 @@ module.exports = CanvasSnapshot; */ var modes = __webpack_require__(54); -var CanvasFeatures = __webpack_require__(328); +var CanvasFeatures = __webpack_require__(329); /** * Returns an array which maps the default blend modes to supported Canvas blend modes. @@ -120200,7 +120279,7 @@ module.exports = GetBlendModes; /***/ }), -/* 534 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120210,27 +120289,22 @@ module.exports = GetBlendModes; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(92); +var BaseCamera = __webpack_require__(93); var CameraEvents = __webpack_require__(42); var Class = __webpack_require__(0); var CONST = __webpack_require__(34); var GameEvents = __webpack_require__(21); -var IsSizePowerOfTwo = __webpack_require__(127); +var IsSizePowerOfTwo = __webpack_require__(128); var NOOP = __webpack_require__(1); -var ProjectOrtho = __webpack_require__(183); -var ScaleEvents = __webpack_require__(93); +var PIPELINE_CONST = __webpack_require__(110); +var PipelineManager = __webpack_require__(536); +var ProjectOrtho = __webpack_require__(185); +var ScaleEvents = __webpack_require__(94); var SpliceOne = __webpack_require__(82); -var TextureEvents = __webpack_require__(129); +var TextureEvents = __webpack_require__(130); var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(535); - -// Default Pipelines -var BitmapMaskPipeline = __webpack_require__(536); -var LightPipeline = __webpack_require__(537); -var MultiPipeline = __webpack_require__(110); -var RopePipeline = __webpack_require__(538); -var SinglePipeline = __webpack_require__(539); +var WebGLSnapshot = __webpack_require__(541); /** * @callback WebGLContextCallback @@ -120313,6 +120387,23 @@ var WebGLRenderer = new Class({ */ this.type = CONST.WEBGL; + /** + * An instance of the Pipeline Manager class, that handles all WebGL Pipelines. + * + * Use this to manage all of your interactions with pipelines, such as adding, getting, + * setting and rendering them. + * + * The Pipeline Manager class is created in the `init` method and then populated + * with pipelines during the `boot` method. + * + * Prior to Phaser v3.50.0 this was just a plain JavaScript object, not a class. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines + * @type {Phaser.Renderer.WebGL.PipelineManager} + * @since 3.50.0 + */ + this.pipelines = null; + /** * The width of the canvas being rendered to. * This is populated in the onResize event handler. @@ -120374,16 +120465,6 @@ var WebGLRenderer = new Class({ */ this.contextLost = false; - /** - * This object will store all pipelines created through addPipeline - * - * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines - * @type {object} - * @default null - * @since 3.0.0 - */ - this.pipelines = null; - /** * Details about the currently scheduled snapshot. * @@ -120488,27 +120569,6 @@ var WebGLRenderer = new Class({ */ this.currentFramebuffer = null; - /** - * Current WebGLPipeline in use. - * - * @name Phaser.Renderer.WebGL.WebGLRenderer#currentPipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @since 3.0.0 - */ - this.currentPipeline = null; - - /** - * The previous WebGLPipeline in use. - * This is set when `clearPipeline` is called and restored in `rebindPipeline` if none is given. - * - * @name Phaser.Renderer.WebGL.WebGLRenderer#previousPipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @since 3.50.0 - */ - this.previousPipeline = null; - /** * Current WebGLProgram in use. * @@ -121027,8 +121087,7 @@ var WebGLRenderer = new Class({ this.startActiveTexture++; gl.activeTexture(gl.TEXTURE1); - // Clear previous pipelines and reload default ones - this.pipelines = {}; + this.pipelines = new PipelineManager(this); this.setBlendMode(CONST.BlendModes.NORMAL); @@ -121048,12 +121107,9 @@ var WebGLRenderer = new Class({ { var game = this.game; - var multi = this.addPipeline('MultiPipeline', new MultiPipeline({ game: game })); + this.pipelines.boot(); - this.addPipeline('SinglePipeline', new SinglePipeline({ game: game })); - this.addPipeline('RopePipeline', new RopePipeline({ game: game })); - this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game })); - this.addPipeline('Light2D', new LightPipeline({ game: game })); + var multi = this.pipelines.get(PIPELINE_CONST.MULTI_PIPELINE); var blank = game.textures.getFrame('__DEFAULT'); @@ -121067,8 +121123,6 @@ var WebGLRenderer = new Class({ gl.enable(gl.SCISSOR_TEST); - this.setPipeline(multi); - game.scale.on(ScaleEvents.RESIZE, this.onResize, this); var baseSize = game.scale.baseSize; @@ -121111,7 +121165,6 @@ var WebGLRenderer = new Class({ resize: function (width, height, resolution) { var gl = this.gl; - var pipelines = this.pipelines; this.width = width; this.height = height; @@ -121119,11 +121172,7 @@ var WebGLRenderer = new Class({ gl.viewport(0, 0, width, height); - // Update all registered pipelines - for (var pipelineName in pipelines) - { - pipelines[pipelineName].resize(width, height, resolution); - } + this.pipelines.resize(width, height, resolution); this.drawingBufferHeight = gl.drawingBufferHeight; @@ -121179,91 +121228,7 @@ var WebGLRenderer = new Class({ */ flush: function () { - if (this.currentPipeline) - { - this.currentPipeline.flush(); - } - }, - - /** - * Checks if a pipeline is present in the current WebGLRenderer - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#hasPipeline - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline. - * - * @return {boolean} `true` if the given pipeline is loaded, otherwise `false`. - */ - hasPipeline: function (pipelineName) - { - return (pipelineName in this.pipelines); - }, - - /** - * Returns the pipeline by name if the pipeline exists - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#getPipeline - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline. - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance, or `null` if not found. - */ - getPipeline: function (pipelineName) - { - return (this.hasPipeline(pipelineName)) ? this.pipelines[pipelineName] : null; - }, - - /** - * Removes a pipeline by name. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#removePipeline - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline to be removed. - * - * @return {this} This WebGLRenderer instance. - */ - removePipeline: function (pipelineName) - { - delete this.pipelines[pipelineName]; - - return this; - }, - - /** - * Adds a pipeline instance into the collection of pipelines - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#addPipeline - * @since 3.0.0 - * - * @param {string} pipelineName - A unique string-based key for the pipeline. - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - A pipeline instance which must extend WebGLPipeline. - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance that was passed. - */ - addPipeline: function (pipelineName, pipelineInstance) - { - if (!this.hasPipeline(pipelineName)) - { - this.pipelines[pipelineName] = pipelineInstance; - } - else - { - console.warn('Pipeline exists: ' + pipelineName); - } - - pipelineInstance.name = pipelineName; - - if (!pipelineInstance.hasBooted) - { - pipelineInstance.boot(); - } - - this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution); - - return pipelineInstance; + this.pipelines.flush(); }, /** @@ -121362,33 +121327,6 @@ var WebGLRenderer = new Class({ this.currentScissor = scissor; }, - /** - * Binds a WebGLPipeline and sets it as the current pipeline to be used. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#setPipeline - * @since 3.0.0 - * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated. - * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any. - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline that was activated. - */ - setPipeline: function (pipelineInstance, gameObject) - { - var current = this.currentPipeline; - - if (current !== pipelineInstance || current.vertexBuffer !== this.currentVertexBuffer || current.program !== this.currentProgram) - { - this.resetTextures(); - this.currentPipeline = pipelineInstance; - this.currentPipeline.bind(); - } - - this.currentPipeline.onBind(gameObject); - - return this.currentPipeline; - }, - /** * Is there an active stencil mask? * @@ -121405,91 +121343,6 @@ var WebGLRenderer = new Class({ return ((mask && mask.isStencil) || (camMask && camMask.isStencil)); }, - /** - * Use this to reset the gl context to the state that Phaser requires to continue rendering. - * Calling this will: - * - * * Disable `DEPTH_TEST`, `CULL_FACE` and `STENCIL_TEST`. - * * Clear the depth buffer and stencil buffers. - * * Reset the viewport size. - * * Reset the blend mode. - * * Bind a blank texture as the active texture on texture unit zero. - * * Rebinds the given pipeline instance. - * - * You should call this having previously called `clearPipeline` and then wishing to return - * control to Phaser again. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#rebindPipeline - * @since 3.16.0 - * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} [pipelineInstance] - The pipeline instance to be activated. - */ - rebindPipeline: function (pipelineInstance) - { - if (pipelineInstance === undefined && this.previousPipeline) - { - pipelineInstance = this.previousPipeline; - } - - if (!pipelineInstance) - { - return; - } - - var gl = this.gl; - - gl.disable(gl.DEPTH_TEST); - gl.disable(gl.CULL_FACE); - - if (this.hasActiveStencilMask()) - { - gl.clear(gl.DEPTH_BUFFER_BIT); - } - else - { - // If there wasn't a stencil mask set before this call, we can disable it safely - gl.disable(gl.STENCIL_TEST); - gl.clear(gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); - } - - gl.viewport(0, 0, this.width, this.height); - - this.currentProgram = null; - this.currentVertexBuffer = null; - this.currentIndexBuffer = null; - - this.setBlendMode(0, true); - - this.resetTextures(); - - this.currentPipeline = pipelineInstance; - this.currentPipeline.bind(true); - this.currentPipeline.onBind(); - }, - - /** - * Flushes the current WebGLPipeline being used and then clears it, along with the - * the current shader program and vertex buffer. Then resets the blend mode to NORMAL. - * Call this before jumping to your own gl context handler, and then call `rebindPipeline` when - * you wish to return control to Phaser again. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#clearPipeline - * @since 3.16.0 - */ - clearPipeline: function () - { - this.flush(); - - this.previousPipeline = this.currentPipeline; - - this.currentPipeline = null; - this.currentProgram = null; - this.currentVertexBuffer = null; - this.currentIndexBuffer = null; - - this.setBlendMode(0, true); - }, - /** * Sets the blend mode to the value given. * @@ -121629,7 +121482,7 @@ var WebGLRenderer = new Class({ */ setTextureSource: function (textureSource) { - if (this.currentPipeline.forceZero) + if (this.pipelines.current.forceZero) { this.setTextureZero(textureSource.glTexture, true); @@ -121859,7 +121712,7 @@ var WebGLRenderer = new Class({ */ setTexture2D: function (texture) { - if (this.currentPipeline.forceZero) + if (this.pipelines.current.forceZero) { this.setTextureZero(texture, true); @@ -122345,14 +122198,6 @@ var WebGLRenderer = new Class({ this.resetTextures(); - /* - if (!this.game.pendingDestroy) - { - // texture we just deleted is in use, so bind a blank texture - this.setBlankTexture(true); - } - */ - return this; }, @@ -122423,10 +122268,10 @@ var WebGLRenderer = new Class({ var cw = camera._cw; var ch = camera._ch; - var MultiPipeline = this.pipelines.MultiPipeline; - var color = camera.backgroundColor; + var MultiPipeline = this.pipelines.MULTI_PIPELINE; + if (camera.renderToTexture) { this.flush(); @@ -122521,12 +122366,10 @@ var WebGLRenderer = new Class({ */ postRenderCamera: function (camera) { - this.setPipeline(this.pipelines.MultiPipeline); + var multiPipeline = this.pipelines.setMulti(); - var MultiPipeline = this.pipelines.MultiPipeline; - - camera.flashEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); - camera.fadeEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); + camera.flashEffect.postRenderWebGL(multiPipeline, Utils.getTintFromFloats); + camera.fadeEffect.postRenderWebGL(multiPipeline, Utils.getTintFromFloats); camera.dirty = false; @@ -122534,7 +122377,7 @@ var WebGLRenderer = new Class({ if (camera.renderToTexture) { - MultiPipeline.flush(); + multiPipeline.flush(); this.setFramebuffer(null); @@ -122542,11 +122385,11 @@ var WebGLRenderer = new Class({ if (camera.renderToGame) { - ProjectOrtho(MultiPipeline, 0, MultiPipeline.width, MultiPipeline.height, 0, -1000.0, 1000.0); + ProjectOrtho(multiPipeline, 0, multiPipeline.width, multiPipeline.height, 0, -1000.0, 1000.0); var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = (camera.pipeline) ? camera.pipeline : MultiPipeline; + var pipeline = (camera.pipeline) ? camera.pipeline : multiPipeline; pipeline.batchTexture( camera, @@ -122594,7 +122437,6 @@ var WebGLRenderer = new Class({ if (this.contextLost) { return; } var gl = this.gl; - var pipelines = this.pipelines; // Make sure we are bound to the main frame buffer gl.bindFramebuffer(gl.FRAMEBUFFER, null); @@ -122610,10 +122452,7 @@ var WebGLRenderer = new Class({ gl.enable(gl.SCISSOR_TEST); - for (var key in pipelines) - { - pipelines[key].onPreRender(); - } + this.pipelines.preRender(); // TODO - Find a way to stop needing to create these arrays every frame // and equally not need a huge array buffer created to hold them @@ -122632,7 +122471,7 @@ var WebGLRenderer = new Class({ this.textureFlush = 0; - this.setPipeline(this.pipelines.MultiPipeline); + this.pipelines.setMulti(); }, /** @@ -122659,12 +122498,8 @@ var WebGLRenderer = new Class({ var list = children.list; var childCount = list.length; - var pipelines = this.pipelines; - for (var key in pipelines) - { - pipelines[key].onRender(scene, camera); - } + this.pipelines.render(scene, camera); // Apply scissor for cam region + render background color, if not transparent this.preRenderCamera(camera); @@ -122768,12 +122603,7 @@ var WebGLRenderer = new Class({ state.callback = null; } - var pipelines = this.pipelines; - - for (var key in pipelines) - { - pipelines[key].onPostRender(); - } + this.pipelines.postRender(); if (this.textureFlush > 0) { @@ -123157,7 +122987,6 @@ var WebGLRenderer = new Class({ var gl = this.gl; var glFilter = [ gl.LINEAR, gl.NEAREST ][filter]; - // this.setTexture2D(texture, 0); gl.activeTexture(gl.TEXTURE0); var currentTexture = gl.getParameter(gl.TEXTURE_BINDING_2D); @@ -123167,7 +122996,6 @@ var WebGLRenderer = new Class({ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, glFilter); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, glFilter); - // this.setTexture2D(null, 0); if (currentTexture) { gl.bindTexture(gl.TEXTURE_2D, currentTexture); @@ -123617,12 +123445,7 @@ var WebGLRenderer = new Class({ this.textureIndexes = []; this.nativeTextures = []; - for (var key in this.pipelines) - { - this.pipelines[key].destroy(); - - delete this.pipelines[key]; - } + this.pipelines.destroy(); this.defaultCamera.destroy(); @@ -123649,7 +123472,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 535 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123658,108 +123481,498 @@ module.exports = WebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasPool = __webpack_require__(26); -var Color = __webpack_require__(32); -var GetFastValue = __webpack_require__(2); +var Class = __webpack_require__(0); +var CustomMap = __webpack_require__(92); +var CONST = __webpack_require__(110); + +// Default Phaser 3 Pipelines +var BitmapMaskPipeline = __webpack_require__(537); +var LightPipeline = __webpack_require__(538); +var MultiPipeline = __webpack_require__(112); +var RopePipeline = __webpack_require__(539); +var SinglePipeline = __webpack_require__(540); /** - * Takes a snapshot of an area from the current frame displayed by a WebGL canvas. - * - * This is then copied to an Image object. When this loads, the results are sent - * to the callback provided in the Snapshot Configuration object. + * @classdesc * - * @function Phaser.Renderer.Snapshot.WebGL - * @since 3.0.0 * - * @param {HTMLCanvasElement} sourceCanvas - The canvas to take a snapshot of. - * @param {Phaser.Types.Renderer.Snapshot.SnapshotState} config - The snapshot configuration object. + * @class PipelineManager + * @memberof Phaser.Renderer.WebGL + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the WebGL Renderer that owns this Pipeline Manager. */ -var WebGLSnapshot = function (sourceCanvas, config) -{ - var gl = sourceCanvas.getContext('experimental-webgl'); +var PipelineManager = new Class({ - var callback = GetFastValue(config, 'callback'); - var type = GetFastValue(config, 'type', 'image/png'); - var encoderOptions = GetFastValue(config, 'encoder', 0.92); - var x = GetFastValue(config, 'x', 0); - var y = GetFastValue(config, 'y', 0); + initialize: - var getPixel = GetFastValue(config, 'getPixel', false); - - var isFramebuffer = GetFastValue(config, 'isFramebuffer', false); - - var bufferWidth = (isFramebuffer) ? GetFastValue(config, 'bufferWidth', 1) : gl.drawingBufferWidth; - var bufferHeight = (isFramebuffer) ? GetFastValue(config, 'bufferHeight', 1) : gl.drawingBufferHeight; - - if (getPixel) + function PipelineManager (renderer) { - var pixel = new Uint8Array(4); + /** + * A reference to the Game instance. + * + * @name Phaser.Renderer.WebGL.PipelineManager#game + * @type {Phaser.Game} + * @since 3.50.0 + */ + this.game = renderer.game; - var destY = (isFramebuffer) ? y : bufferHeight - y; + /** + * A reference to the WebGL Renderer instance. + * + * @name Phaser.Renderer.WebGL.PipelineManager#renderer + * @type {Phaser.Renderer.WebGL.WebGLRenderer} + * @since 3.50.0 + */ + this.renderer = renderer; - gl.readPixels(x, destY, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel); + /** + * This map stores all pipeline instances in this manager. + * + * This is populated with the default pipelines in the `boot` method. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines + * @type {Phaser.Structs.Map.} + * @since 3.50.0 + */ + this.pipelines = new CustomMap(); - callback.call(null, new Color(pixel[0], pixel[1], pixel[2], pixel[3] / 255)); - } - else + /** + * Current pipeline in use by the WebGLRenderer. + * + * @name Phaser.Renderer.WebGL.PipelineManager#current + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @since 3.50.0 + */ + this.current = null; + + /** + * The previous WebGLPipeline that was in use. + * + * This is set when `clearPipeline` is called and restored in `rebindPipeline` if none is given. + * + * @name Phaser.Renderer.WebGL.PipelineManager#previous + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @since 3.50.0 + */ + this.previous = null; + + /** + * A constant-style reference to the Multi Pipeline Instance. + * + * This is the default Phaser 3 pipeline and is used by the WebGL Renderer to manage + * camera effects and more. This property is set during the `boot` method. + * + * @name Phaser.Renderer.WebGL.PipelineManager#MULTI_PIPELINE + * @type {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} + * @default null + * @since 3.50.0 + */ + this.MULTI_PIPELINE = null; + + /** + * A constant-style reference to the Bitmap Mask Pipeline Instance. + * + * This is the default Phaser 3 mask pipeline and is used Game Objects using + * a Bitmap Mask. This property is set during the `boot` method. + * + * @name Phaser.Renderer.WebGL.PipelineManager#BITMAPMASK_PIPELINE + * @type {Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline} + * @default null + * @since 3.50.0 + */ + this.BITMAPMASK_PIPELINE = null; + }, + + /** + * Internal boot handler, called by the WebGLRenderer durings its boot process. + * + * Adds all of the default pipelines, based on the game config, and then calls + * the `boot` method on each one of them. + * + * Finally, the default pipeline is set. + * + * @method Phaser.Renderer.WebGL.PipelineManager#boot + * @since 3.50.0 + */ + boot: function () { - var width = GetFastValue(config, 'width', bufferWidth); - var height = GetFastValue(config, 'height', bufferHeight); + var game = this.game; - var total = width * height * 4; + this.MULTI_PIPELINE = this.add(CONST.MULTI_PIPELINE, new MultiPipeline({ game: game })); + this.BITMAPMASK_PIPELINE = this.add(CONST.BITMAPMASK_PIPELINE, new BitmapMaskPipeline({ game: game })); - var pixels = new Uint8Array(total); + this.add(CONST.SINGLE_PIPELINE, new SinglePipeline({ game: game })); + this.add(CONST.ROPE_PIPELINE, new RopePipeline({ game: game })); + this.add(CONST.LIGHT_PIPELINE, new LightPipeline({ game: game })); - gl.readPixels(x, bufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels); - - var canvas = CanvasPool.createWebGL(this, width, height); - var ctx = canvas.getContext('2d'); + this.set(this.MULTI_PIPELINE); + }, - var imageData = ctx.getImageData(0, 0, width, height); - - var data = imageData.data; + /** + * Adds a pipeline instance to this Pipeline Manager. + * + * The name of the instance must be unique within this manager. + * + * Make sure to pass an instance to this method, not a base class. For example: + * + * ```javascript + * this.add('yourName', new MultiPipeline());` + * ``` + * + * @method Phaser.Renderer.WebGL.PipelineManager#addPipeline + * @since 3.50.0 + * + * @param {string} name - A unique string-based key for the pipeline within the manager. + * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - A pipeline _instance_ which must extend `WebGLPipeline`. + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance that was passed. + */ + add: function (name, pipeline) + { + var pipelines = this.pipelines; + var renderer = this.renderer; - for (var py = 0; py < height; py++) + if (!pipelines.has(name)) { - for (var px = 0; px < width; px++) - { - var sourceIndex = ((height - py) * width + px) * 4; - var destIndex = (isFramebuffer) ? total - ((py * width + (width - px)) * 4) : (py * width + px) * 4; - - data[destIndex + 0] = pixels[sourceIndex + 0]; - data[destIndex + 1] = pixels[sourceIndex + 1]; - data[destIndex + 2] = pixels[sourceIndex + 2]; - data[destIndex + 3] = pixels[sourceIndex + 3]; - } + pipelines.set(name, pipeline); + } + else + { + console.warn('Pipeline exists: ' + name); } - ctx.putImageData(imageData, 0, 0); - - var image = new Image(); + pipeline.name = name; - image.onerror = function () + if (!pipeline.hasBooted) { - callback.call(null); + pipeline.boot(); + } - CanvasPool.remove(canvas); - }; + pipeline.resize(renderer.width, renderer.height, renderer.config.resolution); - image.onload = function () + return pipeline; + }, + + /** + * Resizes handler. + * + * This is called automatically by the `WebGLRenderer` when the game resizes. + * + * @method Phaser.Renderer.WebGL.PipelineManager#resize + * @since 3.50.0 + * + * @param {number} [width] - The new width of the renderer. + * @param {number} [height] - The new height of the renderer. + * @param {number} [resolution] - The new resolution of the renderer. + */ + resize: function (width, height, resolution) + { + var pipelines = this.pipelines; + + pipelines.each(function (pipelineName, pipelineInstance) { - callback.call(null, image); + pipelineInstance.resize(width, height, resolution); + }); + }, - CanvasPool.remove(canvas); - }; + /** + * Calls the `onPreRender` method on each pipeline in this manager. + * + * This is called automatically by the `WebGLRenderer.preRender` method. + * + * @method Phaser.Renderer.WebGL.PipelineManager#preRender + * @since 3.50.0 + */ + preRender: function () + { + var pipelines = this.pipelines; - image.src = canvas.toDataURL(type, encoderOptions); + pipelines.each(function (pipelineName, pipelineInstance) + { + pipelineInstance.onPreRender(); + }); + }, + + /** + * Calls the `onRender` method on each pipeline in this manager. + * + * This is called automatically by the `WebGLRenderer.render` method. + * + * @method Phaser.Renderer.WebGL.PipelineManager#render + * @since 3.50.0 + * + * @param {Phaser.Scene} scene - The Scene to render. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera to render with. + */ + render: function (scene, camera) + { + var pipelines = this.pipelines; + + pipelines.each(function (pipelineName, pipelineInstance) + { + pipelineInstance.onRender(scene, camera); + }); + }, + + /** + * Calls the `onPostRender` method on each pipeline in this manager. + * + * This is called automatically by the `WebGLRenderer.postRender` method. + * + * @method Phaser.Renderer.WebGL.PipelineManager#postRender + * @since 3.50.0 + */ + postRender: function () + { + var pipelines = this.pipelines; + + pipelines.each(function (pipelineName, pipelineInstance) + { + pipelineInstance.onPostRender(); + }); + }, + + /** + * Flushes the current pipeline, if one is bound. + * + * @method Phaser.Renderer.WebGL.PipelineManager#flush + * @since 3.50.0 + */ + flush: function () + { + if (this.current) + { + this.current.flush(); + } + }, + + /** + * Checks if a pipeline is present in the Pipeline Manager. + * + * @method Phaser.Renderer.WebGL.PipelineManager#has + * @since 3.50.0 + * + * @param {string} name - The name of the pipeline to check for. + * + * @return {boolean} `true` if the given pipeline is loaded, otherwise `false`. + */ + has: function (name) + { + return this.pipelines.has(name); + }, + + /** + * Returns the pipeline instance based on the given name. + * + * If no instance exists in this manager, it returns `undefined` instead. + * + * @method Phaser.Renderer.WebGL.PipelineManager#get + * @since 3.50.0 + * + * @param {string} name - The name of the pipeline to get. + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance, or `undefined` if not found. + */ + get: function (name) + { + return this.pipelines.get(name); + }, + + /** + * Removes a pipeline based on the given name. + * + * If no pipeline matches the name, this method does nothing. + * + * Note that the pipeline will not be flushed or destroyed, it's simply removed from + * this manager. + * + * @method Phaser.Renderer.WebGL.PipelineManager#remove + * @since 3.50.0 + * + * @param {string} name - The name of the pipeline to be removed. + */ + remove: function (name) + { + this.pipelines.delete(name); + }, + + /** + * Sets the current pipeline to be used by the `WebGLRenderer`. + * + * This method accepts a pipeline instance as its parameter, not the name. + * + * If the pipeline isn't already the current one, it will also call `resetTextures` on + * the `WebGLRenderer`. After this, `WebGLPipeline.bind` and then `onBind` are called. + * + * @method Phaser.Renderer.WebGL.PipelineManager#set + * @since 3.50.0 + * + * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The pipeline instance to be set as current. + * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any. + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline that was set. + */ + set: function (pipeline, gameObject) + { + var renderer = this.renderer; + var current = this.current; + + if ( + current !== pipeline || + current.vertexBuffer !== renderer.currentVertexBuffer || + current.program !== renderer.currentProgram + ) + { + renderer.resetTextures(); + + this.current = pipeline; + + pipeline.bind(); + } + + pipeline.onBind(gameObject); + + return pipeline; + }, + + /** + * Sets the Multi Pipeline to be the currently bound pipeline. + * + * This is the default Phaser 3 rendering pipeline. + * + * @method Phaser.Renderer.WebGL.PipelineManager#setMulti + * @since 3.50.0 + * + * @return {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} The Multi Pipeline instance. + */ + setMulti: function () + { + return this.set(this.MULTI_PIPELINE); + }, + + /** + * Use this to reset the gl context to the state that Phaser requires to continue rendering. + * + * Calling this will: + * + * * Disable `DEPTH_TEST`, `CULL_FACE` and `STENCIL_TEST`. + * * Clear the depth buffer and stencil buffers. + * * Reset the viewport size. + * * Reset the blend mode. + * * Bind a blank texture as the active texture on texture unit zero. + * * Rebinds the given pipeline instance. + * + * You should call this if you have previously called `clear`, and then wish to return + * rendering control to Phaser again. + * + * @method Phaser.Renderer.WebGL.PipelineManager#rebind + * @since 3.50.0 + * + * @param {Phaser.Renderer.WebGL.WebGLPipeline} [pipeline] - The pipeline instance to be rebound. If not given, the previous pipeline will be bound. + */ + rebind: function (pipeline) + { + if (pipeline === undefined && this.previous) + { + pipeline = this.previous; + } + + if (!pipeline) + { + return; + } + + var renderer = this.renderer; + var gl = renderer.gl; + + gl.disable(gl.DEPTH_TEST); + gl.disable(gl.CULL_FACE); + + if (renderer.hasActiveStencilMask()) + { + gl.clear(gl.DEPTH_BUFFER_BIT); + } + else + { + // If there wasn't a stencil mask set before this call, we can disable it safely + gl.disable(gl.STENCIL_TEST); + gl.clear(gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); + } + + gl.viewport(0, 0, renderer.width, renderer.height); + + renderer.currentProgram = null; + renderer.currentVertexBuffer = null; + renderer.currentIndexBuffer = null; + + renderer.setBlendMode(0, true); + + renderer.resetTextures(); + + this.current = pipeline; + + pipeline.bind(true); + pipeline.onBind(); + }, + + /** + * Flushes the current pipeline being used and then clears it, along with the + * the current shader program and vertex buffer from the `WebGLRenderer`. + * + * Then resets the blend mode to NORMAL. + * + * Call this before jumping to your own gl context handler, and then call `rebind` when + * you wish to return control to Phaser again. + * + * @method Phaser.Renderer.WebGL.PipelineManager#clear + * @since 3.50.0 + */ + clear: function () + { + var renderer = this.renderer; + + this.flush(); + + this.previous = this.current; + this.current = null; + + renderer.currentProgram = null; + renderer.currentVertexBuffer = null; + renderer.currentIndexBuffer = null; + + renderer.setBlendMode(0, true); + }, + + /** + * Destroy the Pipeline Manager, cleaning up all related resources and references. + * + * @method Phaser.Renderer.WebGL.PipelineManager#destroy + * @since 3.50.0 + */ + destroy: function () + { + this.flush(); + + this.pipelines.clear(); + + this.renderer = null; + this.game = null; + this.pipelines = null; + this.current = null; + this.previous = null; } -}; -module.exports = WebGLSnapshot; +}); + +module.exports = PipelineManager; /***/ }), -/* 536 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123771,9 +123984,9 @@ module.exports = WebGLSnapshot; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ShaderSourceFS = __webpack_require__(808); -var ShaderSourceVS = __webpack_require__(809); -var WebGLPipeline = __webpack_require__(109); +var ShaderSourceFS = __webpack_require__(807); +var ShaderSourceVS = __webpack_require__(808); +var WebGLPipeline = __webpack_require__(111); /** * @classdesc @@ -123953,7 +124166,7 @@ var BitmapMaskPipeline = new Class({ } // Bind bitmap mask pipeline and draw - renderer.setPipeline(this); + renderer.pipelines.set(this); gl.activeTexture(gl.TEXTURE1); gl.bindTexture(gl.TEXTURE_2D, mask.maskTexture); @@ -123974,7 +124187,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 537 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123986,9 +124199,9 @@ module.exports = BitmapMaskPipeline; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ShaderSourceFS = __webpack_require__(810); -var MultiPipeline = __webpack_require__(110); -var WebGLPipeline = __webpack_require__(109); +var ShaderSourceFS = __webpack_require__(809); +var MultiPipeline = __webpack_require__(112); +var WebGLPipeline = __webpack_require__(111); var LIGHT_COUNT = 10; @@ -124397,7 +124610,7 @@ module.exports = LightPipeline; /***/ }), -/* 538 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124407,8 +124620,8 @@ module.exports = LightPipeline; */ var Class = __webpack_require__(0); -var ModelViewProjection = __webpack_require__(111); -var MultiPipeline = __webpack_require__(110); +var ModelViewProjection = __webpack_require__(113); +var MultiPipeline = __webpack_require__(112); /** * @classdesc @@ -124469,7 +124682,7 @@ module.exports = RopePipeline; /***/ }), -/* 539 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124480,11 +124693,11 @@ module.exports = RopePipeline; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(111); -var MultiPipeline = __webpack_require__(110); -var ShaderSourceFS = __webpack_require__(813); -var ShaderSourceVS = __webpack_require__(814); -var WebGLPipeline = __webpack_require__(109); +var ModelViewProjection = __webpack_require__(113); +var MultiPipeline = __webpack_require__(112); +var ShaderSourceFS = __webpack_require__(812); +var ShaderSourceVS = __webpack_require__(813); +var WebGLPipeline = __webpack_require__(111); /** * @classdesc @@ -124801,25 +125014,161 @@ module.exports = SinglePipeline; /***/ }), -/* 540 */, -/* 541 */, -/* 542 */, -/* 543 */, -/* 544 */ +/* 541 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CanvasPool = __webpack_require__(26); +var Color = __webpack_require__(32); +var GetFastValue = __webpack_require__(2); + +/** + * Takes a snapshot of an area from the current frame displayed by a WebGL canvas. + * + * This is then copied to an Image object. When this loads, the results are sent + * to the callback provided in the Snapshot Configuration object. + * + * @function Phaser.Renderer.Snapshot.WebGL + * @since 3.0.0 + * + * @param {HTMLCanvasElement} sourceCanvas - The canvas to take a snapshot of. + * @param {Phaser.Types.Renderer.Snapshot.SnapshotState} config - The snapshot configuration object. + */ +var WebGLSnapshot = function (sourceCanvas, config) +{ + var gl = sourceCanvas.getContext('experimental-webgl'); + + var callback = GetFastValue(config, 'callback'); + var type = GetFastValue(config, 'type', 'image/png'); + var encoderOptions = GetFastValue(config, 'encoder', 0.92); + var x = GetFastValue(config, 'x', 0); + var y = GetFastValue(config, 'y', 0); + + var getPixel = GetFastValue(config, 'getPixel', false); + + var isFramebuffer = GetFastValue(config, 'isFramebuffer', false); + + var bufferWidth = (isFramebuffer) ? GetFastValue(config, 'bufferWidth', 1) : gl.drawingBufferWidth; + var bufferHeight = (isFramebuffer) ? GetFastValue(config, 'bufferHeight', 1) : gl.drawingBufferHeight; + + if (getPixel) + { + var pixel = new Uint8Array(4); + + var destY = (isFramebuffer) ? y : bufferHeight - y; + + gl.readPixels(x, destY, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel); + + callback.call(null, new Color(pixel[0], pixel[1], pixel[2], pixel[3] / 255)); + } + else + { + var width = GetFastValue(config, 'width', bufferWidth); + var height = GetFastValue(config, 'height', bufferHeight); + + var total = width * height * 4; + + var pixels = new Uint8Array(total); + + gl.readPixels(x, bufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels); + + var canvas = CanvasPool.createWebGL(this, width, height); + var ctx = canvas.getContext('2d'); + + var imageData = ctx.getImageData(0, 0, width, height); + + var data = imageData.data; + + for (var py = 0; py < height; py++) + { + for (var px = 0; px < width; px++) + { + var sourceIndex = ((height - py) * width + px) * 4; + var destIndex = (isFramebuffer) ? total - ((py * width + (width - px)) * 4) : (py * width + px) * 4; + + data[destIndex + 0] = pixels[sourceIndex + 0]; + data[destIndex + 1] = pixels[sourceIndex + 1]; + data[destIndex + 2] = pixels[sourceIndex + 2]; + data[destIndex + 3] = pixels[sourceIndex + 3]; + } + } + + ctx.putImageData(imageData, 0, 0); + + var image = new Image(); + + image.onerror = function () + { + callback.call(null); + + CanvasPool.remove(canvas); + }; + + image.onload = function () + { + callback.call(null, image); + + CanvasPool.remove(canvas); + }; + + image.src = canvas.toDataURL(type, encoderOptions); + } +}; + +module.exports = WebGLSnapshot; + + +/***/ }), +/* 542 */, +/* 543 */, +/* 544 */, +/* 545 */, +/* 546 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 547 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(545); -__webpack_require__(546); -__webpack_require__(547); __webpack_require__(548); __webpack_require__(549); __webpack_require__(550); __webpack_require__(551); __webpack_require__(552); +__webpack_require__(553); +__webpack_require__(554); +__webpack_require__(555); /***/ }), -/* 545 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -124859,7 +125208,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 546 */ +/* 549 */ /***/ (function(module, exports) { /** @@ -124875,7 +125224,7 @@ if (!Array.isArray) /***/ }), -/* 547 */ +/* 550 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -125062,7 +125411,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 548 */ +/* 551 */ /***/ (function(module, exports) { /** @@ -125077,7 +125426,7 @@ if (!window.console) /***/ }), -/* 549 */ +/* 552 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -125089,7 +125438,7 @@ if (!Math.trunc) { /***/ }), -/* 550 */ +/* 553 */ /***/ (function(module, exports) { /** @@ -125126,7 +125475,7 @@ if (!Math.trunc) { /***/ }), -/* 551 */ +/* 554 */ /***/ (function(module, exports) { // References: @@ -125183,7 +125532,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 552 */ +/* 555 */ /***/ (function(module, exports) { /** @@ -125236,7 +125585,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 553 */ +/* 556 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125245,7 +125594,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var QuickSet = __webpack_require__(252); +var QuickSet = __webpack_require__(253); /** * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. @@ -125284,7 +125633,7 @@ module.exports = AlignTo; /***/ }), -/* 554 */ +/* 557 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125325,7 +125674,7 @@ module.exports = Angle; /***/ }), -/* 555 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -125364,7 +125713,7 @@ module.exports = Call; /***/ }), -/* 556 */ +/* 559 */ /***/ (function(module, exports) { /** @@ -125422,7 +125771,7 @@ module.exports = GetFirst; /***/ }), -/* 557 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -125480,7 +125829,7 @@ module.exports = GetLast; /***/ }), -/* 558 */ +/* 561 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125489,11 +125838,11 @@ module.exports = GetLast; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AlignIn = __webpack_require__(265); -var CONST = __webpack_require__(107); +var AlignIn = __webpack_require__(266); +var CONST = __webpack_require__(108); var GetFastValue = __webpack_require__(2); var NOOP = __webpack_require__(1); -var Zone = __webpack_require__(115); +var Zone = __webpack_require__(117); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -125599,7 +125948,7 @@ module.exports = GridAlign; /***/ }), -/* 559 */ +/* 562 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125894,7 +126243,7 @@ module.exports = Alpha; /***/ }), -/* 560 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -126043,7 +126392,7 @@ module.exports = ComputedSize; /***/ }), -/* 561 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -126168,7 +126517,7 @@ module.exports = Crop; /***/ }), -/* 562 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -126332,7 +126681,7 @@ module.exports = Flip; /***/ }), -/* 563 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126342,7 +126691,7 @@ module.exports = Flip; */ var Rectangle = __webpack_require__(9); -var RotateAround = __webpack_require__(284); +var RotateAround = __webpack_require__(285); var Vector2 = __webpack_require__(3); /** @@ -126691,7 +127040,7 @@ module.exports = GetBounds; /***/ }), -/* 564 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -126714,7 +127063,7 @@ module.exports = 'blur'; /***/ }), -/* 565 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -126736,7 +127085,7 @@ module.exports = 'boot'; /***/ }), -/* 566 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -126759,7 +127108,7 @@ module.exports = 'contextlost'; /***/ }), -/* 567 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -126782,7 +127131,7 @@ module.exports = 'contextrestored'; /***/ }), -/* 568 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -126805,7 +127154,7 @@ module.exports = 'destroy'; /***/ }), -/* 569 */ +/* 572 */ /***/ (function(module, exports) { /** @@ -126827,7 +127176,7 @@ module.exports = 'focus'; /***/ }), -/* 570 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -126853,7 +127202,7 @@ module.exports = 'hidden'; /***/ }), -/* 571 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -126874,7 +127223,7 @@ module.exports = 'pause'; /***/ }), -/* 572 */ +/* 575 */ /***/ (function(module, exports) { /** @@ -126900,7 +127249,7 @@ module.exports = 'postrender'; /***/ }), -/* 573 */ +/* 576 */ /***/ (function(module, exports) { /** @@ -126925,7 +127274,7 @@ module.exports = 'poststep'; /***/ }), -/* 574 */ +/* 577 */ /***/ (function(module, exports) { /** @@ -126950,7 +127299,7 @@ module.exports = 'prerender'; /***/ }), -/* 575 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -126975,7 +127324,7 @@ module.exports = 'prestep'; /***/ }), -/* 576 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -126997,7 +127346,7 @@ module.exports = 'ready'; /***/ }), -/* 577 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -127018,7 +127367,7 @@ module.exports = 'resume'; /***/ }), -/* 578 */ +/* 581 */ /***/ (function(module, exports) { /** @@ -127043,7 +127392,7 @@ module.exports = 'step'; /***/ }), -/* 579 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -127067,7 +127416,7 @@ module.exports = 'visible'; /***/ }), -/* 580 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -127270,7 +127619,7 @@ module.exports = Origin; /***/ }), -/* 581 */ +/* 584 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127697,7 +128046,7 @@ module.exports = PathFollower; /***/ }), -/* 582 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -127884,7 +128233,7 @@ module.exports = Size; /***/ }), -/* 583 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -128014,7 +128363,7 @@ module.exports = Texture; /***/ }), -/* 584 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -128222,7 +128571,7 @@ module.exports = TextureCrop; /***/ }), -/* 585 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128231,7 +128580,7 @@ module.exports = TextureCrop; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColorFromValue = __webpack_require__(117); +var GetColorFromValue = __webpack_require__(119); /** * Provides methods used for setting the tint of a Game Object. @@ -128554,7 +128903,7 @@ module.exports = Tint; /***/ }), -/* 586 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -128586,7 +128935,7 @@ module.exports = 'changedata'; /***/ }), -/* 587 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -128616,7 +128965,7 @@ module.exports = 'changedata-'; /***/ }), -/* 588 */ +/* 591 */ /***/ (function(module, exports) { /** @@ -128644,7 +128993,7 @@ module.exports = 'removedata'; /***/ }), -/* 589 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -128672,7 +129021,7 @@ module.exports = 'setdata'; /***/ }), -/* 590 */ +/* 593 */ /***/ (function(module, exports) { /** @@ -128698,7 +129047,7 @@ module.exports = 'addedtoscene'; /***/ }), -/* 591 */ +/* 594 */ /***/ (function(module, exports) { /** @@ -128723,7 +129072,7 @@ module.exports = 'destroy'; /***/ }), -/* 592 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -128749,7 +129098,7 @@ module.exports = 'removedfromscene'; /***/ }), -/* 593 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -128781,7 +129130,7 @@ module.exports = 'complete'; /***/ }), -/* 594 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -128810,7 +129159,7 @@ module.exports = 'created'; /***/ }), -/* 595 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -128836,7 +129185,7 @@ module.exports = 'error'; /***/ }), -/* 596 */ +/* 599 */ /***/ (function(module, exports) { /** @@ -128868,7 +129217,7 @@ module.exports = 'loop'; /***/ }), -/* 597 */ +/* 600 */ /***/ (function(module, exports) { /** @@ -128896,7 +129245,7 @@ module.exports = 'play'; /***/ }), -/* 598 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -128921,7 +129270,7 @@ module.exports = 'seeked'; /***/ }), -/* 599 */ +/* 602 */ /***/ (function(module, exports) { /** @@ -128947,7 +129296,7 @@ module.exports = 'seeking'; /***/ }), -/* 600 */ +/* 603 */ /***/ (function(module, exports) { /** @@ -128973,7 +129322,7 @@ module.exports = 'stop'; /***/ }), -/* 601 */ +/* 604 */ /***/ (function(module, exports) { /** @@ -128999,7 +129348,7 @@ module.exports = 'timeout'; /***/ }), -/* 602 */ +/* 605 */ /***/ (function(module, exports) { /** @@ -129025,7 +129374,7 @@ module.exports = 'unlocked'; /***/ }), -/* 603 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129066,7 +129415,7 @@ module.exports = IncAlpha; /***/ }), -/* 604 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129107,7 +129456,7 @@ module.exports = IncX; /***/ }), -/* 605 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129154,7 +129503,7 @@ module.exports = IncXY; /***/ }), -/* 606 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129195,7 +129544,7 @@ module.exports = IncY; /***/ }), -/* 607 */ +/* 610 */ /***/ (function(module, exports) { /** @@ -129244,7 +129593,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 608 */ +/* 611 */ /***/ (function(module, exports) { /** @@ -129296,7 +129645,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 609 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129305,7 +129654,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(160); +var GetPoints = __webpack_require__(162); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -129340,7 +129689,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 610 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129349,9 +129698,9 @@ module.exports = PlaceOnLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MarchingAnts = __webpack_require__(293); -var RotateLeft = __webpack_require__(294); -var RotateRight = __webpack_require__(295); +var MarchingAnts = __webpack_require__(294); +var RotateLeft = __webpack_require__(295); +var RotateRight = __webpack_require__(296); /** * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle. @@ -129398,7 +129747,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 611 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129407,7 +129756,7 @@ module.exports = PlaceOnRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BresenhamPoints = __webpack_require__(296); +var BresenhamPoints = __webpack_require__(297); /** * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle. @@ -129459,7 +129808,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 612 */ +/* 615 */ /***/ (function(module, exports) { /** @@ -129496,7 +129845,7 @@ module.exports = PlayAnimation; /***/ }), -/* 613 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129505,7 +129854,7 @@ module.exports = PlayAnimation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(158); +var Random = __webpack_require__(160); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -129536,7 +129885,7 @@ module.exports = RandomCircle; /***/ }), -/* 614 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129545,7 +129894,7 @@ module.exports = RandomCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(165); +var Random = __webpack_require__(167); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -129576,7 +129925,7 @@ module.exports = RandomEllipse; /***/ }), -/* 615 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129585,7 +129934,7 @@ module.exports = RandomEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(161); +var Random = __webpack_require__(163); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -129616,7 +129965,7 @@ module.exports = RandomLine; /***/ }), -/* 616 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129625,7 +129974,7 @@ module.exports = RandomLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(162); +var Random = __webpack_require__(164); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -129654,7 +130003,7 @@ module.exports = RandomRectangle; /***/ }), -/* 617 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129663,7 +130012,7 @@ module.exports = RandomRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(166); +var Random = __webpack_require__(168); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -129694,7 +130043,7 @@ module.exports = RandomTriangle; /***/ }), -/* 618 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129735,7 +130084,7 @@ module.exports = Rotate; /***/ }), -/* 619 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129744,7 +130093,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(167); +var RotateAroundDistance = __webpack_require__(169); var DistanceBetween = __webpack_require__(55); /** @@ -129781,7 +130130,7 @@ module.exports = RotateAround; /***/ }), -/* 620 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129790,7 +130139,7 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(167); +var MathRotateAroundDistance = __webpack_require__(169); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -129830,7 +130179,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 621 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129871,7 +130220,7 @@ module.exports = ScaleX; /***/ }), -/* 622 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129918,7 +130267,7 @@ module.exports = ScaleXY; /***/ }), -/* 623 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129959,7 +130308,7 @@ module.exports = ScaleY; /***/ }), -/* 624 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130000,7 +130349,7 @@ module.exports = SetAlpha; /***/ }), -/* 625 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130040,7 +130389,7 @@ module.exports = SetBlendMode; /***/ }), -/* 626 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130081,7 +130430,7 @@ module.exports = SetDepth; /***/ }), -/* 627 */ +/* 630 */ /***/ (function(module, exports) { /** @@ -130120,7 +130469,7 @@ module.exports = SetHitArea; /***/ }), -/* 628 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130173,7 +130522,7 @@ module.exports = SetOrigin; /***/ }), -/* 629 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130214,7 +130563,7 @@ module.exports = SetRotation; /***/ }), -/* 630 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130261,7 +130610,7 @@ module.exports = SetScale; /***/ }), -/* 631 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130302,7 +130651,7 @@ module.exports = SetScaleX; /***/ }), -/* 632 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130343,7 +130692,7 @@ module.exports = SetScaleY; /***/ }), -/* 633 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130390,7 +130739,7 @@ module.exports = SetScrollFactor; /***/ }), -/* 634 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130431,7 +130780,7 @@ module.exports = SetScrollFactorX; /***/ }), -/* 635 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130472,7 +130821,7 @@ module.exports = SetScrollFactorY; /***/ }), -/* 636 */ +/* 639 */ /***/ (function(module, exports) { /** @@ -130511,7 +130860,7 @@ module.exports = SetTint; /***/ }), -/* 637 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130549,7 +130898,7 @@ module.exports = SetVisible; /***/ }), -/* 638 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130590,7 +130939,7 @@ module.exports = SetX; /***/ }), -/* 639 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130637,7 +130986,7 @@ module.exports = SetXY; /***/ }), -/* 640 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130678,7 +131027,7 @@ module.exports = SetY; /***/ }), -/* 641 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130808,7 +131157,7 @@ module.exports = ShiftPosition; /***/ }), -/* 642 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130817,7 +131166,7 @@ module.exports = ShiftPosition; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayShuffle = __webpack_require__(119); +var ArrayShuffle = __webpack_require__(121); /** * Shuffles the array in place. The shuffled array is both modified and returned. @@ -130841,7 +131190,7 @@ module.exports = Shuffle; /***/ }), -/* 643 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130850,7 +131199,7 @@ module.exports = Shuffle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(168); +var MathSmootherStep = __webpack_require__(170); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -130899,7 +131248,7 @@ module.exports = SmootherStep; /***/ }), -/* 644 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130908,7 +131257,7 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(169); +var MathSmoothStep = __webpack_require__(171); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -130957,7 +131306,7 @@ module.exports = SmoothStep; /***/ }), -/* 645 */ +/* 648 */ /***/ (function(module, exports) { /** @@ -131020,7 +131369,7 @@ module.exports = Spread; /***/ }), -/* 646 */ +/* 649 */ /***/ (function(module, exports) { /** @@ -131056,7 +131405,7 @@ module.exports = ToggleVisible; /***/ }), -/* 647 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131105,7 +131454,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 648 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131120,17 +131469,17 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(170), - AnimationFrame: __webpack_require__(298), - AnimationManager: __webpack_require__(300), - AnimationState: __webpack_require__(248), - Events: __webpack_require__(120) + Animation: __webpack_require__(172), + AnimationFrame: __webpack_require__(299), + AnimationManager: __webpack_require__(301), + AnimationState: __webpack_require__(157), + Events: __webpack_require__(122) }; /***/ }), -/* 649 */ +/* 652 */ /***/ (function(module, exports) { /** @@ -131157,7 +131506,7 @@ module.exports = 'add'; /***/ }), -/* 650 */ +/* 653 */ /***/ (function(module, exports) { /** @@ -131185,6 +131534,7 @@ module.exports = 'add'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -131202,7 +131552,57 @@ module.exports = 'animationcomplete'; /***/ }), -/* 651 */ +/* 654 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Complete Dynamic Key Event. + * + * This event is dispatched by a Sprite when an animation playing on it completes playback. + * This happens when the animation gets to the end of its sequence, factoring in any delays + * or repeats it may have to process. + * + * An animation that is set to loop, or repeat forever, will never fire this event, because + * it never actually completes. If you need to handle this, listen for the `ANIMATION_STOP` + * event instead, as this is emitted when the animation is stopped directly. + * + * The difference between this and the `ANIMATION_COMPLETE` event is that this one has a + * dynamic event name that contains the name of the animation within it. For example, + * if you had an animation called `explode` you could listen for the completion of that + * specific animation by using: `sprite.on('animationcomplete-explode', listener)`. Or, if you + * wish to use types: `sprite.on(Phaser.Animations.Events.ANIMATION_COMPLETE_KEY + 'explode', listener)`. + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_COMPLETE_KEY + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationcomplete-'; + + +/***/ }), +/* 655 */ /***/ (function(module, exports) { /** @@ -131227,6 +131627,7 @@ module.exports = 'animationcomplete'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -131244,7 +131645,7 @@ module.exports = 'animationrepeat'; /***/ }), -/* 652 */ +/* 656 */ /***/ (function(module, exports) { /** @@ -131267,6 +131668,7 @@ module.exports = 'animationrepeat'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -131284,7 +131686,7 @@ module.exports = 'animationrestart'; /***/ }), -/* 653 */ +/* 657 */ /***/ (function(module, exports) { /** @@ -131308,6 +131710,7 @@ module.exports = 'animationrestart'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -131325,7 +131728,7 @@ module.exports = 'animationstart'; /***/ }), -/* 654 */ +/* 658 */ /***/ (function(module, exports) { /** @@ -131349,6 +131752,7 @@ module.exports = 'animationstart'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -131366,7 +131770,7 @@ module.exports = 'animationstop'; /***/ }), -/* 655 */ +/* 659 */ /***/ (function(module, exports) { /** @@ -131394,6 +131798,7 @@ module.exports = 'animationstop'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -131411,7 +131816,7 @@ module.exports = 'animationupdate'; /***/ }), -/* 656 */ +/* 660 */ /***/ (function(module, exports) { /** @@ -131435,7 +131840,7 @@ module.exports = 'pauseall'; /***/ }), -/* 657 */ +/* 661 */ /***/ (function(module, exports) { /** @@ -131459,7 +131864,7 @@ module.exports = 'remove'; /***/ }), -/* 658 */ +/* 662 */ /***/ (function(module, exports) { /** @@ -131482,7 +131887,7 @@ module.exports = 'resumeall'; /***/ }), -/* 659 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131497,15 +131902,15 @@ module.exports = 'resumeall'; module.exports = { - BaseCache: __webpack_require__(302), - CacheManager: __webpack_require__(304), - Events: __webpack_require__(303) + BaseCache: __webpack_require__(303), + CacheManager: __webpack_require__(305), + Events: __webpack_require__(304) }; /***/ }), -/* 660 */ +/* 664 */ /***/ (function(module, exports) { /** @@ -131530,7 +131935,7 @@ module.exports = 'add'; /***/ }), -/* 661 */ +/* 665 */ /***/ (function(module, exports) { /** @@ -131555,7 +131960,7 @@ module.exports = 'remove'; /***/ }), -/* 662 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131574,14 +131979,14 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(663), - Scene2D: __webpack_require__(666) + Controls: __webpack_require__(667), + Scene2D: __webpack_require__(670) }; /***/ }), -/* 663 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131596,14 +132001,14 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(664), - SmoothedKeyControl: __webpack_require__(665) + FixedKeyControl: __webpack_require__(668), + SmoothedKeyControl: __webpack_require__(669) }; /***/ }), -/* 664 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131909,7 +132314,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 665 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132392,7 +132797,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 666 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132407,17 +132812,17 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(305), - BaseCamera: __webpack_require__(92), - CameraManager: __webpack_require__(722), - Effects: __webpack_require__(313), + Camera: __webpack_require__(306), + BaseCamera: __webpack_require__(93), + CameraManager: __webpack_require__(726), + Effects: __webpack_require__(314), Events: __webpack_require__(42) }; /***/ }), -/* 667 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -132440,7 +132845,7 @@ module.exports = 'cameradestroy'; /***/ }), -/* 668 */ +/* 672 */ /***/ (function(module, exports) { /** @@ -132466,7 +132871,7 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 669 */ +/* 673 */ /***/ (function(module, exports) { /** @@ -132496,7 +132901,7 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 670 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -132522,7 +132927,7 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 671 */ +/* 675 */ /***/ (function(module, exports) { /** @@ -132552,7 +132957,7 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 672 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -132576,7 +132981,7 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 673 */ +/* 677 */ /***/ (function(module, exports) { /** @@ -132604,7 +133009,7 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 674 */ +/* 678 */ /***/ (function(module, exports) { /** @@ -132628,7 +133033,7 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 675 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -132655,7 +133060,7 @@ module.exports = 'camerapanstart'; /***/ }), -/* 676 */ +/* 680 */ /***/ (function(module, exports) { /** @@ -132681,7 +133086,7 @@ module.exports = 'postrender'; /***/ }), -/* 677 */ +/* 681 */ /***/ (function(module, exports) { /** @@ -132707,7 +133112,7 @@ module.exports = 'prerender'; /***/ }), -/* 678 */ +/* 682 */ /***/ (function(module, exports) { /** @@ -132731,7 +133136,7 @@ module.exports = 'camerarotatecomplete'; /***/ }), -/* 679 */ +/* 683 */ /***/ (function(module, exports) { /** @@ -132757,7 +133162,7 @@ module.exports = 'camerarotatestart'; /***/ }), -/* 680 */ +/* 684 */ /***/ (function(module, exports) { /** @@ -132781,7 +133186,7 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 681 */ +/* 685 */ /***/ (function(module, exports) { /** @@ -132807,7 +133212,7 @@ module.exports = 'camerashakestart'; /***/ }), -/* 682 */ +/* 686 */ /***/ (function(module, exports) { /** @@ -132831,7 +133236,7 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 683 */ +/* 687 */ /***/ (function(module, exports) { /** @@ -132857,7 +133262,7 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 684 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133245,7 +133650,7 @@ module.exports = Fade; /***/ }), -/* 685 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133596,7 +134001,7 @@ module.exports = Flash; /***/ }), -/* 686 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133607,7 +134012,7 @@ module.exports = Flash; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(122); +var EaseMap = __webpack_require__(123); var Events = __webpack_require__(42); var Vector2 = __webpack_require__(3); @@ -133921,7 +134326,7 @@ module.exports = Pan; /***/ }), -/* 687 */ +/* 691 */ /***/ (function(module, exports) { /** @@ -133952,7 +134357,7 @@ module.exports = In; /***/ }), -/* 688 */ +/* 692 */ /***/ (function(module, exports) { /** @@ -133983,7 +134388,7 @@ module.exports = Out; /***/ }), -/* 689 */ +/* 693 */ /***/ (function(module, exports) { /** @@ -134023,7 +134428,7 @@ module.exports = InOut; /***/ }), -/* 690 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -134068,7 +134473,7 @@ module.exports = In; /***/ }), -/* 691 */ +/* 695 */ /***/ (function(module, exports) { /** @@ -134111,7 +134516,7 @@ module.exports = Out; /***/ }), -/* 692 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -134175,7 +134580,7 @@ module.exports = InOut; /***/ }), -/* 693 */ +/* 697 */ /***/ (function(module, exports) { /** @@ -134203,7 +134608,7 @@ module.exports = In; /***/ }), -/* 694 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -134231,7 +134636,7 @@ module.exports = Out; /***/ }), -/* 695 */ +/* 699 */ /***/ (function(module, exports) { /** @@ -134266,7 +134671,7 @@ module.exports = InOut; /***/ }), -/* 696 */ +/* 700 */ /***/ (function(module, exports) { /** @@ -134294,7 +134699,7 @@ module.exports = In; /***/ }), -/* 697 */ +/* 701 */ /***/ (function(module, exports) { /** @@ -134322,7 +134727,7 @@ module.exports = Out; /***/ }), -/* 698 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -134357,7 +134762,7 @@ module.exports = InOut; /***/ }), -/* 699 */ +/* 703 */ /***/ (function(module, exports) { /** @@ -134412,7 +134817,7 @@ module.exports = In; /***/ }), -/* 700 */ +/* 704 */ /***/ (function(module, exports) { /** @@ -134467,7 +134872,7 @@ module.exports = Out; /***/ }), -/* 701 */ +/* 705 */ /***/ (function(module, exports) { /** @@ -134529,7 +134934,7 @@ module.exports = InOut; /***/ }), -/* 702 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -134557,7 +134962,7 @@ module.exports = In; /***/ }), -/* 703 */ +/* 707 */ /***/ (function(module, exports) { /** @@ -134585,7 +134990,7 @@ module.exports = Out; /***/ }), -/* 704 */ +/* 708 */ /***/ (function(module, exports) { /** @@ -134620,7 +135025,7 @@ module.exports = InOut; /***/ }), -/* 705 */ +/* 709 */ /***/ (function(module, exports) { /** @@ -134648,7 +135053,7 @@ module.exports = Linear; /***/ }), -/* 706 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -134676,7 +135081,7 @@ module.exports = In; /***/ }), -/* 707 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -134704,7 +135109,7 @@ module.exports = Out; /***/ }), -/* 708 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -134739,7 +135144,7 @@ module.exports = InOut; /***/ }), -/* 709 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -134767,7 +135172,7 @@ module.exports = In; /***/ }), -/* 710 */ +/* 714 */ /***/ (function(module, exports) { /** @@ -134795,7 +135200,7 @@ module.exports = Out; /***/ }), -/* 711 */ +/* 715 */ /***/ (function(module, exports) { /** @@ -134830,7 +135235,7 @@ module.exports = InOut; /***/ }), -/* 712 */ +/* 716 */ /***/ (function(module, exports) { /** @@ -134858,7 +135263,7 @@ module.exports = In; /***/ }), -/* 713 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -134886,7 +135291,7 @@ module.exports = Out; /***/ }), -/* 714 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -134921,7 +135326,7 @@ module.exports = InOut; /***/ }), -/* 715 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -134960,7 +135365,7 @@ module.exports = In; /***/ }), -/* 716 */ +/* 720 */ /***/ (function(module, exports) { /** @@ -134999,7 +135404,7 @@ module.exports = Out; /***/ }), -/* 717 */ +/* 721 */ /***/ (function(module, exports) { /** @@ -135038,7 +135443,7 @@ module.exports = InOut; /***/ }), -/* 718 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -135080,7 +135485,7 @@ module.exports = Stepped; /***/ }), -/* 719 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135399,7 +135804,7 @@ module.exports = Shake; /***/ }), -/* 720 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135411,7 +135816,7 @@ module.exports = Shake; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); var Events = __webpack_require__(42); -var EaseMap = __webpack_require__(122); +var EaseMap = __webpack_require__(123); /** * @classdesc @@ -135832,7 +136237,7 @@ module.exports = RotateTo; /***/ }), -/* 721 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135843,7 +136248,7 @@ module.exports = RotateTo; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(122); +var EaseMap = __webpack_require__(123); var Events = __webpack_require__(42); /** @@ -136125,7 +136530,7 @@ module.exports = Zoom; /***/ }), -/* 722 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136134,12 +136539,12 @@ module.exports = Zoom; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Camera = __webpack_require__(305); +var Camera = __webpack_require__(306); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); var RectangleContains = __webpack_require__(50); -var ScaleEvents = __webpack_require__(93); +var ScaleEvents = __webpack_require__(94); var SceneEvents = __webpack_require__(20); /** @@ -136873,7 +137278,7 @@ module.exports = CameraManager; /***/ }), -/* 723 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -136892,7 +137297,7 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 724 */ +/* 728 */ /***/ (function(module, exports) { /** @@ -136911,7 +137316,7 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 725 */ +/* 729 */ /***/ (function(module, exports) { /** @@ -136930,7 +137335,7 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 726 */ +/* 730 */ /***/ (function(module, exports) { /** @@ -136950,7 +137355,7 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 727 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -136971,7 +137376,7 @@ module.exports = 'orientationchange'; /***/ }), -/* 728 */ +/* 732 */ /***/ (function(module, exports) { /** @@ -137002,7 +137407,7 @@ module.exports = 'resize'; /***/ }), -/* 729 */ +/* 733 */ /***/ (function(module, exports) { /** @@ -137028,7 +137433,7 @@ module.exports = 'addedtoscene'; /***/ }), -/* 730 */ +/* 734 */ /***/ (function(module, exports) { /** @@ -137053,7 +137458,7 @@ module.exports = 'boot'; /***/ }), -/* 731 */ +/* 735 */ /***/ (function(module, exports) { /** @@ -137082,7 +137487,7 @@ module.exports = 'create'; /***/ }), -/* 732 */ +/* 736 */ /***/ (function(module, exports) { /** @@ -137109,7 +137514,7 @@ module.exports = 'destroy'; /***/ }), -/* 733 */ +/* 737 */ /***/ (function(module, exports) { /** @@ -137136,7 +137541,7 @@ module.exports = 'pause'; /***/ }), -/* 734 */ +/* 738 */ /***/ (function(module, exports) { /** @@ -137173,7 +137578,7 @@ module.exports = 'postupdate'; /***/ }), -/* 735 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -137210,7 +137615,7 @@ module.exports = 'preupdate'; /***/ }), -/* 736 */ +/* 740 */ /***/ (function(module, exports) { /** @@ -137238,7 +137643,7 @@ module.exports = 'ready'; /***/ }), -/* 737 */ +/* 741 */ /***/ (function(module, exports) { /** @@ -137264,7 +137669,7 @@ module.exports = 'removedfromscene'; /***/ }), -/* 738 */ +/* 742 */ /***/ (function(module, exports) { /** @@ -137300,7 +137705,7 @@ module.exports = 'render'; /***/ }), -/* 739 */ +/* 743 */ /***/ (function(module, exports) { /** @@ -137327,7 +137732,7 @@ module.exports = 'resume'; /***/ }), -/* 740 */ +/* 744 */ /***/ (function(module, exports) { /** @@ -137357,7 +137762,7 @@ module.exports = 'shutdown'; /***/ }), -/* 741 */ +/* 745 */ /***/ (function(module, exports) { /** @@ -137384,7 +137789,7 @@ module.exports = 'sleep'; /***/ }), -/* 742 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -137409,7 +137814,7 @@ module.exports = 'start'; /***/ }), -/* 743 */ +/* 747 */ /***/ (function(module, exports) { /** @@ -137445,7 +137850,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 744 */ +/* 748 */ /***/ (function(module, exports) { /** @@ -137482,7 +137887,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 745 */ +/* 749 */ /***/ (function(module, exports) { /** @@ -137516,7 +137921,7 @@ module.exports = 'transitionout'; /***/ }), -/* 746 */ +/* 750 */ /***/ (function(module, exports) { /** @@ -137556,7 +137961,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 747 */ +/* 751 */ /***/ (function(module, exports) { /** @@ -137591,7 +137996,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 748 */ +/* 752 */ /***/ (function(module, exports) { /** @@ -137628,7 +138033,7 @@ module.exports = 'update'; /***/ }), -/* 749 */ +/* 753 */ /***/ (function(module, exports) { /** @@ -137655,7 +138060,7 @@ module.exports = 'wake'; /***/ }), -/* 750 */ +/* 754 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137670,18 +138075,18 @@ module.exports = 'wake'; module.exports = { - Config: __webpack_require__(326), - CreateRenderer: __webpack_require__(348), - DebugHeader: __webpack_require__(350), + Config: __webpack_require__(327), + CreateRenderer: __webpack_require__(349), + DebugHeader: __webpack_require__(351), Events: __webpack_require__(21), - TimeStep: __webpack_require__(351), - VisibilityHandler: __webpack_require__(353) + TimeStep: __webpack_require__(352), + VisibilityHandler: __webpack_require__(354) }; /***/ }), -/* 751 */ +/* 755 */ /***/ (function(module, exports) { // shim for using process in browser @@ -137871,7 +138276,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 752 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137880,7 +138285,7 @@ process.umask = function() { return 0; }; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(125); +var Browser = __webpack_require__(126); /** * Determines the input support of the browser running this Phaser Game instance. @@ -137946,7 +138351,7 @@ module.exports = init(); /***/ }), -/* 753 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137955,7 +138360,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(125); +var Browser = __webpack_require__(126); /** * Determines the audio playback capabilities of the device running this Phaser Game instance. @@ -138071,7 +138476,7 @@ module.exports = init(); /***/ }), -/* 754 */ +/* 758 */ /***/ (function(module, exports) { /** @@ -138158,7 +138563,7 @@ module.exports = init(); /***/ }), -/* 755 */ +/* 759 */ /***/ (function(module, exports) { /** @@ -138262,7 +138667,7 @@ module.exports = init(); /***/ }), -/* 756 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138277,25 +138682,25 @@ module.exports = init(); module.exports = { - Between: __webpack_require__(329), - BetweenPoints: __webpack_require__(330), - BetweenPointsY: __webpack_require__(757), - BetweenY: __webpack_require__(758), - CounterClockwise: __webpack_require__(759), - Normalize: __webpack_require__(331), - Random: __webpack_require__(760), - RandomDegrees: __webpack_require__(761), - Reverse: __webpack_require__(762), - RotateTo: __webpack_require__(763), - ShortestBetween: __webpack_require__(764), - Wrap: __webpack_require__(246), - WrapDegrees: __webpack_require__(247) + Between: __webpack_require__(330), + BetweenPoints: __webpack_require__(331), + BetweenPointsY: __webpack_require__(761), + BetweenY: __webpack_require__(762), + CounterClockwise: __webpack_require__(763), + Normalize: __webpack_require__(332), + Random: __webpack_require__(764), + RandomDegrees: __webpack_require__(765), + Reverse: __webpack_require__(766), + RotateTo: __webpack_require__(767), + ShortestBetween: __webpack_require__(768), + Wrap: __webpack_require__(248), + WrapDegrees: __webpack_require__(249) }; /***/ }), -/* 757 */ +/* 761 */ /***/ (function(module, exports) { /** @@ -138327,7 +138732,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 758 */ +/* 762 */ /***/ (function(module, exports) { /** @@ -138361,7 +138766,7 @@ module.exports = BetweenY; /***/ }), -/* 759 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138406,7 +138811,7 @@ module.exports = CounterClockwise; /***/ }), -/* 760 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138416,7 +138821,7 @@ module.exports = CounterClockwise; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(126); +var FloatBetween = __webpack_require__(127); /** * Returns a random angle in the range [-pi, pi]. @@ -138435,7 +138840,7 @@ module.exports = Random; /***/ }), -/* 761 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138445,7 +138850,7 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(126); +var FloatBetween = __webpack_require__(127); /** * Returns a random angle in the range [-180, 180]. @@ -138464,7 +138869,7 @@ module.exports = RandomDegrees; /***/ }), -/* 762 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138473,7 +138878,7 @@ module.exports = RandomDegrees; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(331); +var Normalize = __webpack_require__(332); /** * Reverse the given angle. @@ -138494,7 +138899,7 @@ module.exports = Reverse; /***/ }), -/* 763 */ +/* 767 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138561,7 +138966,7 @@ module.exports = RotateTo; /***/ }), -/* 764 */ +/* 768 */ /***/ (function(module, exports) { /** @@ -138610,7 +139015,7 @@ module.exports = ShortestBetween; /***/ }), -/* 765 */ +/* 769 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138626,18 +139031,18 @@ module.exports = ShortestBetween; module.exports = { Between: __webpack_require__(55), - BetweenPoints: __webpack_require__(332), - BetweenPointsSquared: __webpack_require__(766), - Chebyshev: __webpack_require__(767), - Power: __webpack_require__(768), - Snake: __webpack_require__(769), - Squared: __webpack_require__(333) + BetweenPoints: __webpack_require__(333), + BetweenPointsSquared: __webpack_require__(770), + Chebyshev: __webpack_require__(771), + Power: __webpack_require__(772), + Snake: __webpack_require__(773), + Squared: __webpack_require__(334) }; /***/ }), -/* 766 */ +/* 770 */ /***/ (function(module, exports) { /** @@ -138669,7 +139074,7 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), -/* 767 */ +/* 771 */ /***/ (function(module, exports) { /** @@ -138703,7 +139108,7 @@ module.exports = ChebyshevDistance; /***/ }), -/* 768 */ +/* 772 */ /***/ (function(module, exports) { /** @@ -138737,7 +139142,7 @@ module.exports = DistancePower; /***/ }), -/* 769 */ +/* 773 */ /***/ (function(module, exports) { /** @@ -138771,7 +139176,7 @@ module.exports = SnakeDistance; /***/ }), -/* 770 */ +/* 774 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138786,24 +139191,24 @@ module.exports = SnakeDistance; module.exports = { - Back: __webpack_require__(314), - Bounce: __webpack_require__(315), - Circular: __webpack_require__(316), - Cubic: __webpack_require__(317), - Elastic: __webpack_require__(318), - Expo: __webpack_require__(319), - Linear: __webpack_require__(320), - Quadratic: __webpack_require__(321), - Quartic: __webpack_require__(322), - Quintic: __webpack_require__(323), - Sine: __webpack_require__(324), - Stepped: __webpack_require__(325) + Back: __webpack_require__(315), + Bounce: __webpack_require__(316), + Circular: __webpack_require__(317), + Cubic: __webpack_require__(318), + Elastic: __webpack_require__(319), + Expo: __webpack_require__(320), + Linear: __webpack_require__(321), + Quadratic: __webpack_require__(322), + Quartic: __webpack_require__(323), + Quintic: __webpack_require__(324), + Sine: __webpack_require__(325), + Stepped: __webpack_require__(326) }; /***/ }), -/* 771 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138818,17 +139223,17 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(772), - Equal: __webpack_require__(108), - Floor: __webpack_require__(773), - GreaterThan: __webpack_require__(334), - LessThan: __webpack_require__(335) + Ceil: __webpack_require__(776), + Equal: __webpack_require__(109), + Floor: __webpack_require__(777), + GreaterThan: __webpack_require__(335), + LessThan: __webpack_require__(336) }; /***/ }), -/* 772 */ +/* 776 */ /***/ (function(module, exports) { /** @@ -138859,7 +139264,7 @@ module.exports = Ceil; /***/ }), -/* 773 */ +/* 777 */ /***/ (function(module, exports) { /** @@ -138890,7 +139295,7 @@ module.exports = Floor; /***/ }), -/* 774 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138905,19 +139310,19 @@ module.exports = Floor; module.exports = { - Bezier: __webpack_require__(775), - CatmullRom: __webpack_require__(776), - CubicBezier: __webpack_require__(338), - Linear: __webpack_require__(777), - QuadraticBezier: __webpack_require__(339), - SmoothStep: __webpack_require__(340), - SmootherStep: __webpack_require__(778) + Bezier: __webpack_require__(779), + CatmullRom: __webpack_require__(780), + CubicBezier: __webpack_require__(339), + Linear: __webpack_require__(781), + QuadraticBezier: __webpack_require__(340), + SmoothStep: __webpack_require__(341), + SmootherStep: __webpack_require__(782) }; /***/ }), -/* 775 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138926,7 +139331,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(336); +var Bernstein = __webpack_require__(337); /** * A bezier interpolation method. @@ -138956,7 +139361,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 776 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138965,7 +139370,7 @@ module.exports = BezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(179); +var CatmullRom = __webpack_require__(181); /** * A Catmull-Rom interpolation method. @@ -139013,7 +139418,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 777 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139022,7 +139427,7 @@ module.exports = CatmullRomInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(123); +var Linear = __webpack_require__(124); /** * A linear interpolation method. @@ -139060,7 +139465,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 778 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139069,7 +139474,7 @@ module.exports = LinearInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(168); +var SmootherStep = __webpack_require__(170); /** * A Smoother Step interpolation method. @@ -139093,7 +139498,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 779 */ +/* 783 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139108,15 +139513,15 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(341), - IsSize: __webpack_require__(127), - IsValue: __webpack_require__(780) + GetNext: __webpack_require__(342), + IsSize: __webpack_require__(128), + IsValue: __webpack_require__(784) }; /***/ }), -/* 780 */ +/* 784 */ /***/ (function(module, exports) { /** @@ -139144,7 +139549,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 781 */ +/* 785 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139159,15 +139564,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(342), - Floor: __webpack_require__(94), - To: __webpack_require__(782) + Ceil: __webpack_require__(343), + Floor: __webpack_require__(95), + To: __webpack_require__(786) }; /***/ }), -/* 782 */ +/* 786 */ /***/ (function(module, exports) { /** @@ -139210,7 +139615,7 @@ module.exports = SnapTo; /***/ }), -/* 783 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139720,7 +140125,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 784 */ +/* 788 */ /***/ (function(module, exports) { /** @@ -139755,7 +140160,7 @@ module.exports = Average; /***/ }), -/* 785 */ +/* 789 */ /***/ (function(module, exports) { /** @@ -139792,7 +140197,7 @@ module.exports = CeilTo; /***/ }), -/* 786 */ +/* 790 */ /***/ (function(module, exports) { /** @@ -139821,7 +140226,7 @@ module.exports = Difference; /***/ }), -/* 787 */ +/* 791 */ /***/ (function(module, exports) { /** @@ -139858,7 +140263,7 @@ module.exports = FloorTo; /***/ }), -/* 788 */ +/* 792 */ /***/ (function(module, exports) { /** @@ -139891,7 +140296,7 @@ module.exports = GetSpeed; /***/ }), -/* 789 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -139922,7 +140327,7 @@ module.exports = IsEven; /***/ }), -/* 790 */ +/* 794 */ /***/ (function(module, exports) { /** @@ -139951,7 +140356,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 791 */ +/* 795 */ /***/ (function(module, exports) { /** @@ -139981,7 +140386,7 @@ module.exports = MaxAdd; /***/ }), -/* 792 */ +/* 796 */ /***/ (function(module, exports) { /** @@ -140011,7 +140416,7 @@ module.exports = MinSub; /***/ }), -/* 793 */ +/* 797 */ /***/ (function(module, exports) { /** @@ -140070,7 +140475,7 @@ module.exports = Percent; /***/ }), -/* 794 */ +/* 798 */ /***/ (function(module, exports) { /** @@ -140110,7 +140515,7 @@ module.exports = RandomXY; /***/ }), -/* 795 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -140149,7 +140554,7 @@ module.exports = RandomXYZ; /***/ }), -/* 796 */ +/* 800 */ /***/ (function(module, exports) { /** @@ -140186,7 +140591,7 @@ module.exports = RandomXYZW; /***/ }), -/* 797 */ +/* 801 */ /***/ (function(module, exports) { /** @@ -140223,7 +140628,7 @@ module.exports = RotateTo; /***/ }), -/* 798 */ +/* 802 */ /***/ (function(module, exports) { /** @@ -140275,7 +140680,7 @@ module.exports = RoundTo; /***/ }), -/* 799 */ +/* 803 */ /***/ (function(module, exports) { /** @@ -140328,7 +140733,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 800 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140386,7 +140791,7 @@ module.exports = ToXY; /***/ }), -/* 801 */ +/* 805 */ /***/ (function(module, exports) { /** @@ -140416,7 +140821,7 @@ module.exports = Within; /***/ }), -/* 802 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140426,8 +140831,8 @@ module.exports = Within; */ var Vector3 = __webpack_require__(81); -var Matrix4 = __webpack_require__(346); -var Quaternion = __webpack_require__(347); +var Matrix4 = __webpack_require__(347); +var Quaternion = __webpack_require__(348); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -140463,142 +140868,10 @@ var RotateVec3 = function (vec, axis, radians) module.exports = RotateVec3; -/***/ }), -/* 803 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Texture Add Event. - * - * This event is dispatched by the Texture Manager when a texture is added to it. - * - * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`. - * - * @event Phaser.Textures.Events#ADD - * @since 3.0.0 - * - * @param {string} key - The key of the Texture that was added to the Texture Manager. - * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was added to the Texture Manager. - */ -module.exports = 'addtexture'; - - -/***/ }), -/* 804 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Texture Load Error Event. - * - * This event is dispatched by the Texture Manager when a texture it requested to load failed. - * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin. - * - * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`. - * - * @event Phaser.Textures.Events#ERROR - * @since 3.0.0 - * - * @param {string} key - The key of the Texture that failed to load into the Texture Manager. - */ -module.exports = 'onerror'; - - -/***/ }), -/* 805 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Texture Load Event. - * - * This event is dispatched by the Texture Manager when a texture has finished loading on it. - * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin. - * - * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`. - * - * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event. - * - * @event Phaser.Textures.Events#LOAD - * @since 3.0.0 - * - * @param {string} key - The key of the Texture that was loaded by the Texture Manager. - * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was loaded by the Texture Manager. - */ -module.exports = 'onload'; - - -/***/ }), -/* 806 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * This internal event signifies that the Texture Manager is now ready and the Game can continue booting. - * - * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking - * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game - * instance, which tells the Game to carry on booting. - * - * @event Phaser.Textures.Events#READY - * @since 3.16.1 - */ -module.exports = 'ready'; - - /***/ }), /* 807 */ /***/ (function(module, exports) { -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Texture Remove Event. - * - * This event is dispatched by the Texture Manager when a texture is removed from it. - * - * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`. - * - * If you have any Game Objects still using the removed texture, they will start throwing - * errors the next time they try to render. Be sure to clear all use of the texture in this event handler. - * - * @event Phaser.Textures.Events#REMOVE - * @since 3.0.0 - * - * @param {string} key - The key of the Texture that was removed from the Texture Manager. - */ -module.exports = 'removetexture'; - - -/***/ }), -/* 808 */ -/***/ (function(module, exports) { - module.exports = [ '#define SHADER_NAME PHASER_BITMAP_MASK_FS', '', @@ -140632,7 +140905,7 @@ module.exports = [ /***/ }), -/* 809 */ +/* 808 */ /***/ (function(module, exports) { module.exports = [ @@ -140651,7 +140924,7 @@ module.exports = [ /***/ }), -/* 810 */ +/* 809 */ /***/ (function(module, exports) { module.exports = [ @@ -140710,7 +140983,7 @@ module.exports = [ /***/ }), -/* 811 */ +/* 810 */ /***/ (function(module, exports) { module.exports = [ @@ -140758,7 +141031,7 @@ module.exports = [ /***/ }), -/* 812 */ +/* 811 */ /***/ (function(module, exports) { module.exports = [ @@ -140796,7 +141069,7 @@ module.exports = [ /***/ }), -/* 813 */ +/* 812 */ /***/ (function(module, exports) { module.exports = [ @@ -140840,7 +141113,7 @@ module.exports = [ /***/ }), -/* 814 */ +/* 813 */ /***/ (function(module, exports) { module.exports = [ @@ -140873,8 +141146,140 @@ module.exports = [ ].join('\n'); +/***/ }), +/* 814 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Texture Add Event. + * + * This event is dispatched by the Texture Manager when a texture is added to it. + * + * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`. + * + * @event Phaser.Textures.Events#ADD + * @since 3.0.0 + * + * @param {string} key - The key of the Texture that was added to the Texture Manager. + * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was added to the Texture Manager. + */ +module.exports = 'addtexture'; + + /***/ }), /* 815 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Texture Load Error Event. + * + * This event is dispatched by the Texture Manager when a texture it requested to load failed. + * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin. + * + * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`. + * + * @event Phaser.Textures.Events#ERROR + * @since 3.0.0 + * + * @param {string} key - The key of the Texture that failed to load into the Texture Manager. + */ +module.exports = 'onerror'; + + +/***/ }), +/* 816 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Texture Load Event. + * + * This event is dispatched by the Texture Manager when a texture has finished loading on it. + * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin. + * + * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`. + * + * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event. + * + * @event Phaser.Textures.Events#LOAD + * @since 3.0.0 + * + * @param {string} key - The key of the Texture that was loaded by the Texture Manager. + * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was loaded by the Texture Manager. + */ +module.exports = 'onload'; + + +/***/ }), +/* 817 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * This internal event signifies that the Texture Manager is now ready and the Game can continue booting. + * + * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking + * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game + * instance, which tells the Game to carry on booting. + * + * @event Phaser.Textures.Events#READY + * @since 3.16.1 + */ +module.exports = 'ready'; + + +/***/ }), +/* 818 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Texture Remove Event. + * + * This event is dispatched by the Texture Manager when a texture is removed from it. + * + * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`. + * + * If you have any Game Objects still using the removed texture, they will start throwing + * errors the next time they try to render. Be sure to clear all use of the texture in this event handler. + * + * @event Phaser.Textures.Events#REMOVE + * @since 3.0.0 + * + * @param {string} key - The key of the Texture that was removed from the Texture Manager. + */ +module.exports = 'removetexture'; + + +/***/ }), +/* 819 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140889,14 +141294,14 @@ module.exports = [ module.exports = { - GenerateTexture: __webpack_require__(354), - Palettes: __webpack_require__(816) + GenerateTexture: __webpack_require__(355), + Palettes: __webpack_require__(820) }; /***/ }), -/* 816 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140911,17 +141316,17 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(355), - C64: __webpack_require__(817), - CGA: __webpack_require__(818), - JMP: __webpack_require__(819), - MSX: __webpack_require__(820) + ARNE16: __webpack_require__(356), + C64: __webpack_require__(821), + CGA: __webpack_require__(822), + JMP: __webpack_require__(823), + MSX: __webpack_require__(824) }; /***/ }), -/* 817 */ +/* 821 */ /***/ (function(module, exports) { /** @@ -140959,7 +141364,7 @@ module.exports = { /***/ }), -/* 818 */ +/* 822 */ /***/ (function(module, exports) { /** @@ -140997,7 +141402,7 @@ module.exports = { /***/ }), -/* 819 */ +/* 823 */ /***/ (function(module, exports) { /** @@ -141035,7 +141440,7 @@ module.exports = { /***/ }), -/* 820 */ +/* 824 */ /***/ (function(module, exports) { /** @@ -141073,7 +141478,7 @@ module.exports = { /***/ }), -/* 821 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141087,20 +141492,20 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(822), - MoveTo: __webpack_require__(359), + Path: __webpack_require__(826), + MoveTo: __webpack_require__(360), - CubicBezier: __webpack_require__(356), + CubicBezier: __webpack_require__(357), Curve: __webpack_require__(83), - Ellipse: __webpack_require__(357), - Line: __webpack_require__(358), - QuadraticBezier: __webpack_require__(360), - Spline: __webpack_require__(361) + Ellipse: __webpack_require__(358), + Line: __webpack_require__(359), + QuadraticBezier: __webpack_require__(361), + Spline: __webpack_require__(362) }; /***/ }), -/* 822 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141112,14 +141517,14 @@ module.exports = { // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezierCurve = __webpack_require__(356); -var EllipseCurve = __webpack_require__(357); +var CubicBezierCurve = __webpack_require__(357); +var EllipseCurve = __webpack_require__(358); var GameObjectFactory = __webpack_require__(5); -var LineCurve = __webpack_require__(358); -var MovePathTo = __webpack_require__(359); -var QuadraticBezierCurve = __webpack_require__(360); +var LineCurve = __webpack_require__(359); +var MovePathTo = __webpack_require__(360); +var QuadraticBezierCurve = __webpack_require__(361); var Rectangle = __webpack_require__(9); -var SplineCurve = __webpack_require__(361); +var SplineCurve = __webpack_require__(362); var Vector2 = __webpack_require__(3); var MATH_CONST = __webpack_require__(13); @@ -141989,7 +142394,7 @@ module.exports = Path; /***/ }), -/* 823 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142004,15 +142409,15 @@ module.exports = Path; module.exports = { - DataManager: __webpack_require__(118), - DataManagerPlugin: __webpack_require__(824), - Events: __webpack_require__(292) + DataManager: __webpack_require__(120), + DataManagerPlugin: __webpack_require__(828), + Events: __webpack_require__(293) }; /***/ }), -/* 824 */ +/* 828 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142022,7 +142427,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var DataManager = __webpack_require__(118); +var DataManager = __webpack_require__(120); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); @@ -142139,7 +142544,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 825 */ +/* 829 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142154,18 +142559,18 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(826), - BaseShader: __webpack_require__(362), - Bounds: __webpack_require__(829), - Canvas: __webpack_require__(833), - Color: __webpack_require__(363), - Masks: __webpack_require__(842) + Align: __webpack_require__(830), + BaseShader: __webpack_require__(363), + Bounds: __webpack_require__(833), + Canvas: __webpack_require__(837), + Color: __webpack_require__(364), + Masks: __webpack_require__(846) }; /***/ }), -/* 826 */ +/* 830 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142174,7 +142579,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(107); +var CONST = __webpack_require__(108); var Extend = __webpack_require__(19); /** @@ -142183,8 +142588,8 @@ var Extend = __webpack_require__(19); var Align = { - In: __webpack_require__(827), - To: __webpack_require__(828) + In: __webpack_require__(831), + To: __webpack_require__(832) }; @@ -142195,7 +142600,7 @@ module.exports = Align; /***/ }), -/* 827 */ +/* 831 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142210,22 +142615,22 @@ module.exports = Align; module.exports = { - BottomCenter: __webpack_require__(266), - BottomLeft: __webpack_require__(267), - BottomRight: __webpack_require__(268), - Center: __webpack_require__(269), - LeftCenter: __webpack_require__(271), - QuickSet: __webpack_require__(265), - RightCenter: __webpack_require__(272), - TopCenter: __webpack_require__(273), - TopLeft: __webpack_require__(274), - TopRight: __webpack_require__(275) + BottomCenter: __webpack_require__(267), + BottomLeft: __webpack_require__(268), + BottomRight: __webpack_require__(269), + Center: __webpack_require__(270), + LeftCenter: __webpack_require__(272), + QuickSet: __webpack_require__(266), + RightCenter: __webpack_require__(273), + TopCenter: __webpack_require__(274), + TopLeft: __webpack_require__(275), + TopRight: __webpack_require__(276) }; /***/ }), -/* 828 */ +/* 832 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142240,25 +142645,25 @@ module.exports = { module.exports = { - BottomCenter: __webpack_require__(253), - BottomLeft: __webpack_require__(254), - BottomRight: __webpack_require__(255), - LeftBottom: __webpack_require__(256), - LeftCenter: __webpack_require__(257), - LeftTop: __webpack_require__(258), - QuickSet: __webpack_require__(252), - RightBottom: __webpack_require__(259), - RightCenter: __webpack_require__(260), - RightTop: __webpack_require__(261), - TopCenter: __webpack_require__(262), - TopLeft: __webpack_require__(263), - TopRight: __webpack_require__(264) + BottomCenter: __webpack_require__(254), + BottomLeft: __webpack_require__(255), + BottomRight: __webpack_require__(256), + LeftBottom: __webpack_require__(257), + LeftCenter: __webpack_require__(258), + LeftTop: __webpack_require__(259), + QuickSet: __webpack_require__(253), + RightBottom: __webpack_require__(260), + RightCenter: __webpack_require__(261), + RightTop: __webpack_require__(262), + TopCenter: __webpack_require__(263), + TopLeft: __webpack_require__(264), + TopRight: __webpack_require__(265) }; /***/ }), -/* 829 */ +/* 833 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142273,14 +142678,14 @@ module.exports = { module.exports = { - CenterOn: __webpack_require__(270), + CenterOn: __webpack_require__(271), GetBottom: __webpack_require__(35), - GetBounds: __webpack_require__(830), + GetBounds: __webpack_require__(834), GetCenterX: __webpack_require__(77), GetCenterY: __webpack_require__(79), GetLeft: __webpack_require__(36), - GetOffsetX: __webpack_require__(831), - GetOffsetY: __webpack_require__(832), + GetOffsetX: __webpack_require__(835), + GetOffsetY: __webpack_require__(836), GetRight: __webpack_require__(37), GetTop: __webpack_require__(38), SetBottom: __webpack_require__(48), @@ -142294,7 +142699,7 @@ module.exports = { /***/ }), -/* 830 */ +/* 834 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142338,7 +142743,7 @@ module.exports = GetBounds; /***/ }), -/* 831 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -142368,7 +142773,7 @@ module.exports = GetOffsetX; /***/ }), -/* 832 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -142398,7 +142803,7 @@ module.exports = GetOffsetY; /***/ }), -/* 833 */ +/* 837 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142413,17 +142818,17 @@ module.exports = GetOffsetY; module.exports = { - CanvasInterpolation: __webpack_require__(349), + CanvasInterpolation: __webpack_require__(350), CanvasPool: __webpack_require__(26), - Smoothing: __webpack_require__(175), - TouchAction: __webpack_require__(834), - UserSelect: __webpack_require__(835) + Smoothing: __webpack_require__(177), + TouchAction: __webpack_require__(838), + UserSelect: __webpack_require__(839) }; /***/ }), -/* 834 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -142458,7 +142863,7 @@ module.exports = TouchAction; /***/ }), -/* 835 */ +/* 839 */ /***/ (function(module, exports) { /** @@ -142505,7 +142910,7 @@ module.exports = UserSelect; /***/ }), -/* 836 */ +/* 840 */ /***/ (function(module, exports) { /** @@ -142545,7 +142950,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 837 */ +/* 841 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142555,7 +142960,7 @@ module.exports = ColorToRGBA; */ var Color = __webpack_require__(32); -var HueToComponent = __webpack_require__(365); +var HueToComponent = __webpack_require__(366); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -142595,7 +143000,7 @@ module.exports = HSLToColor; /***/ }), -/* 838 */ +/* 842 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142604,7 +143009,7 @@ module.exports = HSLToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(174); +var HSVToRGB = __webpack_require__(176); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -142636,7 +143041,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 839 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142645,7 +143050,7 @@ module.exports = HSVColorWheel; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(123); +var Linear = __webpack_require__(124); /** * @namespace Phaser.Display.Color.Interpolate @@ -142744,7 +143149,7 @@ module.exports = { /***/ }), -/* 840 */ +/* 844 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142753,7 +143158,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(180); +var Between = __webpack_require__(182); var Color = __webpack_require__(32); /** @@ -142780,7 +143185,7 @@ module.exports = RandomRGB; /***/ }), -/* 841 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142789,7 +143194,7 @@ module.exports = RandomRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ComponentToHex = __webpack_require__(364); +var ComponentToHex = __webpack_require__(365); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -142824,7 +143229,7 @@ module.exports = RGBToString; /***/ }), -/* 842 */ +/* 846 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142839,14 +143244,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(286), - GeometryMask: __webpack_require__(287) + BitmapMask: __webpack_require__(287), + GeometryMask: __webpack_require__(288) }; /***/ }), -/* 843 */ +/* 847 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142861,14 +143266,14 @@ module.exports = { var Dom = { - AddToDOM: __webpack_require__(130), - DOMContentLoaded: __webpack_require__(366), - GetInnerHeight: __webpack_require__(367), - GetScreenOrientation: __webpack_require__(368), - GetTarget: __webpack_require__(373), - ParseXML: __webpack_require__(374), - RemoveFromDOM: __webpack_require__(186), - RequestAnimationFrame: __webpack_require__(352) + AddToDOM: __webpack_require__(131), + DOMContentLoaded: __webpack_require__(367), + GetInnerHeight: __webpack_require__(368), + GetScreenOrientation: __webpack_require__(369), + GetTarget: __webpack_require__(374), + ParseXML: __webpack_require__(375), + RemoveFromDOM: __webpack_require__(188), + RequestAnimationFrame: __webpack_require__(353) }; @@ -142876,7 +143281,7 @@ module.exports = Dom; /***/ }), -/* 844 */ +/* 848 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142889,11 +143294,11 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(845) }; +module.exports = { EventEmitter: __webpack_require__(849) }; /***/ }), -/* 845 */ +/* 849 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143077,7 +143482,7 @@ module.exports = EventEmitter; /***/ }), -/* 846 */ +/* 850 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143086,33 +143491,33 @@ module.exports = EventEmitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(130); -var AnimationManager = __webpack_require__(300); -var CacheManager = __webpack_require__(304); +var AddToDOM = __webpack_require__(131); +var AnimationManager = __webpack_require__(301); +var CacheManager = __webpack_require__(305); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Config = __webpack_require__(326); -var CreateDOMContainer = __webpack_require__(847); -var CreateRenderer = __webpack_require__(348); -var DataManager = __webpack_require__(118); -var DebugHeader = __webpack_require__(350); -var Device = __webpack_require__(327); -var DOMContentLoaded = __webpack_require__(366); +var Config = __webpack_require__(327); +var CreateDOMContainer = __webpack_require__(851); +var CreateRenderer = __webpack_require__(349); +var DataManager = __webpack_require__(120); +var DebugHeader = __webpack_require__(351); +var Device = __webpack_require__(328); +var DOMContentLoaded = __webpack_require__(367); var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(21); -var InputManager = __webpack_require__(375); +var InputManager = __webpack_require__(376); var PluginCache = __webpack_require__(23); -var PluginManager = __webpack_require__(380); -var ScaleManager = __webpack_require__(381); -var SceneManager = __webpack_require__(383); -var TextureEvents = __webpack_require__(129); -var TextureManager = __webpack_require__(388); -var TimeStep = __webpack_require__(351); -var VisibilityHandler = __webpack_require__(353); +var PluginManager = __webpack_require__(381); +var ScaleManager = __webpack_require__(382); +var SceneManager = __webpack_require__(384); +var TextureEvents = __webpack_require__(130); +var TextureManager = __webpack_require__(389); +var TimeStep = __webpack_require__(352); +var VisibilityHandler = __webpack_require__(354); if (true) { - var SoundManagerCreator = __webpack_require__(392); + var SoundManagerCreator = __webpack_require__(393); } if (false) @@ -143780,7 +144185,7 @@ module.exports = Game; /***/ }), -/* 847 */ +/* 851 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143789,7 +144194,7 @@ module.exports = Game; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(130); +var AddToDOM = __webpack_require__(131); var CreateDOMContainer = function (game) { @@ -143824,7 +144229,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 848 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -143845,7 +144250,7 @@ module.exports = 'boot'; /***/ }), -/* 849 */ +/* 853 */ /***/ (function(module, exports) { /** @@ -143866,7 +144271,7 @@ module.exports = 'destroy'; /***/ }), -/* 850 */ +/* 854 */ /***/ (function(module, exports) { /** @@ -143894,7 +144299,7 @@ module.exports = 'dragend'; /***/ }), -/* 851 */ +/* 855 */ /***/ (function(module, exports) { /** @@ -143925,7 +144330,7 @@ module.exports = 'dragenter'; /***/ }), -/* 852 */ +/* 856 */ /***/ (function(module, exports) { /** @@ -143957,7 +144362,7 @@ module.exports = 'drag'; /***/ }), -/* 853 */ +/* 857 */ /***/ (function(module, exports) { /** @@ -143988,7 +144393,7 @@ module.exports = 'dragleave'; /***/ }), -/* 854 */ +/* 858 */ /***/ (function(module, exports) { /** @@ -144022,7 +144427,7 @@ module.exports = 'dragover'; /***/ }), -/* 855 */ +/* 859 */ /***/ (function(module, exports) { /** @@ -144052,7 +144457,7 @@ module.exports = 'dragstart'; /***/ }), -/* 856 */ +/* 860 */ /***/ (function(module, exports) { /** @@ -144081,7 +144486,7 @@ module.exports = 'drop'; /***/ }), -/* 857 */ +/* 861 */ /***/ (function(module, exports) { /** @@ -144108,7 +144513,7 @@ module.exports = 'gameout'; /***/ }), -/* 858 */ +/* 862 */ /***/ (function(module, exports) { /** @@ -144135,7 +144540,7 @@ module.exports = 'gameover'; /***/ }), -/* 859 */ +/* 863 */ /***/ (function(module, exports) { /** @@ -144176,7 +144581,7 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 860 */ +/* 864 */ /***/ (function(module, exports) { /** @@ -144207,7 +144612,7 @@ module.exports = 'dragend'; /***/ }), -/* 861 */ +/* 865 */ /***/ (function(module, exports) { /** @@ -144237,7 +144642,7 @@ module.exports = 'dragenter'; /***/ }), -/* 862 */ +/* 866 */ /***/ (function(module, exports) { /** @@ -144268,7 +144673,7 @@ module.exports = 'drag'; /***/ }), -/* 863 */ +/* 867 */ /***/ (function(module, exports) { /** @@ -144298,7 +144703,7 @@ module.exports = 'dragleave'; /***/ }), -/* 864 */ +/* 868 */ /***/ (function(module, exports) { /** @@ -144331,7 +144736,7 @@ module.exports = 'dragover'; /***/ }), -/* 865 */ +/* 869 */ /***/ (function(module, exports) { /** @@ -144365,7 +144770,7 @@ module.exports = 'dragstart'; /***/ }), -/* 866 */ +/* 870 */ /***/ (function(module, exports) { /** @@ -144395,7 +144800,7 @@ module.exports = 'drop'; /***/ }), -/* 867 */ +/* 871 */ /***/ (function(module, exports) { /** @@ -144436,7 +144841,7 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 868 */ +/* 872 */ /***/ (function(module, exports) { /** @@ -144477,7 +144882,7 @@ module.exports = 'gameobjectout'; /***/ }), -/* 869 */ +/* 873 */ /***/ (function(module, exports) { /** @@ -144518,7 +144923,7 @@ module.exports = 'gameobjectover'; /***/ }), -/* 870 */ +/* 874 */ /***/ (function(module, exports) { /** @@ -144559,7 +144964,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 871 */ +/* 875 */ /***/ (function(module, exports) { /** @@ -144600,7 +145005,7 @@ module.exports = 'pointermove'; /***/ }), -/* 872 */ +/* 876 */ /***/ (function(module, exports) { /** @@ -144639,7 +145044,7 @@ module.exports = 'pointerout'; /***/ }), -/* 873 */ +/* 877 */ /***/ (function(module, exports) { /** @@ -144680,7 +145085,7 @@ module.exports = 'pointerover'; /***/ }), -/* 874 */ +/* 878 */ /***/ (function(module, exports) { /** @@ -144721,7 +145126,7 @@ module.exports = 'pointerup'; /***/ }), -/* 875 */ +/* 879 */ /***/ (function(module, exports) { /** @@ -144763,7 +145168,7 @@ module.exports = 'wheel'; /***/ }), -/* 876 */ +/* 880 */ /***/ (function(module, exports) { /** @@ -144804,7 +145209,7 @@ module.exports = 'gameobjectup'; /***/ }), -/* 877 */ +/* 881 */ /***/ (function(module, exports) { /** @@ -144848,7 +145253,7 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 878 */ +/* 882 */ /***/ (function(module, exports) { /** @@ -144869,7 +145274,7 @@ module.exports = 'boot'; /***/ }), -/* 879 */ +/* 883 */ /***/ (function(module, exports) { /** @@ -144894,7 +145299,7 @@ module.exports = 'process'; /***/ }), -/* 880 */ +/* 884 */ /***/ (function(module, exports) { /** @@ -144915,7 +145320,7 @@ module.exports = 'update'; /***/ }), -/* 881 */ +/* 885 */ /***/ (function(module, exports) { /** @@ -144950,7 +145355,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 882 */ +/* 886 */ /***/ (function(module, exports) { /** @@ -144984,7 +145389,7 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 883 */ +/* 887 */ /***/ (function(module, exports) { /** @@ -145019,7 +145424,7 @@ module.exports = 'pointermove'; /***/ }), -/* 884 */ +/* 888 */ /***/ (function(module, exports) { /** @@ -145054,7 +145459,7 @@ module.exports = 'pointerout'; /***/ }), -/* 885 */ +/* 889 */ /***/ (function(module, exports) { /** @@ -145089,7 +145494,7 @@ module.exports = 'pointerover'; /***/ }), -/* 886 */ +/* 890 */ /***/ (function(module, exports) { /** @@ -145124,7 +145529,7 @@ module.exports = 'pointerup'; /***/ }), -/* 887 */ +/* 891 */ /***/ (function(module, exports) { /** @@ -145158,7 +145563,7 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 888 */ +/* 892 */ /***/ (function(module, exports) { /** @@ -145196,7 +145601,7 @@ module.exports = 'wheel'; /***/ }), -/* 889 */ +/* 893 */ /***/ (function(module, exports) { /** @@ -145220,7 +145625,7 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 890 */ +/* 894 */ /***/ (function(module, exports) { /** @@ -145242,7 +145647,7 @@ module.exports = 'preupdate'; /***/ }), -/* 891 */ +/* 895 */ /***/ (function(module, exports) { /** @@ -145263,7 +145668,7 @@ module.exports = 'shutdown'; /***/ }), -/* 892 */ +/* 896 */ /***/ (function(module, exports) { /** @@ -145285,7 +145690,7 @@ module.exports = 'start'; /***/ }), -/* 893 */ +/* 897 */ /***/ (function(module, exports) { /** @@ -145310,7 +145715,7 @@ module.exports = 'update'; /***/ }), -/* 894 */ +/* 898 */ /***/ (function(module, exports) { /** @@ -145340,7 +145745,7 @@ module.exports = 'addfile'; /***/ }), -/* 895 */ +/* 899 */ /***/ (function(module, exports) { /** @@ -145368,7 +145773,7 @@ module.exports = 'complete'; /***/ }), -/* 896 */ +/* 900 */ /***/ (function(module, exports) { /** @@ -145397,7 +145802,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 897 */ +/* 901 */ /***/ (function(module, exports) { /** @@ -145451,7 +145856,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 898 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -145476,7 +145881,7 @@ module.exports = 'loaderror'; /***/ }), -/* 899 */ +/* 903 */ /***/ (function(module, exports) { /** @@ -145502,7 +145907,7 @@ module.exports = 'load'; /***/ }), -/* 900 */ +/* 904 */ /***/ (function(module, exports) { /** @@ -145529,7 +145934,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 901 */ +/* 905 */ /***/ (function(module, exports) { /** @@ -145558,7 +145963,7 @@ module.exports = 'postprocess'; /***/ }), -/* 902 */ +/* 906 */ /***/ (function(module, exports) { /** @@ -145583,7 +145988,7 @@ module.exports = 'progress'; /***/ }), -/* 903 */ +/* 907 */ /***/ (function(module, exports) { /** @@ -145610,7 +146015,7 @@ module.exports = 'start'; /***/ }), -/* 904 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145672,7 +146077,7 @@ module.exports = InjectionMap; /***/ }), -/* 905 */ +/* 909 */ /***/ (function(module, exports) { /** @@ -145753,7 +146158,7 @@ module.exports = AtlasXML; /***/ }), -/* 906 */ +/* 910 */ /***/ (function(module, exports) { /** @@ -145788,7 +146193,7 @@ module.exports = Canvas; /***/ }), -/* 907 */ +/* 911 */ /***/ (function(module, exports) { /** @@ -145823,7 +146228,7 @@ module.exports = Image; /***/ }), -/* 908 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145932,7 +146337,7 @@ module.exports = JSONArray; /***/ }), -/* 909 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146045,7 +146450,7 @@ module.exports = JSONHash; /***/ }), -/* 910 */ +/* 914 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146170,7 +146575,7 @@ module.exports = SpriteSheet; /***/ }), -/* 911 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146361,7 +146766,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 912 */ +/* 916 */ /***/ (function(module, exports) { /** @@ -146531,7 +146936,7 @@ TextureImporter: /***/ }), -/* 913 */ +/* 917 */ /***/ (function(module, exports) { /** @@ -146562,7 +146967,7 @@ module.exports = 'complete'; /***/ }), -/* 914 */ +/* 918 */ /***/ (function(module, exports) { /** @@ -146592,7 +146997,7 @@ module.exports = 'decoded'; /***/ }), -/* 915 */ +/* 919 */ /***/ (function(module, exports) { /** @@ -146624,7 +147029,7 @@ module.exports = 'decodedall'; /***/ }), -/* 916 */ +/* 920 */ /***/ (function(module, exports) { /** @@ -146656,7 +147061,7 @@ module.exports = 'destroy'; /***/ }), -/* 917 */ +/* 921 */ /***/ (function(module, exports) { /** @@ -146689,7 +147094,7 @@ module.exports = 'detune'; /***/ }), -/* 918 */ +/* 922 */ /***/ (function(module, exports) { /** @@ -146717,7 +147122,7 @@ module.exports = 'detune'; /***/ }), -/* 919 */ +/* 923 */ /***/ (function(module, exports) { /** @@ -146744,7 +147149,7 @@ module.exports = 'mute'; /***/ }), -/* 920 */ +/* 924 */ /***/ (function(module, exports) { /** @@ -146772,7 +147177,7 @@ module.exports = 'rate'; /***/ }), -/* 921 */ +/* 925 */ /***/ (function(module, exports) { /** @@ -146799,7 +147204,7 @@ module.exports = 'volume'; /***/ }), -/* 922 */ +/* 926 */ /***/ (function(module, exports) { /** @@ -146833,7 +147238,7 @@ module.exports = 'loop'; /***/ }), -/* 923 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -146867,7 +147272,7 @@ module.exports = 'looped'; /***/ }), -/* 924 */ +/* 928 */ /***/ (function(module, exports) { /** @@ -146900,7 +147305,7 @@ module.exports = 'mute'; /***/ }), -/* 925 */ +/* 929 */ /***/ (function(module, exports) { /** @@ -146927,7 +147332,7 @@ module.exports = 'pauseall'; /***/ }), -/* 926 */ +/* 930 */ /***/ (function(module, exports) { /** @@ -146959,7 +147364,7 @@ module.exports = 'pause'; /***/ }), -/* 927 */ +/* 931 */ /***/ (function(module, exports) { /** @@ -146990,7 +147395,7 @@ module.exports = 'play'; /***/ }), -/* 928 */ +/* 932 */ /***/ (function(module, exports) { /** @@ -147023,7 +147428,7 @@ module.exports = 'rate'; /***/ }), -/* 929 */ +/* 933 */ /***/ (function(module, exports) { /** @@ -147050,7 +147455,7 @@ module.exports = 'resumeall'; /***/ }), -/* 930 */ +/* 934 */ /***/ (function(module, exports) { /** @@ -147083,7 +147488,7 @@ module.exports = 'resume'; /***/ }), -/* 931 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -147116,7 +147521,7 @@ module.exports = 'seek'; /***/ }), -/* 932 */ +/* 936 */ /***/ (function(module, exports) { /** @@ -147143,7 +147548,7 @@ module.exports = 'stopall'; /***/ }), -/* 933 */ +/* 937 */ /***/ (function(module, exports) { /** @@ -147175,7 +147580,7 @@ module.exports = 'stop'; /***/ }), -/* 934 */ +/* 938 */ /***/ (function(module, exports) { /** @@ -147202,7 +147607,7 @@ module.exports = 'unlocked'; /***/ }), -/* 935 */ +/* 939 */ /***/ (function(module, exports) { /** @@ -147235,7 +147640,7 @@ module.exports = 'volume'; /***/ }), -/* 936 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147252,109 +147657,109 @@ var GameObjects = { Events: __webpack_require__(29), - DisplayList: __webpack_require__(937), + DisplayList: __webpack_require__(941), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(5), - UpdateList: __webpack_require__(962), + UpdateList: __webpack_require__(966), Components: __webpack_require__(11), BuildGameObject: __webpack_require__(27), - BuildGameObjectAnimation: __webpack_require__(405), + BuildGameObjectAnimation: __webpack_require__(406), GameObject: __webpack_require__(14), - BitmapText: __webpack_require__(139), - Blitter: __webpack_require__(197), - Bob: __webpack_require__(406), - Container: __webpack_require__(198), - DOMElement: __webpack_require__(408), - DynamicBitmapText: __webpack_require__(199), - Extern: __webpack_require__(410), - Graphics: __webpack_require__(200), - Group: __webpack_require__(99), - Image: __webpack_require__(112), - Particles: __webpack_require__(993), - PathFollower: __webpack_require__(423), - RenderTexture: __webpack_require__(204), - RetroFont: __webpack_require__(1001), - Rope: __webpack_require__(206), + BitmapText: __webpack_require__(140), + Blitter: __webpack_require__(199), + Bob: __webpack_require__(407), + Container: __webpack_require__(200), + DOMElement: __webpack_require__(409), + DynamicBitmapText: __webpack_require__(201), + Extern: __webpack_require__(411), + Graphics: __webpack_require__(202), + Group: __webpack_require__(100), + Image: __webpack_require__(114), + Particles: __webpack_require__(997), + PathFollower: __webpack_require__(424), + RenderTexture: __webpack_require__(206), + RetroFont: __webpack_require__(1005), + Rope: __webpack_require__(208), Sprite: __webpack_require__(76), - Text: __webpack_require__(207), - GetTextSize: __webpack_require__(424), - MeasureText: __webpack_require__(426), - TextStyle: __webpack_require__(425), + Text: __webpack_require__(209), + GetTextSize: __webpack_require__(425), + MeasureText: __webpack_require__(427), + TextStyle: __webpack_require__(426), - TileSprite: __webpack_require__(208), - Zone: __webpack_require__(115), - Video: __webpack_require__(209), + TileSprite: __webpack_require__(210), + Zone: __webpack_require__(117), + Video: __webpack_require__(211), // Shapes Shape: __webpack_require__(30), - Arc: __webpack_require__(427), - Curve: __webpack_require__(428), - Ellipse: __webpack_require__(429), - Grid: __webpack_require__(430), - IsoBox: __webpack_require__(431), - IsoTriangle: __webpack_require__(432), - Line: __webpack_require__(433), - Polygon: __webpack_require__(434), - Rectangle: __webpack_require__(439), - Star: __webpack_require__(440), - Triangle: __webpack_require__(441), + Arc: __webpack_require__(428), + Curve: __webpack_require__(429), + Ellipse: __webpack_require__(430), + Grid: __webpack_require__(431), + IsoBox: __webpack_require__(432), + IsoTriangle: __webpack_require__(433), + Line: __webpack_require__(434), + Polygon: __webpack_require__(435), + Rectangle: __webpack_require__(440), + Star: __webpack_require__(441), + Triangle: __webpack_require__(442), // Game Object Factories Factories: { - Blitter: __webpack_require__(1049), - Container: __webpack_require__(1050), - DOMElement: __webpack_require__(1051), - DynamicBitmapText: __webpack_require__(1052), - Extern: __webpack_require__(1053), - Graphics: __webpack_require__(1054), - Group: __webpack_require__(1055), - Image: __webpack_require__(1056), - Particles: __webpack_require__(1057), - PathFollower: __webpack_require__(1058), - RenderTexture: __webpack_require__(1059), - Rope: __webpack_require__(1060), - Sprite: __webpack_require__(1061), - StaticBitmapText: __webpack_require__(1062), - Text: __webpack_require__(1063), - TileSprite: __webpack_require__(1064), - Zone: __webpack_require__(1065), - Video: __webpack_require__(1066), + Blitter: __webpack_require__(1053), + Container: __webpack_require__(1054), + DOMElement: __webpack_require__(1055), + DynamicBitmapText: __webpack_require__(1056), + Extern: __webpack_require__(1057), + Graphics: __webpack_require__(1058), + Group: __webpack_require__(1059), + Image: __webpack_require__(1060), + Particles: __webpack_require__(1061), + PathFollower: __webpack_require__(1062), + RenderTexture: __webpack_require__(1063), + Rope: __webpack_require__(1064), + Sprite: __webpack_require__(1065), + StaticBitmapText: __webpack_require__(1066), + Text: __webpack_require__(1067), + TileSprite: __webpack_require__(1068), + Zone: __webpack_require__(1069), + Video: __webpack_require__(1070), // Shapes - Arc: __webpack_require__(1067), - Curve: __webpack_require__(1068), - Ellipse: __webpack_require__(1069), - Grid: __webpack_require__(1070), - IsoBox: __webpack_require__(1071), - IsoTriangle: __webpack_require__(1072), - Line: __webpack_require__(1073), - Polygon: __webpack_require__(1074), - Rectangle: __webpack_require__(1075), - Star: __webpack_require__(1076), - Triangle: __webpack_require__(1077) + Arc: __webpack_require__(1071), + Curve: __webpack_require__(1072), + Ellipse: __webpack_require__(1073), + Grid: __webpack_require__(1074), + IsoBox: __webpack_require__(1075), + IsoTriangle: __webpack_require__(1076), + Line: __webpack_require__(1077), + Polygon: __webpack_require__(1078), + Rectangle: __webpack_require__(1079), + Star: __webpack_require__(1080), + Triangle: __webpack_require__(1081) }, Creators: { - Blitter: __webpack_require__(1078), - Container: __webpack_require__(1079), - DynamicBitmapText: __webpack_require__(1080), - Graphics: __webpack_require__(1081), - Group: __webpack_require__(1082), - Image: __webpack_require__(1083), - Particles: __webpack_require__(1084), - RenderTexture: __webpack_require__(1085), - Rope: __webpack_require__(1086), - Sprite: __webpack_require__(1087), - StaticBitmapText: __webpack_require__(1088), - Text: __webpack_require__(1089), - TileSprite: __webpack_require__(1090), - Zone: __webpack_require__(1091), - Video: __webpack_require__(1092) + Blitter: __webpack_require__(1082), + Container: __webpack_require__(1083), + DynamicBitmapText: __webpack_require__(1084), + Graphics: __webpack_require__(1085), + Group: __webpack_require__(1086), + Image: __webpack_require__(1087), + Particles: __webpack_require__(1088), + RenderTexture: __webpack_require__(1089), + Rope: __webpack_require__(1090), + Sprite: __webpack_require__(1091), + StaticBitmapText: __webpack_require__(1092), + Text: __webpack_require__(1093), + TileSprite: __webpack_require__(1094), + Zone: __webpack_require__(1095), + Video: __webpack_require__(1096) } }; @@ -147362,28 +147767,28 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(141); - GameObjects.Quad = __webpack_require__(212); - GameObjects.Shader = __webpack_require__(213); + GameObjects.Mesh = __webpack_require__(142); + GameObjects.Quad = __webpack_require__(214); + GameObjects.Shader = __webpack_require__(215); - GameObjects.Factories.Mesh = __webpack_require__(1099); - GameObjects.Factories.Quad = __webpack_require__(1100); - GameObjects.Factories.Shader = __webpack_require__(1101); + GameObjects.Factories.Mesh = __webpack_require__(1103); + GameObjects.Factories.Quad = __webpack_require__(1104); + GameObjects.Factories.Shader = __webpack_require__(1105); - GameObjects.Creators.Mesh = __webpack_require__(1102); - GameObjects.Creators.Quad = __webpack_require__(1103); - GameObjects.Creators.Shader = __webpack_require__(1104); + GameObjects.Creators.Mesh = __webpack_require__(1106); + GameObjects.Creators.Quad = __webpack_require__(1107); + GameObjects.Creators.Shader = __webpack_require__(1108); - GameObjects.Light = __webpack_require__(445); - GameObjects.LightsManager = __webpack_require__(446); - GameObjects.LightsPlugin = __webpack_require__(1105); + GameObjects.Light = __webpack_require__(446); + GameObjects.LightsManager = __webpack_require__(447); + GameObjects.LightsPlugin = __webpack_require__(1109); } module.exports = GameObjects; /***/ }), -/* 937 */ +/* 941 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147393,11 +147798,11 @@ module.exports = GameObjects; */ var Class = __webpack_require__(0); -var List = __webpack_require__(136); +var List = __webpack_require__(137); var PluginCache = __webpack_require__(23); var GameObjectEvents = __webpack_require__(29); var SceneEvents = __webpack_require__(20); -var StableSort = __webpack_require__(138); +var StableSort = __webpack_require__(139); /** * @classdesc @@ -147641,7 +148046,7 @@ module.exports = DisplayList; /***/ }), -/* 938 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147656,21 +148061,21 @@ module.exports = DisplayList; module.exports = { - CheckMatrix: __webpack_require__(193), - MatrixToString: __webpack_require__(939), - ReverseColumns: __webpack_require__(940), - ReverseRows: __webpack_require__(941), - Rotate180: __webpack_require__(942), - RotateLeft: __webpack_require__(943), - RotateMatrix: __webpack_require__(137), - RotateRight: __webpack_require__(944), - TransposeMatrix: __webpack_require__(401) + CheckMatrix: __webpack_require__(195), + MatrixToString: __webpack_require__(943), + ReverseColumns: __webpack_require__(944), + ReverseRows: __webpack_require__(945), + Rotate180: __webpack_require__(946), + RotateLeft: __webpack_require__(947), + RotateMatrix: __webpack_require__(138), + RotateRight: __webpack_require__(948), + TransposeMatrix: __webpack_require__(402) }; /***/ }), -/* 939 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147679,8 +148084,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(171); -var CheckMatrix = __webpack_require__(193); +var Pad = __webpack_require__(173); +var CheckMatrix = __webpack_require__(195); /** * Generates a string (which you can pass to console.log) from the given Array Matrix. @@ -147751,7 +148156,7 @@ module.exports = MatrixToString; /***/ }), -/* 940 */ +/* 944 */ /***/ (function(module, exports) { /** @@ -147782,7 +148187,7 @@ module.exports = ReverseColumns; /***/ }), -/* 941 */ +/* 945 */ /***/ (function(module, exports) { /** @@ -147818,7 +148223,7 @@ module.exports = ReverseRows; /***/ }), -/* 942 */ +/* 946 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147827,7 +148232,7 @@ module.exports = ReverseRows; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(137); +var RotateMatrix = __webpack_require__(138); /** * Rotates the array matrix 180 degrees. @@ -147851,7 +148256,7 @@ module.exports = Rotate180; /***/ }), -/* 943 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147860,7 +148265,7 @@ module.exports = Rotate180; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(137); +var RotateMatrix = __webpack_require__(138); /** * Rotates the array matrix to the left (or 90 degrees) @@ -147884,7 +148289,7 @@ module.exports = RotateLeft; /***/ }), -/* 944 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147893,7 +148298,7 @@ module.exports = RotateLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(137); +var RotateMatrix = __webpack_require__(138); /** * Rotates the array matrix to the left (or -90 degrees) @@ -147917,7 +148322,7 @@ module.exports = RotateRight; /***/ }), -/* 945 */ +/* 949 */ /***/ (function(module, exports) { /** @@ -148034,7 +148439,7 @@ module.exports = Add; /***/ }), -/* 946 */ +/* 950 */ /***/ (function(module, exports) { /** @@ -148156,7 +148561,7 @@ module.exports = AddAt; /***/ }), -/* 947 */ +/* 951 */ /***/ (function(module, exports) { /** @@ -148194,7 +148599,7 @@ module.exports = BringToTop; /***/ }), -/* 948 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148246,7 +148651,7 @@ module.exports = CountAllMatching; /***/ }), -/* 949 */ +/* 953 */ /***/ (function(module, exports) { /** @@ -148292,7 +148697,7 @@ module.exports = Each; /***/ }), -/* 950 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148348,7 +148753,7 @@ module.exports = EachInRange; /***/ }), -/* 951 */ +/* 955 */ /***/ (function(module, exports) { /** @@ -148390,7 +148795,7 @@ module.exports = MoveDown; /***/ }), -/* 952 */ +/* 956 */ /***/ (function(module, exports) { /** @@ -148437,7 +148842,7 @@ module.exports = MoveTo; /***/ }), -/* 953 */ +/* 957 */ /***/ (function(module, exports) { /** @@ -148479,7 +148884,7 @@ module.exports = MoveUp; /***/ }), -/* 954 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148488,7 +148893,7 @@ module.exports = MoveUp; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RoundAwayFromZero = __webpack_require__(344); +var RoundAwayFromZero = __webpack_require__(345); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -148556,7 +148961,7 @@ module.exports = NumberArrayStep; /***/ }), -/* 955 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148607,7 +149012,7 @@ module.exports = RemoveAt; /***/ }), -/* 956 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148670,7 +149075,7 @@ module.exports = RemoveBetween; /***/ }), -/* 957 */ +/* 961 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148708,7 +149113,7 @@ module.exports = RemoveRandomElement; /***/ }), -/* 958 */ +/* 962 */ /***/ (function(module, exports) { /** @@ -148752,7 +149157,7 @@ module.exports = Replace; /***/ }), -/* 959 */ +/* 963 */ /***/ (function(module, exports) { /** @@ -148790,7 +149195,7 @@ module.exports = SendToBack; /***/ }), -/* 960 */ +/* 964 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148845,7 +149250,7 @@ module.exports = SetAll; /***/ }), -/* 961 */ +/* 965 */ /***/ (function(module, exports) { /** @@ -148893,7 +149298,7 @@ module.exports = Swap; /***/ }), -/* 962 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148903,7 +149308,7 @@ module.exports = Swap; */ var Class = __webpack_require__(0); -var ProcessQueue = __webpack_require__(195); +var ProcessQueue = __webpack_require__(197); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); @@ -149197,7 +149602,7 @@ module.exports = UpdateList; /***/ }), -/* 963 */ +/* 967 */ /***/ (function(module, exports) { /** @@ -149224,7 +149629,7 @@ module.exports = 'add'; /***/ }), -/* 964 */ +/* 968 */ /***/ (function(module, exports) { /** @@ -149251,7 +149656,7 @@ module.exports = 'remove'; /***/ }), -/* 965 */ +/* 969 */ /***/ (function(module, exports) { /** @@ -149773,7 +150178,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 966 */ +/* 970 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149782,7 +150187,7 @@ module.exports = GetBitmapTextSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(196); +var ParseXMLBitmapFont = __webpack_require__(198); /** * Parse an XML Bitmap Font from an Atlas. @@ -149827,7 +150232,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 967 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149841,12 +150246,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(968); + renderWebGL = __webpack_require__(972); } if (true) { - renderCanvas = __webpack_require__(970); + renderCanvas = __webpack_require__(974); } module.exports = { @@ -149858,7 +150263,7 @@ module.exports = { /***/ }), -/* 968 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149867,7 +150272,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BatchChar = __webpack_require__(969); +var BatchChar = __webpack_require__(973); var Utils = __webpack_require__(10); /** @@ -149895,9 +150300,7 @@ var BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; @@ -150018,7 +150421,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 969 */ +/* 973 */ /***/ (function(module, exports) { /** @@ -150034,7 +150437,7 @@ module.exports = BitmapTextWebGLRenderer; * @since 3.50.0 * @private * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The BitmapText Game Object. + * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The WebGLPipeline. Must have a `batchQuad` method. * @param {Phaser.GameObjects.BitmapText} src - The BitmapText Game Object. * @param {Phaser.Types.GameObjects.BitmapText.BitmapTextCharacter} char - The character to render. * @param {Phaser.Types.GameObjects.BitmapText.BitmapFontCharacterData} glyph - The character glyph. @@ -150077,7 +150480,7 @@ module.exports = BatchChar; /***/ }), -/* 970 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150259,7 +150662,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 971 */ +/* 975 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150273,12 +150676,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(972); + renderWebGL = __webpack_require__(976); } if (true) { - renderCanvas = __webpack_require__(973); + renderCanvas = __webpack_require__(977); } module.exports = { @@ -150290,7 +150693,7 @@ module.exports = { /***/ }), -/* 972 */ +/* 976 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150325,9 +150728,7 @@ var BlitterWebGLRenderer = function (renderer, src, interpolationPercentage, cam return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var cameraScrollX = camera.scrollX * src.scrollFactorX; var cameraScrollY = camera.scrollY * src.scrollFactorY; @@ -150420,7 +150821,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 973 */ +/* 977 */ /***/ (function(module, exports) { /** @@ -150550,7 +150951,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 974 */ +/* 978 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150565,12 +150966,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(975); + renderWebGL = __webpack_require__(979); } if (true) { - renderCanvas = __webpack_require__(976); + renderCanvas = __webpack_require__(980); } module.exports = { @@ -150582,7 +150983,7 @@ module.exports = { /***/ }), -/* 975 */ +/* 979 */ /***/ (function(module, exports) { /** @@ -150731,7 +151132,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 976 */ +/* 980 */ /***/ (function(module, exports) { /** @@ -150838,7 +151239,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 977 */ +/* 981 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150852,12 +151253,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(409); + renderWebGL = __webpack_require__(410); } if (true) { - renderCanvas = __webpack_require__(409); + renderCanvas = __webpack_require__(410); } module.exports = { @@ -150869,7 +151270,7 @@ module.exports = { /***/ }), -/* 978 */ +/* 982 */ /***/ (function(module, exports) { /** @@ -150911,7 +151312,7 @@ module.exports = [ /***/ }), -/* 979 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150925,12 +151326,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(980); + renderWebGL = __webpack_require__(984); } if (true) { - renderCanvas = __webpack_require__(981); + renderCanvas = __webpack_require__(985); } module.exports = { @@ -150942,7 +151343,7 @@ module.exports = { /***/ }), -/* 980 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150952,7 +151353,7 @@ module.exports = { */ var Utils = __webpack_require__(10); -var GetColorFromValue = __webpack_require__(117); +var GetColorFromValue = __webpack_require__(119); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -150979,9 +151380,7 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, src, interpolationPerce return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; @@ -151249,7 +151648,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 981 */ +/* 985 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151460,7 +151859,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 982 */ +/* 986 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151474,12 +151873,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(983); + renderWebGL = __webpack_require__(987); } if (true) { - renderCanvas = __webpack_require__(984); + renderCanvas = __webpack_require__(988); } module.exports = { @@ -151491,7 +151890,7 @@ module.exports = { /***/ }), -/* 983 */ +/* 987 */ /***/ (function(module, exports) { /** @@ -151517,9 +151916,7 @@ module.exports = { */ var ExternWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = renderer.currentPipeline; - - renderer.clearPipeline(); + renderer.pipelines.clear(); var camMatrix = renderer._tempMatrix1; var spriteMatrix = renderer._tempMatrix2; @@ -151553,20 +151950,20 @@ var ExternWebGLRenderer = function (renderer, src, interpolationPercentage, came // Callback src.render.call(src, renderer, camera, calcMatrix); - renderer.rebindPipeline(pipeline); + renderer.pipelines.rebind(); }; module.exports = ExternWebGLRenderer; /***/ }), -/* 984 */ +/* 988 */ /***/ (function(module, exports) { /***/ }), -/* 985 */ +/* 989 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151580,15 +151977,15 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(986); + renderWebGL = __webpack_require__(990); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(414); + renderCanvas = __webpack_require__(415); } if (true) { - renderCanvas = __webpack_require__(414); + renderCanvas = __webpack_require__(415); } module.exports = { @@ -151600,7 +151997,7 @@ module.exports = { /***/ }), -/* 986 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151609,7 +152006,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(201); +var Commands = __webpack_require__(203); var Utils = __webpack_require__(10); // TODO: Remove the use of this @@ -151652,9 +152049,7 @@ var GraphicsWebGLRenderer = function (renderer, src, interpolationPercentage, ca return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = src._tempMatrix1; var graphicsMatrix = src._tempMatrix2; @@ -151966,7 +152361,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 987 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151980,12 +152375,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(988); + renderWebGL = __webpack_require__(992); } if (true) { - renderCanvas = __webpack_require__(989); + renderCanvas = __webpack_require__(993); } module.exports = { @@ -151997,7 +152392,7 @@ module.exports = { /***/ }), -/* 988 */ +/* 992 */ /***/ (function(module, exports) { /** @@ -152030,7 +152425,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 989 */ +/* 993 */ /***/ (function(module, exports) { /** @@ -152062,129 +152457,6 @@ var SpriteCanvasRenderer = function (renderer, src, interpolationPercentage, cam module.exports = SpriteCanvasRenderer; -/***/ }), -/* 990 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var renderWebGL = __webpack_require__(1); -var renderCanvas = __webpack_require__(1); - -if (true) -{ - renderWebGL = __webpack_require__(991); -} - -if (true) -{ - renderCanvas = __webpack_require__(992); -} - -module.exports = { - - renderWebGL: renderWebGL, - renderCanvas: renderCanvas - -}; - - -/***/ }), -/* 991 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Renders this Game Object with the WebGL Renderer to the given Camera. - * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. - * This method should not be called directly. It is a utility function of the Render module. - * - * @method Phaser.GameObjects.Image#renderWebGL - * @since 3.0.0 - * @private - * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - */ -var ImageWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) -{ - this.pipeline.batchSprite(src, camera, parentMatrix); -}; - -module.exports = ImageWebGLRenderer; - - -/***/ }), -/* 992 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Renders this Game Object with the Canvas Renderer to the given Camera. - * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. - * This method should not be called directly. It is a utility function of the Render module. - * - * @method Phaser.GameObjects.Image#renderCanvas - * @since 3.0.0 - * @private - * - * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - */ -var ImageCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) -{ - renderer.batchSprite(src, src.frame, camera, parentMatrix); -}; - -module.exports = ImageCanvasRenderer; - - -/***/ }), -/* 993 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Particles - */ - -module.exports = { - - EmitterOp: __webpack_require__(415), - GravityWell: __webpack_require__(416), - Particle: __webpack_require__(417), - ParticleEmitter: __webpack_require__(418), - ParticleEmitterManager: __webpack_require__(203), - Zones: __webpack_require__(997) - -}; - - /***/ }), /* 994 */ /***/ (function(module, exports, __webpack_require__) { @@ -152218,6 +152490,129 @@ module.exports = { /***/ }), /* 995 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the WebGL Renderer to the given Camera. + * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. + * This method should not be called directly. It is a utility function of the Render module. + * + * @method Phaser.GameObjects.Image#renderWebGL + * @since 3.0.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + */ +var ImageWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +{ + this.pipeline.batchSprite(src, camera, parentMatrix); +}; + +module.exports = ImageWebGLRenderer; + + +/***/ }), +/* 996 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the Canvas Renderer to the given Camera. + * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. + * This method should not be called directly. It is a utility function of the Render module. + * + * @method Phaser.GameObjects.Image#renderCanvas + * @since 3.0.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + */ +var ImageCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +{ + renderer.batchSprite(src, src.frame, camera, parentMatrix); +}; + +module.exports = ImageCanvasRenderer; + + +/***/ }), +/* 997 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Particles + */ + +module.exports = { + + EmitterOp: __webpack_require__(416), + GravityWell: __webpack_require__(417), + Particle: __webpack_require__(418), + ParticleEmitter: __webpack_require__(419), + ParticleEmitterManager: __webpack_require__(205), + Zones: __webpack_require__(1001) + +}; + + +/***/ }), +/* 998 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); + +if (true) +{ + renderWebGL = __webpack_require__(999); +} + +if (true) +{ + renderCanvas = __webpack_require__(1000); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152253,7 +152648,7 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpola return; } - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1.copyFrom(camera.matrix); var calcMatrix = pipeline._tempMatrix2; @@ -152262,8 +152657,6 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpola camMatrix.multiply(managerMatrix); - renderer.setPipeline(pipeline); - var roundPixels = camera.roundPixels; var texture = emitterManager.defaultFrame.glTexture; var getTint = Utils.getTintAppendFloatAlphaAndSwap; @@ -152378,7 +152771,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 996 */ +/* 1000 */ /***/ (function(module, exports) { /** @@ -152501,7 +152894,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 997 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152516,15 +152909,15 @@ module.exports = ParticleManagerCanvasRenderer; module.exports = { - DeathZone: __webpack_require__(419), - EdgeZone: __webpack_require__(420), - RandomZone: __webpack_require__(422) + DeathZone: __webpack_require__(420), + EdgeZone: __webpack_require__(421), + RandomZone: __webpack_require__(423) }; /***/ }), -/* 998 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152538,12 +152931,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(999); + renderWebGL = __webpack_require__(1003); } if (true) { - renderCanvas = __webpack_require__(1000); + renderCanvas = __webpack_require__(1004); } module.exports = { @@ -152555,7 +152948,7 @@ module.exports = { /***/ }), -/* 999 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152587,9 +152980,7 @@ var RenderTextureWebGLRenderer = function (renderer, src, interpolationPercentag var width = frame.width; var height = frame.height; var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = src.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(src.pipeline, src); var textureUnit = pipeline.setTexture2D(frame.glTexture, src); @@ -152622,7 +153013,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 1000 */ +/* 1004 */ /***/ (function(module, exports) { /** @@ -152655,7 +153046,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 1001 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152664,7 +153055,7 @@ module.exports = RenderTextureCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(1002); +var RETRO_FONT_CONST = __webpack_require__(1006); var Extend = __webpack_require__(19); /** @@ -152672,7 +153063,7 @@ var Extend = __webpack_require__(19); * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(1003) }; +var RetroFont = { Parse: __webpack_require__(1007) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -152681,7 +153072,7 @@ module.exports = RetroFont; /***/ }), -/* 1002 */ +/* 1006 */ /***/ (function(module, exports) { /** @@ -152797,7 +153188,7 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 1003 */ +/* 1007 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152913,7 +153304,7 @@ module.exports = ParseRetroFont; /***/ }), -/* 1004 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152927,12 +153318,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1005); + renderWebGL = __webpack_require__(1009); } if (true) { - renderCanvas = __webpack_require__(1006); + renderCanvas = __webpack_require__(1010); } module.exports = { @@ -152944,7 +153335,7 @@ module.exports = { /***/ }), -/* 1005 */ +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152972,9 +153363,7 @@ var Utils = __webpack_require__(10); */ var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = src.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(src.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; @@ -153081,7 +153470,7 @@ module.exports = RopeWebGLRenderer; /***/ }), -/* 1006 */ +/* 1010 */ /***/ (function(module, exports) { /** @@ -153110,7 +153499,7 @@ module.exports = RopeCanvasRenderer; /***/ }), -/* 1007 */ +/* 1011 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153124,12 +153513,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1008); + renderWebGL = __webpack_require__(1012); } if (true) { - renderCanvas = __webpack_require__(1009); + renderCanvas = __webpack_require__(1013); } module.exports = { @@ -153141,7 +153530,7 @@ module.exports = { /***/ }), -/* 1008 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153178,9 +153567,7 @@ var TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera var width = frame.width; var height = frame.height; var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var textureUnit = pipeline.setTexture2D(frame.glTexture, src); @@ -153213,7 +153600,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 1009 */ +/* 1013 */ /***/ (function(module, exports) { /** @@ -153251,7 +153638,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 1010 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153265,12 +153652,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1011); + renderWebGL = __webpack_require__(1015); } if (true) { - renderCanvas = __webpack_require__(1012); + renderCanvas = __webpack_require__(1016); } module.exports = { @@ -153282,7 +153669,7 @@ module.exports = { /***/ }), -/* 1011 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153314,15 +153701,14 @@ var TileSpriteWebGLRenderer = function (renderer, src, interpolationPercentage, var width = src.width; var height = src.height; - var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = this.pipeline; - if (width === 0 || height === 0) { return; } - renderer.setPipeline(pipeline, src); + var getTint = Utils.getTintAppendFloatAlpha; + + var pipeline = renderer.pipelines.set(this.pipeline, src); var textureUnit = pipeline.setTexture2D(src.fillPattern, src); @@ -153356,7 +153742,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 1012 */ +/* 1016 */ /***/ (function(module, exports) { /** @@ -153391,7 +153777,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 1013 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153405,12 +153791,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1014); + renderWebGL = __webpack_require__(1018); } if (true) { - renderCanvas = __webpack_require__(1015); + renderCanvas = __webpack_require__(1019); } module.exports = { @@ -153422,7 +153808,7 @@ module.exports = { /***/ }), -/* 1014 */ +/* 1018 */ /***/ (function(module, exports) { /** @@ -153458,7 +153844,7 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 1015 */ +/* 1019 */ /***/ (function(module, exports) { /** @@ -153494,7 +153880,7 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 1016 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153508,12 +153894,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1017); + renderWebGL = __webpack_require__(1021); } if (true) { - renderCanvas = __webpack_require__(1018); + renderCanvas = __webpack_require__(1022); } module.exports = { @@ -153525,7 +153911,7 @@ module.exports = { /***/ }), -/* 1017 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153534,7 +153920,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(101); var StrokePathWebGL = __webpack_require__(72); /** @@ -153554,14 +153940,12 @@ var StrokePathWebGL = __webpack_require__(72); */ var ArcWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -153603,7 +153987,7 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 1018 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153679,7 +154063,7 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 1019 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153693,12 +154077,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1020); + renderWebGL = __webpack_require__(1024); } if (true) { - renderCanvas = __webpack_require__(1021); + renderCanvas = __webpack_require__(1025); } module.exports = { @@ -153710,7 +154094,7 @@ module.exports = { /***/ }), -/* 1020 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153719,7 +154103,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(101); var StrokePathWebGL = __webpack_require__(72); /** @@ -153739,14 +154123,12 @@ var StrokePathWebGL = __webpack_require__(72); */ var CurveWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -153788,7 +154170,7 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 1021 */ +/* 1025 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153876,7 +154258,7 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 1022 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153890,12 +154272,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1023); + renderWebGL = __webpack_require__(1027); } if (true) { - renderCanvas = __webpack_require__(1024); + renderCanvas = __webpack_require__(1028); } module.exports = { @@ -153907,7 +154289,7 @@ module.exports = { /***/ }), -/* 1023 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153916,7 +154298,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(101); var StrokePathWebGL = __webpack_require__(72); /** @@ -153936,14 +154318,12 @@ var StrokePathWebGL = __webpack_require__(72); */ var EllipseWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -153985,7 +154365,7 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 1024 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154070,7 +154450,7 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 1025 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154084,12 +154464,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1026); + renderWebGL = __webpack_require__(1030); } if (true) { - renderCanvas = __webpack_require__(1027); + renderCanvas = __webpack_require__(1031); } module.exports = { @@ -154101,7 +154481,7 @@ module.exports = { /***/ }), -/* 1026 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154129,14 +154509,12 @@ var Utils = __webpack_require__(10); */ var GridWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -154321,7 +154699,7 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 1027 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154510,7 +154888,7 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 1028 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154524,12 +154902,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1029); + renderWebGL = __webpack_require__(1033); } if (true) { - renderCanvas = __webpack_require__(1030); + renderCanvas = __webpack_require__(1034); } module.exports = { @@ -154541,7 +154919,7 @@ module.exports = { /***/ }), -/* 1029 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154569,14 +154947,12 @@ var Utils = __webpack_require__(10); */ var IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -154695,7 +155071,7 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 1030 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154796,7 +155172,7 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 1031 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154810,12 +155186,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1032); + renderWebGL = __webpack_require__(1036); } if (true) { - renderCanvas = __webpack_require__(1033); + renderCanvas = __webpack_require__(1037); } module.exports = { @@ -154827,7 +155203,7 @@ module.exports = { /***/ }), -/* 1032 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154855,14 +155231,12 @@ var Utils = __webpack_require__(10); */ var IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -155002,7 +155376,7 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 1033 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155116,7 +155490,7 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 1034 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155130,12 +155504,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1035); + renderWebGL = __webpack_require__(1039); } if (true) { - renderCanvas = __webpack_require__(1036); + renderCanvas = __webpack_require__(1040); } module.exports = { @@ -155147,7 +155521,7 @@ module.exports = { /***/ }), -/* 1035 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155175,13 +155549,11 @@ var Utils = __webpack_require__(10); */ var LineWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -155240,7 +155612,7 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 1036 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155297,7 +155669,7 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1037 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155311,12 +155683,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1038); + renderWebGL = __webpack_require__(1042); } if (true) { - renderCanvas = __webpack_require__(1039); + renderCanvas = __webpack_require__(1043); } module.exports = { @@ -155328,7 +155700,7 @@ module.exports = { /***/ }), -/* 1038 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155337,7 +155709,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(101); var StrokePathWebGL = __webpack_require__(72); /** @@ -155357,14 +155729,12 @@ var StrokePathWebGL = __webpack_require__(72); */ var PolygonWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -155406,7 +155776,7 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1039 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155491,7 +155861,7 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1040 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155505,12 +155875,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1041); + renderWebGL = __webpack_require__(1045); } if (true) { - renderCanvas = __webpack_require__(1042); + renderCanvas = __webpack_require__(1046); } module.exports = { @@ -155522,7 +155892,7 @@ module.exports = { /***/ }), -/* 1041 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155551,14 +155921,12 @@ var Utils = __webpack_require__(10); */ var RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -155588,7 +155956,7 @@ var RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, c { var fillTint = pipeline.fillTint; var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha); - + fillTint.TL = fillTintColor; fillTint.TR = fillTintColor; fillTint.BL = fillTintColor; @@ -155614,7 +155982,7 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1042 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155688,7 +156056,7 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1043 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155702,12 +156070,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1044); + renderWebGL = __webpack_require__(1048); } if (true) { - renderCanvas = __webpack_require__(1045); + renderCanvas = __webpack_require__(1049); } module.exports = { @@ -155719,7 +156087,7 @@ module.exports = { /***/ }), -/* 1044 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155728,7 +156096,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(101); var StrokePathWebGL = __webpack_require__(72); /** @@ -155748,14 +156116,12 @@ var StrokePathWebGL = __webpack_require__(72); */ var StarWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -155797,7 +156163,7 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1045 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155882,7 +156248,7 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1046 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155896,12 +156262,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1047); + renderWebGL = __webpack_require__(1051); } if (true) { - renderCanvas = __webpack_require__(1048); + renderCanvas = __webpack_require__(1052); } module.exports = { @@ -155913,7 +156279,7 @@ module.exports = { /***/ }), -/* 1047 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155942,14 +156308,12 @@ var Utils = __webpack_require__(10); */ var TriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -156016,7 +156380,7 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1048 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156091,7 +156455,7 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1049 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156100,7 +156464,7 @@ module.exports = TriangleCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(197); +var Blitter = __webpack_require__(199); var GameObjectFactory = __webpack_require__(5); /** @@ -156133,7 +156497,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1050 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156143,7 +156507,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Container = __webpack_require__(198); +var Container = __webpack_require__(200); var GameObjectFactory = __webpack_require__(5); /** @@ -156167,7 +156531,7 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1051 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156176,7 +156540,7 @@ GameObjectFactory.register('container', function (x, y, children) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DOMElement = __webpack_require__(408); +var DOMElement = __webpack_require__(409); var GameObjectFactory = __webpack_require__(5); /** @@ -156256,7 +156620,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /***/ }), -/* 1052 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156265,7 +156629,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DynamicBitmapText = __webpack_require__(199); +var DynamicBitmapText = __webpack_require__(201); var GameObjectFactory = __webpack_require__(5); /** @@ -156325,7 +156689,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1053 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156334,7 +156698,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extern = __webpack_require__(410); +var Extern = __webpack_require__(411); var GameObjectFactory = __webpack_require__(5); /** @@ -156366,7 +156730,7 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1054 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156375,7 +156739,7 @@ GameObjectFactory.register('extern', function () * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Graphics = __webpack_require__(200); +var Graphics = __webpack_require__(202); var GameObjectFactory = __webpack_require__(5); /** @@ -156405,7 +156769,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1055 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156414,7 +156778,7 @@ GameObjectFactory.register('graphics', function (config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Group = __webpack_require__(99); +var Group = __webpack_require__(100); var GameObjectFactory = __webpack_require__(5); /** @@ -156437,7 +156801,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1056 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156446,7 +156810,7 @@ GameObjectFactory.register('group', function (children, config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Image = __webpack_require__(112); +var Image = __webpack_require__(114); var GameObjectFactory = __webpack_require__(5); /** @@ -156479,7 +156843,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1057 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156489,7 +156853,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var ParticleEmitterManager = __webpack_require__(203); +var ParticleEmitterManager = __webpack_require__(205); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -156520,7 +156884,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1058 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156530,7 +156894,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) */ var GameObjectFactory = __webpack_require__(5); -var PathFollower = __webpack_require__(423); +var PathFollower = __webpack_require__(424); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -156568,7 +156932,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1059 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156578,7 +156942,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var RenderTexture = __webpack_require__(204); +var RenderTexture = __webpack_require__(206); /** * Creates a new Render Texture Game Object and adds it to the Scene. @@ -156608,7 +156972,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, /***/ }), -/* 1060 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156617,7 +156981,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Rope = __webpack_require__(206); +var Rope = __webpack_require__(208); var GameObjectFactory = __webpack_require__(5); /** @@ -156658,7 +157022,7 @@ if (true) /***/ }), -/* 1061 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156704,7 +157068,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 1062 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156713,7 +157077,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(139); +var BitmapText = __webpack_require__(140); var GameObjectFactory = __webpack_require__(5); /** @@ -156768,7 +157132,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 1063 */ +/* 1067 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156777,7 +157141,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Text = __webpack_require__(207); +var Text = __webpack_require__(209); var GameObjectFactory = __webpack_require__(5); /** @@ -156833,7 +157197,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 1064 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156842,7 +157206,7 @@ GameObjectFactory.register('text', function (x, y, text, style) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileSprite = __webpack_require__(208); +var TileSprite = __webpack_require__(210); var GameObjectFactory = __webpack_require__(5); /** @@ -156877,7 +157241,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 1065 */ +/* 1069 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156886,7 +157250,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Zone = __webpack_require__(115); +var Zone = __webpack_require__(117); var GameObjectFactory = __webpack_require__(5); /** @@ -156919,7 +157283,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 1066 */ +/* 1070 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156928,7 +157292,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Video = __webpack_require__(209); +var Video = __webpack_require__(211); var GameObjectFactory = __webpack_require__(5); /** @@ -156965,7 +157329,7 @@ GameObjectFactory.register('video', function (x, y, key) /***/ }), -/* 1067 */ +/* 1071 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156974,7 +157338,7 @@ GameObjectFactory.register('video', function (x, y, key) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arc = __webpack_require__(427); +var Arc = __webpack_require__(428); var GameObjectFactory = __webpack_require__(5); /** @@ -157038,7 +157402,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /***/ }), -/* 1068 */ +/* 1072 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157048,7 +157412,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph */ var GameObjectFactory = __webpack_require__(5); -var Curve = __webpack_require__(428); +var Curve = __webpack_require__(429); /** * Creates a new Curve Shape Game Object and adds it to the Scene. @@ -157088,7 +157452,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /***/ }), -/* 1069 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157097,7 +157461,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(429); +var Ellipse = __webpack_require__(430); var GameObjectFactory = __webpack_require__(5); /** @@ -157140,7 +157504,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /***/ }), -/* 1070 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157150,7 +157514,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, */ var GameObjectFactory = __webpack_require__(5); -var Grid = __webpack_require__(430); +var Grid = __webpack_require__(431); /** * Creates a new Grid Shape Game Object and adds it to the Scene. @@ -157195,7 +157559,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /***/ }), -/* 1071 */ +/* 1075 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157205,7 +157569,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel */ var GameObjectFactory = __webpack_require__(5); -var IsoBox = __webpack_require__(431); +var IsoBox = __webpack_require__(432); /** * Creates a new IsoBox Shape Game Object and adds it to the Scene. @@ -157246,7 +157610,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /***/ }), -/* 1072 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157256,7 +157620,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill */ var GameObjectFactory = __webpack_require__(5); -var IsoTriangle = __webpack_require__(432); +var IsoTriangle = __webpack_require__(433); /** * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. @@ -157299,7 +157663,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /***/ }), -/* 1073 */ +/* 1077 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157309,7 +157673,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed */ var GameObjectFactory = __webpack_require__(5); -var Line = __webpack_require__(433); +var Line = __webpack_require__(434); /** * Creates a new Line Shape Game Object and adds it to the Scene. @@ -157350,7 +157714,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /***/ }), -/* 1074 */ +/* 1078 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157360,7 +157724,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, */ var GameObjectFactory = __webpack_require__(5); -var Polygon = __webpack_require__(434); +var Polygon = __webpack_require__(435); /** * Creates a new Polygon Shape Game Object and adds it to the Scene. @@ -157403,7 +157767,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /***/ }), -/* 1075 */ +/* 1079 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157413,7 +157777,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp */ var GameObjectFactory = __webpack_require__(5); -var Rectangle = __webpack_require__(439); +var Rectangle = __webpack_require__(440); /** * Creates a new Rectangle Shape Game Object and adds it to the Scene. @@ -157448,7 +157812,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /***/ }), -/* 1076 */ +/* 1080 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157457,7 +157821,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Star = __webpack_require__(440); +var Star = __webpack_require__(441); var GameObjectFactory = __webpack_require__(5); /** @@ -157500,7 +157864,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /***/ }), -/* 1077 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157510,7 +157874,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad */ var GameObjectFactory = __webpack_require__(5); -var Triangle = __webpack_require__(441); +var Triangle = __webpack_require__(442); /** * Creates a new Triangle Shape Game Object and adds it to the Scene. @@ -157551,7 +157915,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /***/ }), -/* 1078 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157560,7 +157924,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(197); +var Blitter = __webpack_require__(199); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -157601,7 +157965,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 1079 */ +/* 1083 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157612,7 +157976,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) */ var BuildGameObject = __webpack_require__(27); -var Container = __webpack_require__(198); +var Container = __webpack_require__(200); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -157651,7 +158015,7 @@ GameObjectCreator.register('container', function (config, addToScene) /***/ }), -/* 1080 */ +/* 1084 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157660,7 +158024,7 @@ GameObjectCreator.register('container', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(199); +var BitmapText = __webpack_require__(201); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -157702,7 +158066,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 1081 */ +/* 1085 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157712,7 +158076,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var Graphics = __webpack_require__(200); +var Graphics = __webpack_require__(202); /** * Creates a new Graphics Game Object and returns it. @@ -157750,7 +158114,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) /***/ }), -/* 1082 */ +/* 1086 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157760,7 +158124,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var Group = __webpack_require__(99); +var Group = __webpack_require__(100); /** * Creates a new Group Game Object and returns it. @@ -157783,7 +158147,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 1083 */ +/* 1087 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157795,7 +158159,7 @@ GameObjectCreator.register('group', function (config) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Image = __webpack_require__(112); +var Image = __webpack_require__(114); /** * Creates a new Image Game Object and returns it. @@ -157833,7 +158197,7 @@ GameObjectCreator.register('image', function (config, addToScene) /***/ }), -/* 1084 */ +/* 1088 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157845,7 +158209,7 @@ GameObjectCreator.register('image', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetFastValue = __webpack_require__(2); -var ParticleEmitterManager = __webpack_require__(203); +var ParticleEmitterManager = __webpack_require__(205); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -157888,7 +158252,7 @@ GameObjectCreator.register('particles', function (config, addToScene) /***/ }), -/* 1085 */ +/* 1089 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157900,7 +158264,7 @@ GameObjectCreator.register('particles', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var RenderTexture = __webpack_require__(204); +var RenderTexture = __webpack_require__(206); /** * Creates a new Render Texture Game Object and returns it. @@ -157940,7 +158304,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 1086 */ +/* 1090 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157953,7 +158317,7 @@ var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Rope = __webpack_require__(206); +var Rope = __webpack_require__(208); /** * Creates a new Rope Game Object and returns it. @@ -157995,7 +158359,7 @@ GameObjectCreator.register('rope', function (config, addToScene) /***/ }), -/* 1087 */ +/* 1091 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158005,7 +158369,7 @@ GameObjectCreator.register('rope', function (config, addToScene) */ var BuildGameObject = __webpack_require__(27); -var BuildGameObjectAnimation = __webpack_require__(405); +var BuildGameObjectAnimation = __webpack_require__(406); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var Sprite = __webpack_require__(76); @@ -158048,7 +158412,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1088 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158057,7 +158421,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(139); +var BitmapText = __webpack_require__(140); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -158101,7 +158465,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1089 */ +/* 1093 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158113,7 +158477,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Text = __webpack_require__(207); +var Text = __webpack_require__(209); /** * Creates a new Text Game Object and returns it. @@ -158188,7 +158552,7 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1090 */ +/* 1094 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158200,7 +158564,7 @@ GameObjectCreator.register('text', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var TileSprite = __webpack_require__(208); +var TileSprite = __webpack_require__(210); /** * Creates a new TileSprite Game Object and returns it. @@ -158240,7 +158604,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1091 */ +/* 1095 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158251,7 +158615,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Zone = __webpack_require__(115); +var Zone = __webpack_require__(117); /** * Creates a new Zone Game Object and returns it. @@ -158279,7 +158643,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1092 */ +/* 1096 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158291,7 +158655,7 @@ GameObjectCreator.register('zone', function (config) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Video = __webpack_require__(209); +var Video = __webpack_require__(211); /** * Creates a new Video Game Object and returns it. @@ -158328,7 +158692,7 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1093 */ +/* 1097 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158342,12 +158706,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1094); + renderWebGL = __webpack_require__(1098); } if (true) { - renderCanvas = __webpack_require__(1095); + renderCanvas = __webpack_require__(1099); } module.exports = { @@ -158359,7 +158723,7 @@ module.exports = { /***/ }), -/* 1094 */ +/* 1098 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158387,9 +158751,7 @@ var Utils = __webpack_require__(10); */ var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; @@ -158475,7 +158837,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1095 */ +/* 1099 */ /***/ (function(module, exports) { /** @@ -158504,7 +158866,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1096 */ +/* 1100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158518,12 +158880,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1097); + renderWebGL = __webpack_require__(1101); } if (true) { - renderCanvas = __webpack_require__(1098); + renderCanvas = __webpack_require__(1102); } module.exports = { @@ -158535,7 +158897,7 @@ module.exports = { /***/ }), -/* 1097 */ +/* 1101 */ /***/ (function(module, exports) { /** @@ -158566,9 +158928,7 @@ var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, came return; } - var pipeline = renderer.currentPipeline; - - renderer.clearPipeline(); + renderer.pipelines.clear(); if (src.renderToTexture) { @@ -158580,16 +158940,16 @@ var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, came var camMatrix = src._tempMatrix1; var shapeMatrix = src._tempMatrix2; var calcMatrix = src._tempMatrix3; - + shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - + camMatrix.copyFrom(camera.matrix); - + if (parentMatrix) { // Multiply the camera by the parent matrix camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - + // Undo the camera scroll shapeMatrix.e = src.x; shapeMatrix.f = src.y; @@ -158599,27 +158959,27 @@ var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, came shapeMatrix.e -= camera.scrollX * src.scrollFactorX; shapeMatrix.f -= camera.scrollY * src.scrollFactorY; } - + camMatrix.multiply(shapeMatrix, calcMatrix); - + // Renderer size changed? if (renderer.width !== src._rendererWidth || renderer.height !== src._rendererHeight) { src.projOrtho(0, renderer.width, renderer.height, 0); } - + src.load(calcMatrix.matrix); src.flush(); } - renderer.rebindPipeline(pipeline); + renderer.pipelines.rebind(); }; module.exports = ShaderWebGLRenderer; /***/ }), -/* 1098 */ +/* 1102 */ /***/ (function(module, exports) { /** @@ -158648,7 +159008,7 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1099 */ +/* 1103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158657,7 +159017,7 @@ module.exports = ShaderCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(141); +var Mesh = __webpack_require__(142); var GameObjectFactory = __webpack_require__(5); /** @@ -158698,7 +159058,7 @@ if (true) /***/ }), -/* 1100 */ +/* 1104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158707,7 +159067,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Quad = __webpack_require__(212); +var Quad = __webpack_require__(214); var GameObjectFactory = __webpack_require__(5); /** @@ -158744,7 +159104,7 @@ if (true) /***/ }), -/* 1101 */ +/* 1105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158753,7 +159113,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Shader = __webpack_require__(213); +var Shader = __webpack_require__(215); var GameObjectFactory = __webpack_require__(5); /** @@ -158785,7 +159145,7 @@ if (true) /***/ }), -/* 1102 */ +/* 1106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158798,7 +159158,7 @@ var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Mesh = __webpack_require__(141); +var Mesh = __webpack_require__(142); /** * Creates a new Mesh Game Object and returns it. @@ -158840,7 +159200,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1103 */ +/* 1107 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158852,7 +159212,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Quad = __webpack_require__(212); +var Quad = __webpack_require__(214); /** * Creates a new Quad Game Object and returns it. @@ -158890,7 +159250,7 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1104 */ +/* 1108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158902,7 +159262,7 @@ GameObjectCreator.register('quad', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Shader = __webpack_require__(213); +var Shader = __webpack_require__(215); /** * Creates a new Shader Game Object and returns it. @@ -158943,7 +159303,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1105 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158953,7 +159313,7 @@ GameObjectCreator.register('shader', function (config, addToScene) */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(446); +var LightsManager = __webpack_require__(447); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); @@ -159059,7 +159419,7 @@ module.exports = LightsPlugin; /***/ }), -/* 1106 */ +/* 1110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159070,27 +159430,27 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(68); -Circle.Area = __webpack_require__(1107); -Circle.Circumference = __webpack_require__(278); -Circle.CircumferencePoint = __webpack_require__(157); -Circle.Clone = __webpack_require__(1108); +Circle.Area = __webpack_require__(1111); +Circle.Circumference = __webpack_require__(279); +Circle.CircumferencePoint = __webpack_require__(159); +Circle.Clone = __webpack_require__(1112); Circle.Contains = __webpack_require__(57); -Circle.ContainsPoint = __webpack_require__(1109); -Circle.ContainsRect = __webpack_require__(1110); -Circle.CopyFrom = __webpack_require__(1111); -Circle.Equals = __webpack_require__(1112); -Circle.GetBounds = __webpack_require__(1113); -Circle.GetPoint = __webpack_require__(276); -Circle.GetPoints = __webpack_require__(277); -Circle.Offset = __webpack_require__(1114); -Circle.OffsetPoint = __webpack_require__(1115); -Circle.Random = __webpack_require__(158); +Circle.ContainsPoint = __webpack_require__(1113); +Circle.ContainsRect = __webpack_require__(1114); +Circle.CopyFrom = __webpack_require__(1115); +Circle.Equals = __webpack_require__(1116); +Circle.GetBounds = __webpack_require__(1117); +Circle.GetPoint = __webpack_require__(277); +Circle.GetPoints = __webpack_require__(278); +Circle.Offset = __webpack_require__(1118); +Circle.OffsetPoint = __webpack_require__(1119); +Circle.Random = __webpack_require__(160); module.exports = Circle; /***/ }), -/* 1107 */ +/* 1111 */ /***/ (function(module, exports) { /** @@ -159118,7 +159478,7 @@ module.exports = Area; /***/ }), -/* 1108 */ +/* 1112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159148,7 +159508,7 @@ module.exports = Clone; /***/ }), -/* 1109 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159179,7 +159539,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1110 */ +/* 1114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159215,7 +159575,7 @@ module.exports = ContainsRect; /***/ }), -/* 1111 */ +/* 1115 */ /***/ (function(module, exports) { /** @@ -159247,7 +159607,7 @@ module.exports = CopyFrom; /***/ }), -/* 1112 */ +/* 1116 */ /***/ (function(module, exports) { /** @@ -159281,7 +159641,7 @@ module.exports = Equals; /***/ }), -/* 1113 */ +/* 1117 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159321,7 +159681,7 @@ module.exports = GetBounds; /***/ }), -/* 1114 */ +/* 1118 */ /***/ (function(module, exports) { /** @@ -159356,7 +159716,7 @@ module.exports = Offset; /***/ }), -/* 1115 */ +/* 1119 */ /***/ (function(module, exports) { /** @@ -159390,7 +159750,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1116 */ +/* 1120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159399,29 +159759,29 @@ module.exports = OffsetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(97); +var Ellipse = __webpack_require__(98); -Ellipse.Area = __webpack_require__(1117); -Ellipse.Circumference = __webpack_require__(413); -Ellipse.CircumferencePoint = __webpack_require__(202); -Ellipse.Clone = __webpack_require__(1118); -Ellipse.Contains = __webpack_require__(98); -Ellipse.ContainsPoint = __webpack_require__(1119); -Ellipse.ContainsRect = __webpack_require__(1120); -Ellipse.CopyFrom = __webpack_require__(1121); -Ellipse.Equals = __webpack_require__(1122); -Ellipse.GetBounds = __webpack_require__(1123); -Ellipse.GetPoint = __webpack_require__(411); -Ellipse.GetPoints = __webpack_require__(412); -Ellipse.Offset = __webpack_require__(1124); -Ellipse.OffsetPoint = __webpack_require__(1125); -Ellipse.Random = __webpack_require__(165); +Ellipse.Area = __webpack_require__(1121); +Ellipse.Circumference = __webpack_require__(414); +Ellipse.CircumferencePoint = __webpack_require__(204); +Ellipse.Clone = __webpack_require__(1122); +Ellipse.Contains = __webpack_require__(99); +Ellipse.ContainsPoint = __webpack_require__(1123); +Ellipse.ContainsRect = __webpack_require__(1124); +Ellipse.CopyFrom = __webpack_require__(1125); +Ellipse.Equals = __webpack_require__(1126); +Ellipse.GetBounds = __webpack_require__(1127); +Ellipse.GetPoint = __webpack_require__(412); +Ellipse.GetPoints = __webpack_require__(413); +Ellipse.Offset = __webpack_require__(1128); +Ellipse.OffsetPoint = __webpack_require__(1129); +Ellipse.Random = __webpack_require__(167); module.exports = Ellipse; /***/ }), -/* 1117 */ +/* 1121 */ /***/ (function(module, exports) { /** @@ -159455,7 +159815,7 @@ module.exports = Area; /***/ }), -/* 1118 */ +/* 1122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159464,7 +159824,7 @@ module.exports = Area; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(97); +var Ellipse = __webpack_require__(98); /** * Creates a new Ellipse instance based on the values contained in the given source. @@ -159485,7 +159845,7 @@ module.exports = Clone; /***/ }), -/* 1119 */ +/* 1123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159494,7 +159854,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(98); +var Contains = __webpack_require__(99); /** * Check to see if the Ellipse contains the given Point object. @@ -159516,7 +159876,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1120 */ +/* 1124 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159525,7 +159885,7 @@ module.exports = ContainsPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(98); +var Contains = __webpack_require__(99); /** * Check to see if the Ellipse contains all four points of the given Rectangle object. @@ -159552,7 +159912,7 @@ module.exports = ContainsRect; /***/ }), -/* 1121 */ +/* 1125 */ /***/ (function(module, exports) { /** @@ -159584,7 +159944,7 @@ module.exports = CopyFrom; /***/ }), -/* 1122 */ +/* 1126 */ /***/ (function(module, exports) { /** @@ -159619,7 +159979,7 @@ module.exports = Equals; /***/ }), -/* 1123 */ +/* 1127 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159659,7 +160019,7 @@ module.exports = GetBounds; /***/ }), -/* 1124 */ +/* 1128 */ /***/ (function(module, exports) { /** @@ -159694,7 +160054,7 @@ module.exports = Offset; /***/ }), -/* 1125 */ +/* 1129 */ /***/ (function(module, exports) { /** @@ -159728,7 +160088,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1126 */ +/* 1130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159739,7 +160099,7 @@ module.exports = OffsetPoint; */ var Point = __webpack_require__(4); -var CircleToCircle = __webpack_require__(214); +var CircleToCircle = __webpack_require__(216); /** * Checks if two Circles intersect and returns the intersection points as a Point object array. @@ -159822,7 +160182,7 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1127 */ +/* 1131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159832,8 +160192,8 @@ module.exports = GetCircleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(216); -var CircleToRectangle = __webpack_require__(215); +var GetLineToCircle = __webpack_require__(218); +var CircleToRectangle = __webpack_require__(217); /** * Checks for intersection between a circle and a rectangle, @@ -159872,7 +160232,7 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1128 */ +/* 1132 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159881,8 +160241,8 @@ module.exports = GetCircleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector4 = __webpack_require__(128); -var GetLineToPolygon = __webpack_require__(451); +var Vector4 = __webpack_require__(129); +var GetLineToPolygon = __webpack_require__(452); var Line = __webpack_require__(40); // Temp calculation segment @@ -159974,7 +160334,7 @@ module.exports = GetRaysFromPointToPolygon; /***/ }), -/* 1129 */ +/* 1133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159984,7 +160344,7 @@ module.exports = GetRaysFromPointToPolygon; */ var Rectangle = __webpack_require__(9); -var RectangleToRectangle = __webpack_require__(142); +var RectangleToRectangle = __webpack_require__(143); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -160023,7 +160383,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1130 */ +/* 1134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160033,8 +160393,8 @@ module.exports = GetRectangleIntersection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToRectangle = __webpack_require__(218); -var RectangleToRectangle = __webpack_require__(142); +var GetLineToRectangle = __webpack_require__(220); +var RectangleToRectangle = __webpack_require__(143); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -160074,7 +160434,7 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1131 */ +/* 1135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160084,8 +160444,8 @@ module.exports = GetRectangleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(453); -var GetLineToRectangle = __webpack_require__(218); +var RectangleToTriangle = __webpack_require__(454); +var GetLineToRectangle = __webpack_require__(220); /** * Checks for intersection between Rectangle shape and Triangle shape, @@ -160122,7 +160482,7 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1132 */ +/* 1136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160132,8 +160492,8 @@ module.exports = GetRectangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(216); -var TriangleToCircle = __webpack_require__(455); +var GetLineToCircle = __webpack_require__(218); +var TriangleToCircle = __webpack_require__(456); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -160171,7 +160531,7 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1133 */ +/* 1137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160181,8 +160541,8 @@ module.exports = GetTriangleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(458); -var GetTriangleToLine = __webpack_require__(456); +var TriangleToTriangle = __webpack_require__(459); +var GetTriangleToLine = __webpack_require__(457); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -160220,7 +160580,7 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1134 */ +/* 1138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160229,7 +160589,7 @@ module.exports = GetTriangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(460); +var PointToLine = __webpack_require__(461); /** * Checks if a Point is located on the given line segment. @@ -160261,7 +160621,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 1135 */ +/* 1139 */ /***/ (function(module, exports) { /** @@ -160301,7 +160661,7 @@ module.exports = RectangleToValues; /***/ }), -/* 1136 */ +/* 1140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160313,40 +160673,40 @@ module.exports = RectangleToValues; var Line = __webpack_require__(40); Line.Angle = __webpack_require__(87); -Line.BresenhamPoints = __webpack_require__(296); -Line.CenterOn = __webpack_require__(1137); -Line.Clone = __webpack_require__(1138); -Line.CopyFrom = __webpack_require__(1139); -Line.Equals = __webpack_require__(1140); -Line.Extend = __webpack_require__(1141); -Line.GetEasedPoints = __webpack_require__(1142); -Line.GetMidPoint = __webpack_require__(1143); -Line.GetNearestPoint = __webpack_require__(1144); -Line.GetNormal = __webpack_require__(1145); -Line.GetPoint = __webpack_require__(283); -Line.GetPoints = __webpack_require__(160); -Line.GetShortestDistance = __webpack_require__(1146); -Line.Height = __webpack_require__(1147); +Line.BresenhamPoints = __webpack_require__(297); +Line.CenterOn = __webpack_require__(1141); +Line.Clone = __webpack_require__(1142); +Line.CopyFrom = __webpack_require__(1143); +Line.Equals = __webpack_require__(1144); +Line.Extend = __webpack_require__(1145); +Line.GetEasedPoints = __webpack_require__(1146); +Line.GetMidPoint = __webpack_require__(1147); +Line.GetNearestPoint = __webpack_require__(1148); +Line.GetNormal = __webpack_require__(1149); +Line.GetPoint = __webpack_require__(284); +Line.GetPoints = __webpack_require__(162); +Line.GetShortestDistance = __webpack_require__(1150); +Line.Height = __webpack_require__(1151); Line.Length = __webpack_require__(58); -Line.NormalAngle = __webpack_require__(461); -Line.NormalX = __webpack_require__(1148); -Line.NormalY = __webpack_require__(1149); -Line.Offset = __webpack_require__(1150); -Line.PerpSlope = __webpack_require__(1151); -Line.Random = __webpack_require__(161); -Line.ReflectAngle = __webpack_require__(1152); -Line.Rotate = __webpack_require__(1153); -Line.RotateAroundPoint = __webpack_require__(1154); -Line.RotateAroundXY = __webpack_require__(220); -Line.SetToAngle = __webpack_require__(1155); -Line.Slope = __webpack_require__(1156); -Line.Width = __webpack_require__(1157); +Line.NormalAngle = __webpack_require__(462); +Line.NormalX = __webpack_require__(1152); +Line.NormalY = __webpack_require__(1153); +Line.Offset = __webpack_require__(1154); +Line.PerpSlope = __webpack_require__(1155); +Line.Random = __webpack_require__(163); +Line.ReflectAngle = __webpack_require__(1156); +Line.Rotate = __webpack_require__(1157); +Line.RotateAroundPoint = __webpack_require__(1158); +Line.RotateAroundXY = __webpack_require__(222); +Line.SetToAngle = __webpack_require__(1159); +Line.Slope = __webpack_require__(1160); +Line.Width = __webpack_require__(1161); module.exports = Line; /***/ }), -/* 1137 */ +/* 1141 */ /***/ (function(module, exports) { /** @@ -160386,7 +160746,7 @@ module.exports = CenterOn; /***/ }), -/* 1138 */ +/* 1142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160416,7 +160776,7 @@ module.exports = Clone; /***/ }), -/* 1139 */ +/* 1143 */ /***/ (function(module, exports) { /** @@ -160447,7 +160807,7 @@ module.exports = CopyFrom; /***/ }), -/* 1140 */ +/* 1144 */ /***/ (function(module, exports) { /** @@ -160481,7 +160841,7 @@ module.exports = Equals; /***/ }), -/* 1141 */ +/* 1145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160539,7 +160899,7 @@ module.exports = Extend; /***/ }), -/* 1142 */ +/* 1146 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160548,7 +160908,7 @@ module.exports = Extend; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DistanceBetweenPoints = __webpack_require__(332); +var DistanceBetweenPoints = __webpack_require__(333); var GetEaseFunction = __webpack_require__(71); var Point = __webpack_require__(4); @@ -160659,7 +161019,7 @@ module.exports = GetEasedPoints; /***/ }), -/* 1143 */ +/* 1147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160697,7 +161057,7 @@ module.exports = GetMidPoint; /***/ }), -/* 1144 */ +/* 1148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160752,7 +161112,7 @@ module.exports = GetNearestPoint; /***/ }), -/* 1145 */ +/* 1149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160796,7 +161156,7 @@ module.exports = GetNormal; /***/ }), -/* 1146 */ +/* 1150 */ /***/ (function(module, exports) { /** @@ -160843,7 +161203,7 @@ module.exports = GetShortestDistance; /***/ }), -/* 1147 */ +/* 1151 */ /***/ (function(module, exports) { /** @@ -160871,7 +161231,7 @@ module.exports = Height; /***/ }), -/* 1148 */ +/* 1152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160902,7 +161262,7 @@ module.exports = NormalX; /***/ }), -/* 1149 */ +/* 1153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160934,7 +161294,7 @@ module.exports = NormalY; /***/ }), -/* 1150 */ +/* 1154 */ /***/ (function(module, exports) { /** @@ -160972,7 +161332,7 @@ module.exports = Offset; /***/ }), -/* 1151 */ +/* 1155 */ /***/ (function(module, exports) { /** @@ -161000,7 +161360,7 @@ module.exports = PerpSlope; /***/ }), -/* 1152 */ +/* 1156 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161010,7 +161370,7 @@ module.exports = PerpSlope; */ var Angle = __webpack_require__(87); -var NormalAngle = __webpack_require__(461); +var NormalAngle = __webpack_require__(462); /** * Calculate the reflected angle between two lines. @@ -161034,7 +161394,7 @@ module.exports = ReflectAngle; /***/ }), -/* 1153 */ +/* 1157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161043,7 +161403,7 @@ module.exports = ReflectAngle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(220); +var RotateAroundXY = __webpack_require__(222); /** * Rotate a line around its midpoint by the given angle in radians. @@ -161070,7 +161430,7 @@ module.exports = Rotate; /***/ }), -/* 1154 */ +/* 1158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161079,7 +161439,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(220); +var RotateAroundXY = __webpack_require__(222); /** * Rotate a line around a point by the given angle in radians. @@ -161104,7 +161464,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1155 */ +/* 1159 */ /***/ (function(module, exports) { /** @@ -161144,7 +161504,7 @@ module.exports = SetToAngle; /***/ }), -/* 1156 */ +/* 1160 */ /***/ (function(module, exports) { /** @@ -161172,7 +161532,7 @@ module.exports = Slope; /***/ }), -/* 1157 */ +/* 1161 */ /***/ (function(module, exports) { /** @@ -161200,7 +161560,7 @@ module.exports = Width; /***/ }), -/* 1158 */ +/* 1162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161211,27 +161571,27 @@ module.exports = Width; var Point = __webpack_require__(4); -Point.Ceil = __webpack_require__(1159); -Point.Clone = __webpack_require__(1160); -Point.CopyFrom = __webpack_require__(1161); -Point.Equals = __webpack_require__(1162); -Point.Floor = __webpack_require__(1163); -Point.GetCentroid = __webpack_require__(1164); -Point.GetMagnitude = __webpack_require__(462); -Point.GetMagnitudeSq = __webpack_require__(463); -Point.GetRectangleFromPoints = __webpack_require__(1165); -Point.Interpolate = __webpack_require__(1166); -Point.Invert = __webpack_require__(1167); -Point.Negative = __webpack_require__(1168); -Point.Project = __webpack_require__(1169); -Point.ProjectUnit = __webpack_require__(1170); -Point.SetMagnitude = __webpack_require__(1171); +Point.Ceil = __webpack_require__(1163); +Point.Clone = __webpack_require__(1164); +Point.CopyFrom = __webpack_require__(1165); +Point.Equals = __webpack_require__(1166); +Point.Floor = __webpack_require__(1167); +Point.GetCentroid = __webpack_require__(1168); +Point.GetMagnitude = __webpack_require__(463); +Point.GetMagnitudeSq = __webpack_require__(464); +Point.GetRectangleFromPoints = __webpack_require__(1169); +Point.Interpolate = __webpack_require__(1170); +Point.Invert = __webpack_require__(1171); +Point.Negative = __webpack_require__(1172); +Point.Project = __webpack_require__(1173); +Point.ProjectUnit = __webpack_require__(1174); +Point.SetMagnitude = __webpack_require__(1175); module.exports = Point; /***/ }), -/* 1159 */ +/* 1163 */ /***/ (function(module, exports) { /** @@ -161261,7 +161621,7 @@ module.exports = Ceil; /***/ }), -/* 1160 */ +/* 1164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161291,7 +161651,7 @@ module.exports = Clone; /***/ }), -/* 1161 */ +/* 1165 */ /***/ (function(module, exports) { /** @@ -161322,7 +161682,7 @@ module.exports = CopyFrom; /***/ }), -/* 1162 */ +/* 1166 */ /***/ (function(module, exports) { /** @@ -161351,7 +161711,7 @@ module.exports = Equals; /***/ }), -/* 1163 */ +/* 1167 */ /***/ (function(module, exports) { /** @@ -161381,7 +161741,7 @@ module.exports = Floor; /***/ }), -/* 1164 */ +/* 1168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161445,7 +161805,7 @@ module.exports = GetCentroid; /***/ }), -/* 1165 */ +/* 1169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161515,7 +161875,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1166 */ +/* 1170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161556,7 +161916,7 @@ module.exports = Interpolate; /***/ }), -/* 1167 */ +/* 1171 */ /***/ (function(module, exports) { /** @@ -161586,7 +161946,7 @@ module.exports = Invert; /***/ }), -/* 1168 */ +/* 1172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161621,7 +161981,7 @@ module.exports = Negative; /***/ }), -/* 1169 */ +/* 1173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161631,7 +161991,7 @@ module.exports = Negative; */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(463); +var GetMagnitudeSq = __webpack_require__(464); /** * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the @@ -161668,7 +162028,7 @@ module.exports = Project; /***/ }), -/* 1170 */ +/* 1174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161713,7 +162073,7 @@ module.exports = ProjectUnit; /***/ }), -/* 1171 */ +/* 1175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161722,7 +162082,7 @@ module.exports = ProjectUnit; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(462); +var GetMagnitude = __webpack_require__(463); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -161757,7 +162117,7 @@ module.exports = SetMagnitude; /***/ }), -/* 1172 */ +/* 1176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161766,26 +162126,26 @@ module.exports = SetMagnitude; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(210); +var Polygon = __webpack_require__(212); -Polygon.Clone = __webpack_require__(1173); -Polygon.Contains = __webpack_require__(211); -Polygon.ContainsPoint = __webpack_require__(1174); +Polygon.Clone = __webpack_require__(1177); +Polygon.Contains = __webpack_require__(213); +Polygon.ContainsPoint = __webpack_require__(1178); Polygon.Earcut = __webpack_require__(60); -Polygon.GetAABB = __webpack_require__(435); -Polygon.GetNumberArray = __webpack_require__(1175); -Polygon.GetPoints = __webpack_require__(436); -Polygon.Perimeter = __webpack_require__(437); -Polygon.Reverse = __webpack_require__(1176); -Polygon.Simplify = __webpack_require__(1177); -Polygon.Smooth = __webpack_require__(438); -Polygon.Translate = __webpack_require__(1178); +Polygon.GetAABB = __webpack_require__(436); +Polygon.GetNumberArray = __webpack_require__(1179); +Polygon.GetPoints = __webpack_require__(437); +Polygon.Perimeter = __webpack_require__(438); +Polygon.Reverse = __webpack_require__(1180); +Polygon.Simplify = __webpack_require__(1181); +Polygon.Smooth = __webpack_require__(439); +Polygon.Translate = __webpack_require__(1182); module.exports = Polygon; /***/ }), -/* 1173 */ +/* 1177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161794,7 +162154,7 @@ module.exports = Polygon; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(210); +var Polygon = __webpack_require__(212); /** * Create a new polygon which is a copy of the specified polygon @@ -161815,7 +162175,7 @@ module.exports = Clone; /***/ }), -/* 1174 */ +/* 1178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161824,7 +162184,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(211); +var Contains = __webpack_require__(213); /** * Checks the given Point again the Polygon to see if the Point lays within its vertices. @@ -161846,7 +162206,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1175 */ +/* 1179 */ /***/ (function(module, exports) { /** @@ -161889,7 +162249,7 @@ module.exports = GetNumberArray; /***/ }), -/* 1176 */ +/* 1180 */ /***/ (function(module, exports) { /** @@ -161921,7 +162281,7 @@ module.exports = Reverse; /***/ }), -/* 1177 */ +/* 1181 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -162131,7 +162491,7 @@ module.exports = Simplify; /***/ }), -/* 1178 */ +/* 1182 */ /***/ (function(module, exports) { /** @@ -162171,7 +162531,7 @@ module.exports = Translate; /***/ }), -/* 1179 */ +/* 1183 */ /***/ (function(module, exports) { /** @@ -162199,7 +162559,7 @@ module.exports = Area; /***/ }), -/* 1180 */ +/* 1184 */ /***/ (function(module, exports) { /** @@ -162232,7 +162592,7 @@ module.exports = Ceil; /***/ }), -/* 1181 */ +/* 1185 */ /***/ (function(module, exports) { /** @@ -162267,7 +162627,7 @@ module.exports = CeilAll; /***/ }), -/* 1182 */ +/* 1186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162297,7 +162657,7 @@ module.exports = Clone; /***/ }), -/* 1183 */ +/* 1187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162328,7 +162688,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1184 */ +/* 1188 */ /***/ (function(module, exports) { /** @@ -162359,7 +162719,7 @@ module.exports = CopyFrom; /***/ }), -/* 1185 */ +/* 1189 */ /***/ (function(module, exports) { /** @@ -162393,7 +162753,7 @@ module.exports = Equals; /***/ }), -/* 1186 */ +/* 1190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162402,7 +162762,7 @@ module.exports = Equals; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(221); +var GetAspectRatio = __webpack_require__(223); /** * Adjusts the target rectangle, changing its width, height and position, @@ -162446,7 +162806,7 @@ module.exports = FitInside; /***/ }), -/* 1187 */ +/* 1191 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162455,7 +162815,7 @@ module.exports = FitInside; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(221); +var GetAspectRatio = __webpack_require__(223); /** * Adjusts the target rectangle, changing its width, height and position, @@ -162499,7 +162859,7 @@ module.exports = FitOutside; /***/ }), -/* 1188 */ +/* 1192 */ /***/ (function(module, exports) { /** @@ -162532,7 +162892,7 @@ module.exports = Floor; /***/ }), -/* 1189 */ +/* 1193 */ /***/ (function(module, exports) { /** @@ -162567,7 +162927,7 @@ module.exports = FloorAll; /***/ }), -/* 1190 */ +/* 1194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162610,7 +162970,7 @@ module.exports = FromXY; /***/ }), -/* 1191 */ +/* 1195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162648,7 +163008,7 @@ module.exports = GetCenter; /***/ }), -/* 1192 */ +/* 1196 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162688,7 +163048,7 @@ module.exports = GetSize; /***/ }), -/* 1193 */ +/* 1197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162697,7 +163057,7 @@ module.exports = GetSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(176); +var CenterOn = __webpack_require__(178); /** @@ -162730,7 +163090,7 @@ module.exports = Inflate; /***/ }), -/* 1194 */ +/* 1198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162740,7 +163100,7 @@ module.exports = Inflate; */ var Rectangle = __webpack_require__(9); -var Intersects = __webpack_require__(142); +var Intersects = __webpack_require__(143); /** * Takes two Rectangles and first checks to see if they intersect. @@ -162781,7 +163141,7 @@ module.exports = Intersection; /***/ }), -/* 1195 */ +/* 1199 */ /***/ (function(module, exports) { /** @@ -162830,7 +163190,7 @@ module.exports = MergePoints; /***/ }), -/* 1196 */ +/* 1200 */ /***/ (function(module, exports) { /** @@ -162877,7 +163237,7 @@ module.exports = MergeRect; /***/ }), -/* 1197 */ +/* 1201 */ /***/ (function(module, exports) { /** @@ -162921,7 +163281,7 @@ module.exports = MergeXY; /***/ }), -/* 1198 */ +/* 1202 */ /***/ (function(module, exports) { /** @@ -162956,7 +163316,7 @@ module.exports = Offset; /***/ }), -/* 1199 */ +/* 1203 */ /***/ (function(module, exports) { /** @@ -162990,7 +163350,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1200 */ +/* 1204 */ /***/ (function(module, exports) { /** @@ -163024,7 +163384,7 @@ module.exports = Overlaps; /***/ }), -/* 1201 */ +/* 1205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163081,7 +163441,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 1202 */ +/* 1206 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163090,8 +163450,8 @@ module.exports = PerimeterPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(180); -var ContainsRect = __webpack_require__(465); +var Between = __webpack_require__(182); +var ContainsRect = __webpack_require__(466); var Point = __webpack_require__(4); /** @@ -163152,7 +163512,7 @@ module.exports = RandomOutside; /***/ }), -/* 1203 */ +/* 1207 */ /***/ (function(module, exports) { /** @@ -163181,7 +163541,7 @@ module.exports = SameDimensions; /***/ }), -/* 1204 */ +/* 1208 */ /***/ (function(module, exports) { /** @@ -163220,7 +163580,7 @@ module.exports = Scale; /***/ }), -/* 1205 */ +/* 1209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163231,36 +163591,36 @@ module.exports = Scale; var Triangle = __webpack_require__(73); -Triangle.Area = __webpack_require__(1206); -Triangle.BuildEquilateral = __webpack_require__(1207); -Triangle.BuildFromPolygon = __webpack_require__(1208); -Triangle.BuildRight = __webpack_require__(1209); -Triangle.CenterOn = __webpack_require__(1210); -Triangle.Centroid = __webpack_require__(466); -Triangle.CircumCenter = __webpack_require__(1211); -Triangle.CircumCircle = __webpack_require__(1212); -Triangle.Clone = __webpack_require__(1213); +Triangle.Area = __webpack_require__(1210); +Triangle.BuildEquilateral = __webpack_require__(1211); +Triangle.BuildFromPolygon = __webpack_require__(1212); +Triangle.BuildRight = __webpack_require__(1213); +Triangle.CenterOn = __webpack_require__(1214); +Triangle.Centroid = __webpack_require__(467); +Triangle.CircumCenter = __webpack_require__(1215); +Triangle.CircumCircle = __webpack_require__(1216); +Triangle.Clone = __webpack_require__(1217); Triangle.Contains = __webpack_require__(85); -Triangle.ContainsArray = __webpack_require__(219); -Triangle.ContainsPoint = __webpack_require__(1214); -Triangle.CopyFrom = __webpack_require__(1215); -Triangle.Decompose = __webpack_require__(459); -Triangle.Equals = __webpack_require__(1216); -Triangle.GetPoint = __webpack_require__(442); -Triangle.GetPoints = __webpack_require__(443); -Triangle.InCenter = __webpack_require__(468); -Triangle.Perimeter = __webpack_require__(1217); -Triangle.Offset = __webpack_require__(467); -Triangle.Random = __webpack_require__(166); -Triangle.Rotate = __webpack_require__(1218); -Triangle.RotateAroundPoint = __webpack_require__(1219); -Triangle.RotateAroundXY = __webpack_require__(222); +Triangle.ContainsArray = __webpack_require__(221); +Triangle.ContainsPoint = __webpack_require__(1218); +Triangle.CopyFrom = __webpack_require__(1219); +Triangle.Decompose = __webpack_require__(460); +Triangle.Equals = __webpack_require__(1220); +Triangle.GetPoint = __webpack_require__(443); +Triangle.GetPoints = __webpack_require__(444); +Triangle.InCenter = __webpack_require__(469); +Triangle.Perimeter = __webpack_require__(1221); +Triangle.Offset = __webpack_require__(468); +Triangle.Random = __webpack_require__(168); +Triangle.Rotate = __webpack_require__(1222); +Triangle.RotateAroundPoint = __webpack_require__(1223); +Triangle.RotateAroundXY = __webpack_require__(224); module.exports = Triangle; /***/ }), -/* 1206 */ +/* 1210 */ /***/ (function(module, exports) { /** @@ -163299,7 +163659,7 @@ module.exports = Area; /***/ }), -/* 1207 */ +/* 1211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163343,7 +163703,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 1208 */ +/* 1212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163419,7 +163779,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1209 */ +/* 1213 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163468,7 +163828,7 @@ module.exports = BuildRight; /***/ }), -/* 1210 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163477,8 +163837,8 @@ module.exports = BuildRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(466); -var Offset = __webpack_require__(467); +var Centroid = __webpack_require__(467); +var Offset = __webpack_require__(468); /** * @callback CenterFunction @@ -163521,7 +163881,7 @@ module.exports = CenterOn; /***/ }), -/* 1211 */ +/* 1215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163597,7 +163957,7 @@ module.exports = CircumCenter; /***/ }), -/* 1212 */ +/* 1216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163680,7 +164040,7 @@ module.exports = CircumCircle; /***/ }), -/* 1213 */ +/* 1217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163710,7 +164070,7 @@ module.exports = Clone; /***/ }), -/* 1214 */ +/* 1218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163741,7 +164101,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1215 */ +/* 1219 */ /***/ (function(module, exports) { /** @@ -163772,7 +164132,7 @@ module.exports = CopyFrom; /***/ }), -/* 1216 */ +/* 1220 */ /***/ (function(module, exports) { /** @@ -163808,7 +164168,7 @@ module.exports = Equals; /***/ }), -/* 1217 */ +/* 1221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163843,7 +164203,7 @@ module.exports = Perimeter; /***/ }), -/* 1218 */ +/* 1222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163852,8 +164212,8 @@ module.exports = Perimeter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(222); -var InCenter = __webpack_require__(468); +var RotateAroundXY = __webpack_require__(224); +var InCenter = __webpack_require__(469); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -163879,7 +164239,7 @@ module.exports = Rotate; /***/ }), -/* 1219 */ +/* 1223 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163888,7 +164248,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(222); +var RotateAroundXY = __webpack_require__(224); /** * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties. @@ -163913,7 +164273,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1220 */ +/* 1224 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163922,7 +164282,7 @@ module.exports = RotateAroundPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(187); +var CONST = __webpack_require__(189); var Extend = __webpack_require__(19); /** @@ -163931,17 +164291,17 @@ var Extend = __webpack_require__(19); var Input = { - CreatePixelPerfectHandler: __webpack_require__(469), - CreateInteractiveObject: __webpack_require__(470), + CreatePixelPerfectHandler: __webpack_require__(470), + CreateInteractiveObject: __webpack_require__(471), Events: __webpack_require__(56), - Gamepad: __webpack_require__(1221), - InputManager: __webpack_require__(375), - InputPlugin: __webpack_require__(1233), - InputPluginCache: __webpack_require__(143), - Keyboard: __webpack_require__(1234), - Mouse: __webpack_require__(1251), - Pointer: __webpack_require__(378), - Touch: __webpack_require__(1252) + Gamepad: __webpack_require__(1225), + InputManager: __webpack_require__(376), + InputPlugin: __webpack_require__(1237), + InputPluginCache: __webpack_require__(144), + Keyboard: __webpack_require__(1238), + Mouse: __webpack_require__(1255), + Pointer: __webpack_require__(379), + Touch: __webpack_require__(1256) }; @@ -163952,7 +164312,7 @@ module.exports = Input; /***/ }), -/* 1221 */ +/* 1225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163967,18 +164327,18 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(471), - Button: __webpack_require__(472), - Events: __webpack_require__(223), - Gamepad: __webpack_require__(473), - GamepadPlugin: __webpack_require__(1228), + Axis: __webpack_require__(472), + Button: __webpack_require__(473), + Events: __webpack_require__(225), + Gamepad: __webpack_require__(474), + GamepadPlugin: __webpack_require__(1232), - Configs: __webpack_require__(1229) + Configs: __webpack_require__(1233) }; /***/ }), -/* 1222 */ +/* 1226 */ /***/ (function(module, exports) { /** @@ -164007,7 +164367,7 @@ module.exports = 'down'; /***/ }), -/* 1223 */ +/* 1227 */ /***/ (function(module, exports) { /** @@ -164036,7 +164396,7 @@ module.exports = 'up'; /***/ }), -/* 1224 */ +/* 1228 */ /***/ (function(module, exports) { /** @@ -164067,7 +164427,7 @@ module.exports = 'connected'; /***/ }), -/* 1225 */ +/* 1229 */ /***/ (function(module, exports) { /** @@ -164093,7 +164453,7 @@ module.exports = 'disconnected'; /***/ }), -/* 1226 */ +/* 1230 */ /***/ (function(module, exports) { /** @@ -164125,7 +164485,7 @@ module.exports = 'down'; /***/ }), -/* 1227 */ +/* 1231 */ /***/ (function(module, exports) { /** @@ -164157,7 +164517,7 @@ module.exports = 'up'; /***/ }), -/* 1228 */ +/* 1232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164168,10 +164528,10 @@ module.exports = 'up'; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(223); -var Gamepad = __webpack_require__(473); +var Events = __webpack_require__(225); +var Gamepad = __webpack_require__(474); var GetValue = __webpack_require__(6); -var InputPluginCache = __webpack_require__(143); +var InputPluginCache = __webpack_require__(144); var InputEvents = __webpack_require__(56); /** @@ -164795,7 +165155,7 @@ module.exports = GamepadPlugin; /***/ }), -/* 1229 */ +/* 1233 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164810,15 +165170,15 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1230), - SNES_USB: __webpack_require__(1231), - XBOX_360: __webpack_require__(1232) + DUALSHOCK_4: __webpack_require__(1234), + SNES_USB: __webpack_require__(1235), + XBOX_360: __webpack_require__(1236) }; /***/ }), -/* 1230 */ +/* 1234 */ /***/ (function(module, exports) { /** @@ -164868,7 +165228,7 @@ module.exports = { /***/ }), -/* 1231 */ +/* 1235 */ /***/ (function(module, exports) { /** @@ -164907,7 +165267,7 @@ module.exports = { /***/ }), -/* 1232 */ +/* 1236 */ /***/ (function(module, exports) { /** @@ -164958,7 +165318,7 @@ module.exports = { /***/ }), -/* 1233 */ +/* 1237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164970,17 +165330,17 @@ module.exports = { var Circle = __webpack_require__(68); var CircleContains = __webpack_require__(57); var Class = __webpack_require__(0); -var CONST = __webpack_require__(187); -var CreateInteractiveObject = __webpack_require__(470); -var CreatePixelPerfectHandler = __webpack_require__(469); +var CONST = __webpack_require__(189); +var CreateInteractiveObject = __webpack_require__(471); +var CreatePixelPerfectHandler = __webpack_require__(470); var DistanceBetween = __webpack_require__(55); -var Ellipse = __webpack_require__(97); -var EllipseContains = __webpack_require__(98); +var Ellipse = __webpack_require__(98); +var EllipseContains = __webpack_require__(99); var Events = __webpack_require__(56); var EventEmitter = __webpack_require__(12); var GetFastValue = __webpack_require__(2); var GEOM_CONST = __webpack_require__(49); -var InputPluginCache = __webpack_require__(143); +var InputPluginCache = __webpack_require__(144); var IsPlainObject = __webpack_require__(7); var PluginCache = __webpack_require__(23); var Rectangle = __webpack_require__(9); @@ -168139,7 +168499,7 @@ module.exports = InputPlugin; /***/ }), -/* 1234 */ +/* 1238 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168154,26 +168514,26 @@ module.exports = InputPlugin; module.exports = { - Events: __webpack_require__(144), + Events: __webpack_require__(145), - KeyboardManager: __webpack_require__(376), - KeyboardPlugin: __webpack_require__(1242), + KeyboardManager: __webpack_require__(377), + KeyboardPlugin: __webpack_require__(1246), - Key: __webpack_require__(474), - KeyCodes: __webpack_require__(131), + Key: __webpack_require__(475), + KeyCodes: __webpack_require__(132), - KeyCombo: __webpack_require__(475), + KeyCombo: __webpack_require__(476), - JustDown: __webpack_require__(1247), - JustUp: __webpack_require__(1248), - DownDuration: __webpack_require__(1249), - UpDuration: __webpack_require__(1250) + JustDown: __webpack_require__(1251), + JustUp: __webpack_require__(1252), + DownDuration: __webpack_require__(1253), + UpDuration: __webpack_require__(1254) }; /***/ }), -/* 1235 */ +/* 1239 */ /***/ (function(module, exports) { /** @@ -168209,7 +168569,7 @@ module.exports = 'keydown'; /***/ }), -/* 1236 */ +/* 1240 */ /***/ (function(module, exports) { /** @@ -168238,7 +168598,7 @@ module.exports = 'keyup'; /***/ }), -/* 1237 */ +/* 1241 */ /***/ (function(module, exports) { /** @@ -168272,7 +168632,7 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1238 */ +/* 1242 */ /***/ (function(module, exports) { /** @@ -168306,7 +168666,7 @@ module.exports = 'down'; /***/ }), -/* 1239 */ +/* 1243 */ /***/ (function(module, exports) { /** @@ -168345,7 +168705,7 @@ module.exports = 'keydown-'; /***/ }), -/* 1240 */ +/* 1244 */ /***/ (function(module, exports) { /** @@ -168377,7 +168737,7 @@ module.exports = 'keyup-'; /***/ }), -/* 1241 */ +/* 1245 */ /***/ (function(module, exports) { /** @@ -168411,7 +168771,7 @@ module.exports = 'up'; /***/ }), -/* 1242 */ +/* 1246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168422,17 +168782,17 @@ module.exports = 'up'; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(144); +var Events = __webpack_require__(145); var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(6); var InputEvents = __webpack_require__(56); -var InputPluginCache = __webpack_require__(143); -var Key = __webpack_require__(474); -var KeyCodes = __webpack_require__(131); -var KeyCombo = __webpack_require__(475); -var KeyMap = __webpack_require__(1246); +var InputPluginCache = __webpack_require__(144); +var Key = __webpack_require__(475); +var KeyCodes = __webpack_require__(132); +var KeyCombo = __webpack_require__(476); +var KeyMap = __webpack_require__(1250); var SceneEvents = __webpack_require__(20); -var SnapFloor = __webpack_require__(94); +var SnapFloor = __webpack_require__(95); /** * @classdesc @@ -169346,7 +169706,7 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1243 */ +/* 1247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169355,7 +169715,7 @@ module.exports = KeyboardPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1244); +var AdvanceKeyCombo = __webpack_require__(1248); /** * Used internally by the KeyCombo class. @@ -169427,7 +169787,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1244 */ +/* 1248 */ /***/ (function(module, exports) { /** @@ -169469,7 +169829,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1245 */ +/* 1249 */ /***/ (function(module, exports) { /** @@ -169504,7 +169864,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1246 */ +/* 1250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169513,7 +169873,7 @@ module.exports = ResetKeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(131); +var KeyCodes = __webpack_require__(132); var KeyMap = {}; @@ -169526,7 +169886,7 @@ module.exports = KeyMap; /***/ }), -/* 1247 */ +/* 1251 */ /***/ (function(module, exports) { /** @@ -169568,7 +169928,7 @@ module.exports = JustDown; /***/ }), -/* 1248 */ +/* 1252 */ /***/ (function(module, exports) { /** @@ -169610,7 +169970,7 @@ module.exports = JustUp; /***/ }), -/* 1249 */ +/* 1253 */ /***/ (function(module, exports) { /** @@ -169644,7 +170004,7 @@ module.exports = DownDuration; /***/ }), -/* 1250 */ +/* 1254 */ /***/ (function(module, exports) { /** @@ -169678,7 +170038,7 @@ module.exports = UpDuration; /***/ }), -/* 1251 */ +/* 1255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169694,14 +170054,14 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(377) + MouseManager: __webpack_require__(378) }; /* eslint-enable */ /***/ }), -/* 1252 */ +/* 1256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169717,14 +170077,14 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(379) + TouchManager: __webpack_require__(380) }; /* eslint-enable */ /***/ }), -/* 1253 */ +/* 1257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169744,16 +170104,16 @@ var Loader = { Events: __webpack_require__(84), - FileTypes: __webpack_require__(1254), + FileTypes: __webpack_require__(1258), File: __webpack_require__(22), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(145), - LoaderPlugin: __webpack_require__(1278), - MergeXHRSettings: __webpack_require__(224), + GetURL: __webpack_require__(146), + LoaderPlugin: __webpack_require__(1282), + MergeXHRSettings: __webpack_require__(226), MultiFile: __webpack_require__(63), - XHRLoader: __webpack_require__(476), - XHRSettings: __webpack_require__(146) + XHRLoader: __webpack_require__(477), + XHRSettings: __webpack_require__(147) }; @@ -169764,7 +170124,7 @@ module.exports = Loader; /***/ }), -/* 1254 */ +/* 1258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169779,42 +170139,42 @@ module.exports = Loader; module.exports = { - AnimationJSONFile: __webpack_require__(1255), - AtlasJSONFile: __webpack_require__(1256), - AtlasXMLFile: __webpack_require__(1257), - AudioFile: __webpack_require__(477), - AudioSpriteFile: __webpack_require__(1258), - BinaryFile: __webpack_require__(1259), - BitmapFontFile: __webpack_require__(1260), - CSSFile: __webpack_require__(1261), - GLSLFile: __webpack_require__(1262), - HTML5AudioFile: __webpack_require__(478), - HTMLFile: __webpack_require__(1263), - HTMLTextureFile: __webpack_require__(1264), + AnimationJSONFile: __webpack_require__(1259), + AtlasJSONFile: __webpack_require__(1260), + AtlasXMLFile: __webpack_require__(1261), + AudioFile: __webpack_require__(478), + AudioSpriteFile: __webpack_require__(1262), + BinaryFile: __webpack_require__(1263), + BitmapFontFile: __webpack_require__(1264), + CSSFile: __webpack_require__(1265), + GLSLFile: __webpack_require__(1266), + HTML5AudioFile: __webpack_require__(479), + HTMLFile: __webpack_require__(1267), + HTMLTextureFile: __webpack_require__(1268), ImageFile: __webpack_require__(74), JSONFile: __webpack_require__(62), - MultiAtlasFile: __webpack_require__(1265), - MultiScriptFile: __webpack_require__(1266), - PackFile: __webpack_require__(1267), - PluginFile: __webpack_require__(1268), - SceneFile: __webpack_require__(1269), - ScenePluginFile: __webpack_require__(1270), - ScriptFile: __webpack_require__(479), - SpriteSheetFile: __webpack_require__(1271), - SVGFile: __webpack_require__(1272), - TextFile: __webpack_require__(480), - TilemapCSVFile: __webpack_require__(1273), - TilemapImpactFile: __webpack_require__(1274), - TilemapJSONFile: __webpack_require__(1275), - UnityAtlasFile: __webpack_require__(1276), - VideoFile: __webpack_require__(1277), - XMLFile: __webpack_require__(225) + MultiAtlasFile: __webpack_require__(1269), + MultiScriptFile: __webpack_require__(1270), + PackFile: __webpack_require__(1271), + PluginFile: __webpack_require__(1272), + SceneFile: __webpack_require__(1273), + ScenePluginFile: __webpack_require__(1274), + ScriptFile: __webpack_require__(480), + SpriteSheetFile: __webpack_require__(1275), + SVGFile: __webpack_require__(1276), + TextFile: __webpack_require__(481), + TilemapCSVFile: __webpack_require__(1277), + TilemapImpactFile: __webpack_require__(1278), + TilemapJSONFile: __webpack_require__(1279), + UnityAtlasFile: __webpack_require__(1280), + VideoFile: __webpack_require__(1281), + XMLFile: __webpack_require__(227) }; /***/ }), -/* 1255 */ +/* 1259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170015,7 +170375,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1256 */ +/* 1260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170264,7 +170624,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1257 */ +/* 1261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170279,7 +170639,7 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(63); -var XMLFile = __webpack_require__(225); +var XMLFile = __webpack_require__(227); /** * @classdesc @@ -170507,7 +170867,7 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1258 */ +/* 1262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170516,7 +170876,7 @@ module.exports = AtlasXMLFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(477); +var AudioFile = __webpack_require__(478); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -170797,7 +171157,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1259 */ +/* 1263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170979,7 +171339,7 @@ module.exports = BinaryFile; /***/ }), -/* 1260 */ +/* 1264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170994,8 +171354,8 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(63); -var ParseXMLBitmapFont = __webpack_require__(196); -var XMLFile = __webpack_require__(225); +var ParseXMLBitmapFont = __webpack_require__(198); +var XMLFile = __webpack_require__(227); /** * @classdesc @@ -171226,7 +171586,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 1261 */ +/* 1265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171394,7 +171754,7 @@ module.exports = CSSFile; /***/ }), -/* 1262 */ +/* 1266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171409,7 +171769,7 @@ var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var Shader = __webpack_require__(362); +var Shader = __webpack_require__(363); /** * @classdesc @@ -171805,7 +172165,7 @@ module.exports = GLSLFile; /***/ }), -/* 1263 */ +/* 1267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171980,7 +172340,7 @@ module.exports = HTMLFile; /***/ }), -/* 1264 */ +/* 1268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172238,7 +172598,7 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1265 */ +/* 1269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172571,7 +172931,7 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1266 */ +/* 1270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172585,7 +172945,7 @@ var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(63); -var ScriptFile = __webpack_require__(479); +var ScriptFile = __webpack_require__(480); /** * @classdesc @@ -172788,7 +173148,7 @@ module.exports = MultiScriptFile; /***/ }), -/* 1267 */ +/* 1271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173006,7 +173366,7 @@ module.exports = PackFile; /***/ }), -/* 1268 */ +/* 1272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173218,7 +173578,7 @@ module.exports = PluginFile; /***/ }), -/* 1269 */ +/* 1273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173439,7 +173799,7 @@ module.exports = SceneFile; /***/ }), -/* 1270 */ +/* 1274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173645,7 +174005,7 @@ module.exports = ScenePluginFile; /***/ }), -/* 1271 */ +/* 1275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173836,7 +174196,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1272 */ +/* 1276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174175,7 +174535,7 @@ module.exports = SVGFile; /***/ }), -/* 1273 */ +/* 1277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174370,7 +174730,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1274 */ +/* 1278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174526,7 +174886,7 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1275 */ +/* 1279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174682,7 +175042,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1276 */ +/* 1280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174697,7 +175057,7 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(63); -var TextFile = __webpack_require__(480); +var TextFile = __webpack_require__(481); /** * @classdesc @@ -174924,7 +175284,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1277 */ +/* 1281 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174937,7 +175297,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(145); +var GetURL = __webpack_require__(146); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -175318,7 +175678,7 @@ module.exports = VideoFile; /***/ }), -/* 1278 */ +/* 1282 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175329,14 +175689,14 @@ module.exports = VideoFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var CustomSet = __webpack_require__(140); +var CustomSet = __webpack_require__(141); var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(84); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); -var XHRSettings = __webpack_require__(146); +var XHRSettings = __webpack_require__(147); /** * @classdesc @@ -176401,7 +176761,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 1279 */ +/* 1283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176419,23 +176779,23 @@ var Extend = __webpack_require__(19); var Arcade = { - ArcadePhysics: __webpack_require__(1280), - Body: __webpack_require__(487), - Collider: __webpack_require__(488), - Components: __webpack_require__(226), - Events: __webpack_require__(228), - Factory: __webpack_require__(481), - GetOverlapX: __webpack_require__(229), - GetOverlapY: __webpack_require__(230), - SeparateX: __webpack_require__(496), - SeparateY: __webpack_require__(497), - Group: __webpack_require__(484), - Image: __webpack_require__(482), - Sprite: __webpack_require__(147), - StaticBody: __webpack_require__(498), - StaticGroup: __webpack_require__(485), - Tilemap: __webpack_require__(1301), - World: __webpack_require__(486) + ArcadePhysics: __webpack_require__(1284), + Body: __webpack_require__(488), + Collider: __webpack_require__(489), + Components: __webpack_require__(228), + Events: __webpack_require__(230), + Factory: __webpack_require__(482), + GetOverlapX: __webpack_require__(231), + GetOverlapY: __webpack_require__(232), + SeparateX: __webpack_require__(497), + SeparateY: __webpack_require__(498), + Group: __webpack_require__(485), + Image: __webpack_require__(483), + Sprite: __webpack_require__(148), + StaticBody: __webpack_require__(499), + StaticGroup: __webpack_require__(486), + Tilemap: __webpack_require__(1305), + World: __webpack_require__(487) }; @@ -176446,7 +176806,7 @@ module.exports = Arcade; /***/ }), -/* 1280 */ +/* 1284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176458,16 +176818,16 @@ module.exports = Arcade; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(41); var DistanceBetween = __webpack_require__(55); -var DistanceSquared = __webpack_require__(333); -var Factory = __webpack_require__(481); +var DistanceSquared = __webpack_require__(334); +var Factory = __webpack_require__(482); var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(133); -var OverlapCirc = __webpack_require__(483); -var OverlapRect = __webpack_require__(227); +var Merge = __webpack_require__(134); +var OverlapCirc = __webpack_require__(484); +var OverlapRect = __webpack_require__(229); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(486); +var World = __webpack_require__(487); /** * @classdesc @@ -177171,7 +177531,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 1281 */ +/* 1285 */ /***/ (function(module, exports) { /** @@ -177246,7 +177606,7 @@ module.exports = Acceleration; /***/ }), -/* 1282 */ +/* 1286 */ /***/ (function(module, exports) { /** @@ -177328,7 +177688,7 @@ module.exports = Angular; /***/ }), -/* 1283 */ +/* 1287 */ /***/ (function(module, exports) { /** @@ -177427,7 +177787,7 @@ module.exports = Bounce; /***/ }), -/* 1284 */ +/* 1288 */ /***/ (function(module, exports) { /** @@ -177554,7 +177914,7 @@ module.exports = Debug; /***/ }), -/* 1285 */ +/* 1289 */ /***/ (function(module, exports) { /** @@ -177687,7 +178047,7 @@ module.exports = Drag; /***/ }), -/* 1286 */ +/* 1290 */ /***/ (function(module, exports) { /** @@ -177811,7 +178171,7 @@ module.exports = Enable; /***/ }), -/* 1287 */ +/* 1291 */ /***/ (function(module, exports) { /** @@ -177899,7 +178259,7 @@ module.exports = Friction; /***/ }), -/* 1288 */ +/* 1292 */ /***/ (function(module, exports) { /** @@ -177977,7 +178337,7 @@ module.exports = Gravity; /***/ }), -/* 1289 */ +/* 1293 */ /***/ (function(module, exports) { /** @@ -178019,7 +178379,7 @@ module.exports = Immovable; /***/ }), -/* 1290 */ +/* 1294 */ /***/ (function(module, exports) { /** @@ -178059,7 +178419,7 @@ module.exports = Mass; /***/ }), -/* 1291 */ +/* 1295 */ /***/ (function(module, exports) { /** @@ -178162,7 +178522,7 @@ module.exports = Size; /***/ }), -/* 1292 */ +/* 1296 */ /***/ (function(module, exports) { /** @@ -178261,7 +178621,7 @@ module.exports = Velocity; /***/ }), -/* 1293 */ +/* 1297 */ /***/ (function(module, exports) { /** @@ -178294,7 +178654,7 @@ module.exports = 'collide'; /***/ }), -/* 1294 */ +/* 1298 */ /***/ (function(module, exports) { /** @@ -178327,7 +178687,7 @@ module.exports = 'overlap'; /***/ }), -/* 1295 */ +/* 1299 */ /***/ (function(module, exports) { /** @@ -178350,7 +178710,7 @@ module.exports = 'pause'; /***/ }), -/* 1296 */ +/* 1300 */ /***/ (function(module, exports) { /** @@ -178373,7 +178733,7 @@ module.exports = 'resume'; /***/ }), -/* 1297 */ +/* 1301 */ /***/ (function(module, exports) { /** @@ -178405,7 +178765,7 @@ module.exports = 'tilecollide'; /***/ }), -/* 1298 */ +/* 1302 */ /***/ (function(module, exports) { /** @@ -178437,7 +178797,7 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1299 */ +/* 1303 */ /***/ (function(module, exports) { /** @@ -178469,7 +178829,7 @@ module.exports = 'worldbounds'; /***/ }), -/* 1300 */ +/* 1304 */ /***/ (function(module, exports) { /** @@ -178495,7 +178855,7 @@ module.exports = 'worldstep'; /***/ }), -/* 1301 */ +/* 1305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178510,13 +178870,13 @@ module.exports = 'worldstep'; var Tilemap = { - ProcessTileCallbacks: __webpack_require__(489), - ProcessTileSeparationX: __webpack_require__(493), - ProcessTileSeparationY: __webpack_require__(495), - SeparateTile: __webpack_require__(491), - TileCheckX: __webpack_require__(492), - TileCheckY: __webpack_require__(494), - TileIntersectsBody: __webpack_require__(231) + ProcessTileCallbacks: __webpack_require__(490), + ProcessTileSeparationX: __webpack_require__(494), + ProcessTileSeparationY: __webpack_require__(496), + SeparateTile: __webpack_require__(492), + TileCheckX: __webpack_require__(493), + TileCheckY: __webpack_require__(495), + TileIntersectsBody: __webpack_require__(233) }; @@ -178524,10 +178884,6 @@ module.exports = Tilemap; /***/ }), -/* 1302 */, -/* 1303 */, -/* 1304 */, -/* 1305 */, /* 1306 */, /* 1307 */, /* 1308 */, @@ -178535,7 +178891,11 @@ module.exports = Tilemap; /* 1310 */, /* 1311 */, /* 1312 */, -/* 1313 */ +/* 1313 */, +/* 1314 */, +/* 1315 */, +/* 1316 */, +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178550,17 +178910,17 @@ module.exports = Tilemap; module.exports = { - BasePlugin: __webpack_require__(501), - DefaultPlugins: __webpack_require__(182), + BasePlugin: __webpack_require__(502), + DefaultPlugins: __webpack_require__(184), PluginCache: __webpack_require__(23), - PluginManager: __webpack_require__(380), - ScenePlugin: __webpack_require__(1314) + PluginManager: __webpack_require__(381), + ScenePlugin: __webpack_require__(1318) }; /***/ }), -/* 1314 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178569,7 +178929,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(501); +var BasePlugin = __webpack_require__(502); var Class = __webpack_require__(0); var SceneEvents = __webpack_require__(20); @@ -178688,7 +179048,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1315 */ +/* 1319 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178698,7 +179058,7 @@ module.exports = ScenePlugin; */ var Extend = __webpack_require__(19); -var CONST = __webpack_require__(185); +var CONST = __webpack_require__(187); /** * @namespace Phaser.Scale @@ -178726,12 +179086,12 @@ var CONST = __webpack_require__(185); var Scale = { - Center: __webpack_require__(369), - Events: __webpack_require__(93), - Orientation: __webpack_require__(370), - ScaleManager: __webpack_require__(381), - ScaleModes: __webpack_require__(371), - Zoom: __webpack_require__(372) + Center: __webpack_require__(370), + Events: __webpack_require__(94), + Orientation: __webpack_require__(371), + ScaleManager: __webpack_require__(382), + ScaleModes: __webpack_require__(372), + Zoom: __webpack_require__(373) }; @@ -178744,7 +179104,7 @@ module.exports = Scale; /***/ }), -/* 1316 */ +/* 1320 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178753,7 +179113,7 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(132); +var CONST = __webpack_require__(133); var Extend = __webpack_require__(19); /** @@ -178763,12 +179123,12 @@ var Extend = __webpack_require__(19); var Scene = { Events: __webpack_require__(20), - GetPhysicsPlugins: __webpack_require__(385), - GetScenePlugins: __webpack_require__(386), - SceneManager: __webpack_require__(383), - ScenePlugin: __webpack_require__(1317), - Settings: __webpack_require__(387), - Systems: __webpack_require__(188) + GetPhysicsPlugins: __webpack_require__(386), + GetScenePlugins: __webpack_require__(387), + SceneManager: __webpack_require__(384), + ScenePlugin: __webpack_require__(1321), + Settings: __webpack_require__(388), + Systems: __webpack_require__(190) }; @@ -178779,7 +179139,7 @@ module.exports = Scene; /***/ }), -/* 1317 */ +/* 1321 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179789,7 +180149,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1318 */ +/* 1322 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179804,19 +180164,19 @@ module.exports = ScenePlugin; module.exports = { - Events: __webpack_require__(404), - List: __webpack_require__(136), - Map: __webpack_require__(121), - ProcessQueue: __webpack_require__(195), - RTree: __webpack_require__(490), - Set: __webpack_require__(140), - Size: __webpack_require__(382) + Events: __webpack_require__(405), + List: __webpack_require__(137), + Map: __webpack_require__(92), + ProcessQueue: __webpack_require__(197), + RTree: __webpack_require__(491), + Set: __webpack_require__(141), + Size: __webpack_require__(383) }; /***/ }), -/* 1319 */ +/* 1323 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179826,7 +180186,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var FilterMode = __webpack_require__(1320); +var FilterMode = __webpack_require__(1324); /** * @namespace Phaser.Textures @@ -179852,14 +180212,14 @@ var FilterMode = __webpack_require__(1320); var Textures = { - CanvasTexture: __webpack_require__(389), - Events: __webpack_require__(129), + CanvasTexture: __webpack_require__(390), + Events: __webpack_require__(130), FilterMode: FilterMode, - Frame: __webpack_require__(96), - Parsers: __webpack_require__(391), - Texture: __webpack_require__(190), - TextureManager: __webpack_require__(388), - TextureSource: __webpack_require__(390) + Frame: __webpack_require__(97), + Parsers: __webpack_require__(392), + Texture: __webpack_require__(192), + TextureManager: __webpack_require__(389), + TextureSource: __webpack_require__(391) }; @@ -179869,7 +180229,7 @@ module.exports = Textures; /***/ }), -/* 1320 */ +/* 1324 */ /***/ (function(module, exports) { /** @@ -179913,7 +180273,7 @@ module.exports = CONST; /***/ }), -/* 1321 */ +/* 1325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179928,30 +180288,30 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(148), - Parsers: __webpack_require__(1351), + Components: __webpack_require__(149), + Parsers: __webpack_require__(1355), Formats: __webpack_require__(33), - ImageCollection: __webpack_require__(512), - ParseToTilemap: __webpack_require__(238), + ImageCollection: __webpack_require__(513), + ParseToTilemap: __webpack_require__(240), Tile: __webpack_require__(75), - Tilemap: __webpack_require__(521), - TilemapCreator: __webpack_require__(1365), - TilemapFactory: __webpack_require__(1366), - Tileset: __webpack_require__(106), + Tilemap: __webpack_require__(522), + TilemapCreator: __webpack_require__(1369), + TilemapFactory: __webpack_require__(1370), + Tileset: __webpack_require__(107), - LayerData: __webpack_require__(104), - MapData: __webpack_require__(105), - ObjectLayer: __webpack_require__(515), + LayerData: __webpack_require__(105), + MapData: __webpack_require__(106), + ObjectLayer: __webpack_require__(516), - DynamicTilemapLayer: __webpack_require__(522), - StaticTilemapLayer: __webpack_require__(523) + DynamicTilemapLayer: __webpack_require__(523), + StaticTilemapLayer: __webpack_require__(524) }; /***/ }), -/* 1322 */ +/* 1326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180016,7 +180376,7 @@ module.exports = Copy; /***/ }), -/* 1323 */ +/* 1327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180025,10 +180385,10 @@ module.exports = Copy; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(150); -var TileToWorldY = __webpack_require__(151); +var TileToWorldX = __webpack_require__(151); +var TileToWorldY = __webpack_require__(152); var GetTilesWithin = __webpack_require__(24); -var ReplaceByIndex = __webpack_require__(502); +var ReplaceByIndex = __webpack_require__(503); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -180103,7 +180463,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 1324 */ +/* 1328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180112,8 +180472,8 @@ module.exports = CreateFromTiles; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SnapFloor = __webpack_require__(94); -var SnapCeil = __webpack_require__(342); +var SnapFloor = __webpack_require__(95); +var SnapCeil = __webpack_require__(343); /** * Returns the tiles in the given layer that are within the camera's viewport. This is used internally. @@ -180259,7 +180619,7 @@ module.exports = CullTiles; /***/ }), -/* 1325 */ +/* 1329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180312,7 +180672,7 @@ module.exports = Fill; /***/ }), -/* 1326 */ +/* 1330 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180358,7 +180718,7 @@ module.exports = FilterTiles; /***/ }), -/* 1327 */ +/* 1331 */ /***/ (function(module, exports) { /** @@ -180445,7 +180805,7 @@ module.exports = FindByIndex; /***/ }), -/* 1328 */ +/* 1332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180498,7 +180858,7 @@ module.exports = FindTile; /***/ }), -/* 1329 */ +/* 1333 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180547,7 +180907,7 @@ module.exports = ForEachTile; /***/ }), -/* 1330 */ +/* 1334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180556,7 +180916,7 @@ module.exports = ForEachTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(149); +var GetTileAt = __webpack_require__(150); var WorldToTileX = __webpack_require__(66); var WorldToTileY = __webpack_require__(67); @@ -180587,7 +180947,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1331 */ +/* 1335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180596,12 +180956,12 @@ module.exports = GetTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Geom = __webpack_require__(447); +var Geom = __webpack_require__(448); var GetTilesWithin = __webpack_require__(24); -var Intersects = __webpack_require__(448); +var Intersects = __webpack_require__(449); var NOOP = __webpack_require__(1); -var TileToWorldX = __webpack_require__(150); -var TileToWorldY = __webpack_require__(151); +var TileToWorldX = __webpack_require__(151); +var TileToWorldY = __webpack_require__(152); var WorldToTileX = __webpack_require__(66); var WorldToTileY = __webpack_require__(67); @@ -180710,7 +181070,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1332 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180759,7 +181119,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1333 */ +/* 1337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180768,7 +181128,7 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(503); +var HasTileAt = __webpack_require__(504); var WorldToTileX = __webpack_require__(66); var WorldToTileY = __webpack_require__(67); @@ -180798,7 +181158,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1334 */ +/* 1338 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180807,7 +181167,7 @@ module.exports = HasTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PutTileAt = __webpack_require__(234); +var PutTileAt = __webpack_require__(236); var WorldToTileX = __webpack_require__(66); var WorldToTileY = __webpack_require__(67); @@ -180841,7 +181201,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1335 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180851,7 +181211,7 @@ module.exports = PutTileAtWorldXY; */ var CalculateFacesWithin = __webpack_require__(53); -var PutTileAt = __webpack_require__(234); +var PutTileAt = __webpack_require__(236); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -180904,7 +181264,7 @@ module.exports = PutTilesAt; /***/ }), -/* 1336 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180914,7 +181274,7 @@ module.exports = PutTilesAt; */ var GetTilesWithin = __webpack_require__(24); -var GetRandom = __webpack_require__(194); +var GetRandom = __webpack_require__(196); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -180962,7 +181322,7 @@ module.exports = Randomize; /***/ }), -/* 1337 */ +/* 1341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180971,7 +181331,7 @@ module.exports = Randomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(504); +var RemoveTileAt = __webpack_require__(505); var WorldToTileX = __webpack_require__(66); var WorldToTileY = __webpack_require__(67); @@ -181003,7 +181363,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1338 */ +/* 1342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181013,7 +181373,7 @@ module.exports = RemoveTileAtWorldXY; */ var GetTilesWithin = __webpack_require__(24); -var Color = __webpack_require__(363); +var Color = __webpack_require__(364); var defaultTileColor = new Color(105, 210, 231, 150); var defaultCollidingTileColor = new Color(243, 134, 48, 200); @@ -181091,7 +181451,7 @@ module.exports = RenderDebug; /***/ }), -/* 1339 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181102,7 +181462,7 @@ module.exports = RenderDebug; var SetTileCollision = __webpack_require__(65); var CalculateFacesWithin = __webpack_require__(53); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(153); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -181159,7 +181519,7 @@ module.exports = SetCollision; /***/ }), -/* 1340 */ +/* 1344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181170,7 +181530,7 @@ module.exports = SetCollision; var SetTileCollision = __webpack_require__(65); var CalculateFacesWithin = __webpack_require__(53); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(153); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -181233,7 +181593,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1341 */ +/* 1345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181244,7 +181604,7 @@ module.exports = SetCollisionBetween; var SetTileCollision = __webpack_require__(65); var CalculateFacesWithin = __webpack_require__(53); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(153); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -181289,7 +181649,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1342 */ +/* 1346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181300,7 +181660,7 @@ module.exports = SetCollisionByExclusion; var SetTileCollision = __webpack_require__(65); var CalculateFacesWithin = __webpack_require__(53); -var HasValue = __webpack_require__(113); +var HasValue = __webpack_require__(115); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -181363,7 +181723,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1343 */ +/* 1347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181422,7 +181782,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1344 */ +/* 1348 */ /***/ (function(module, exports) { /** @@ -181468,7 +181828,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1345 */ +/* 1349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181509,7 +181869,7 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 1346 */ +/* 1350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181519,7 +181879,7 @@ module.exports = SetTileLocationCallback; */ var GetTilesWithin = __webpack_require__(24); -var ShuffleArray = __webpack_require__(119); +var ShuffleArray = __webpack_require__(121); /** * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given @@ -181554,7 +181914,7 @@ module.exports = Shuffle; /***/ }), -/* 1347 */ +/* 1351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181605,7 +181965,7 @@ module.exports = SwapByIndex; /***/ }), -/* 1348 */ +/* 1352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181614,8 +181974,8 @@ module.exports = SwapByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(150); -var TileToWorldY = __webpack_require__(151); +var TileToWorldX = __webpack_require__(151); +var TileToWorldY = __webpack_require__(152); var Vector2 = __webpack_require__(3); /** @@ -181648,7 +182008,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 1349 */ +/* 1353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181730,7 +182090,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 1350 */ +/* 1354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181774,7 +182134,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 1351 */ +/* 1355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181789,18 +182149,18 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(505), - Parse2DArray: __webpack_require__(235), - ParseCSV: __webpack_require__(506), + Parse: __webpack_require__(506), + Parse2DArray: __webpack_require__(237), + ParseCSV: __webpack_require__(507), - Impact: __webpack_require__(1352), - Tiled: __webpack_require__(1353) + Impact: __webpack_require__(1356), + Tiled: __webpack_require__(1357) }; /***/ }), -/* 1352 */ +/* 1356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181815,15 +182175,15 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(519), - ParseTilesets: __webpack_require__(520), - ParseWeltmeister: __webpack_require__(518) + ParseTileLayers: __webpack_require__(520), + ParseTilesets: __webpack_require__(521), + ParseWeltmeister: __webpack_require__(519) }; /***/ }), -/* 1353 */ +/* 1357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181838,23 +182198,23 @@ module.exports = { module.exports = { - AssignTileProperties: __webpack_require__(517), - Base64Decode: __webpack_require__(509), - BuildTilesetIndex: __webpack_require__(516), - CreateGroupLayer: __webpack_require__(153), - ParseGID: __webpack_require__(236), - ParseImageLayers: __webpack_require__(510), - ParseJSONTiled: __webpack_require__(507), - ParseObject: __webpack_require__(237), - ParseObjectLayers: __webpack_require__(514), - ParseTileLayers: __webpack_require__(508), - ParseTilesets: __webpack_require__(511) + AssignTileProperties: __webpack_require__(518), + Base64Decode: __webpack_require__(510), + BuildTilesetIndex: __webpack_require__(517), + CreateGroupLayer: __webpack_require__(154), + ParseGID: __webpack_require__(238), + ParseImageLayers: __webpack_require__(511), + ParseJSONTiled: __webpack_require__(508), + ParseObject: __webpack_require__(239), + ParseObjectLayers: __webpack_require__(515), + ParseTileLayers: __webpack_require__(509), + ParseTilesets: __webpack_require__(512) }; /***/ }), -/* 1354 */ +/* 1358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181868,12 +182228,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1355); + renderWebGL = __webpack_require__(1359); } if (true) { - renderCanvas = __webpack_require__(1356); + renderCanvas = __webpack_require__(1360); } module.exports = { @@ -181885,7 +182245,7 @@ module.exports = { /***/ }), -/* 1355 */ +/* 1359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181924,7 +182284,7 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer } var gidMap = src.gidMap; - var pipeline = src.pipeline; + var pipeline = renderer.pipelines.set(src.pipeline); var getTint = Utils.getTintAppendFloatAlphaAndSwap; @@ -181939,8 +182299,6 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer var tilesets = src.tileset; - renderer.setPipeline(pipeline); - // Loop through each tileset in this layer, drawing just the tiles that are in that set each time // Doing it this way around allows us to batch tiles using the same tileset for (var c = 0; c < tilesets.length; c++) @@ -182006,7 +182364,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1356 */ +/* 1360 */ /***/ (function(module, exports) { /** @@ -182138,7 +182496,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1357 */ +/* 1361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182152,12 +182510,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1358); + renderWebGL = __webpack_require__(1362); } if (true) { - renderCanvas = __webpack_require__(1364); + renderCanvas = __webpack_require__(1368); } module.exports = { @@ -182169,7 +182527,7 @@ module.exports = { /***/ }), -/* 1358 */ +/* 1362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182178,10 +182536,10 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Identity = __webpack_require__(1359); -var Scale = __webpack_require__(1361); -var Translate = __webpack_require__(1362); -var ViewLoad2D = __webpack_require__(1363); +var Identity = __webpack_require__(1363); +var Scale = __webpack_require__(1365); +var Translate = __webpack_require__(1366); +var ViewLoad2D = __webpack_require__(1367); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -182215,7 +182573,7 @@ var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPerc Scale(src, src.scaleX, src.scaleY, 1); ViewLoad2D(src, camera.matrix.matrix); - renderer.setPipeline(pipeline); + renderer.pipelines.set(pipeline); // The above alters the uniforms, so make sure we call it _after_ setting the MVP stuff above renderer.setMatrix4(pipeline.program, 'uModelMatrix', false, src.modelMatrix); @@ -182264,7 +182622,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1359 */ +/* 1363 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182273,7 +182631,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetIdentity = __webpack_require__(1360); +var SetIdentity = __webpack_require__(1364); /** * Loads an identity matrix into the model matrix. @@ -182298,7 +182656,7 @@ module.exports = Identity; /***/ }), -/* 1360 */ +/* 1364 */ /***/ (function(module, exports) { /** @@ -182339,7 +182697,7 @@ module.exports = SetIdentity; /***/ }), -/* 1361 */ +/* 1365 */ /***/ (function(module, exports) { /** @@ -182387,7 +182745,7 @@ module.exports = Scale; /***/ }), -/* 1362 */ +/* 1366 */ /***/ (function(module, exports) { /** @@ -182427,7 +182785,7 @@ module.exports = Translate; /***/ }), -/* 1363 */ +/* 1367 */ /***/ (function(module, exports) { /** @@ -182477,7 +182835,7 @@ module.exports = ViewLoad2D; /***/ }), -/* 1364 */ +/* 1368 */ /***/ (function(module, exports) { /** @@ -182611,7 +182969,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1365 */ +/* 1369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182621,7 +182979,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; */ var GameObjectCreator = __webpack_require__(16); -var ParseToTilemap = __webpack_require__(238); +var ParseToTilemap = __webpack_require__(240); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -182655,7 +183013,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1366 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182665,7 +183023,7 @@ GameObjectCreator.register('tilemap', function (config) */ var GameObjectFactory = __webpack_require__(5); -var ParseToTilemap = __webpack_require__(238); +var ParseToTilemap = __webpack_require__(240); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -182721,7 +183079,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1367 */ +/* 1371 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182736,14 +183094,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1368), - TimerEvent: __webpack_require__(524) + Clock: __webpack_require__(1372), + TimerEvent: __webpack_require__(525) }; /***/ }), -/* 1368 */ +/* 1372 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182755,8 +183113,8 @@ module.exports = { var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); -var TimerEvent = __webpack_require__(524); -var Remove = __webpack_require__(95); +var TimerEvent = __webpack_require__(525); +var Remove = __webpack_require__(96); /** * @classdesc @@ -183199,7 +183557,7 @@ module.exports = Clock; /***/ }), -/* 1369 */ +/* 1373 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183217,13 +183575,13 @@ var Extend = __webpack_require__(19); var Tweens = { - Builders: __webpack_require__(1370), - Events: __webpack_require__(243), + Builders: __webpack_require__(1374), + Events: __webpack_require__(245), - TweenManager: __webpack_require__(1386), - Tween: __webpack_require__(242), - TweenData: __webpack_require__(244), - Timeline: __webpack_require__(530) + TweenManager: __webpack_require__(1390), + Tween: __webpack_require__(244), + TweenData: __webpack_require__(246), + Timeline: __webpack_require__(531) }; @@ -183234,7 +183592,7 @@ module.exports = Tweens; /***/ }), -/* 1370 */ +/* 1374 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183251,21 +183609,21 @@ module.exports = { GetBoolean: __webpack_require__(90), GetEaseFunction: __webpack_require__(71), - GetNewValue: __webpack_require__(154), - GetProps: __webpack_require__(525), - GetTargets: __webpack_require__(239), - GetTweens: __webpack_require__(526), - GetValueOp: __webpack_require__(240), - NumberTweenBuilder: __webpack_require__(527), - StaggerBuilder: __webpack_require__(528), - TimelineBuilder: __webpack_require__(529), - TweenBuilder: __webpack_require__(155) + GetNewValue: __webpack_require__(155), + GetProps: __webpack_require__(526), + GetTargets: __webpack_require__(241), + GetTweens: __webpack_require__(527), + GetValueOp: __webpack_require__(242), + NumberTweenBuilder: __webpack_require__(528), + StaggerBuilder: __webpack_require__(529), + TimelineBuilder: __webpack_require__(530), + TweenBuilder: __webpack_require__(156) }; /***/ }), -/* 1371 */ +/* 1375 */ /***/ (function(module, exports) { /** @@ -183343,7 +183701,7 @@ module.exports = [ /***/ }), -/* 1372 */ +/* 1376 */ /***/ (function(module, exports) { /** @@ -183379,7 +183737,7 @@ module.exports = 'complete'; /***/ }), -/* 1373 */ +/* 1377 */ /***/ (function(module, exports) { /** @@ -183416,7 +183774,7 @@ module.exports = 'loop'; /***/ }), -/* 1374 */ +/* 1378 */ /***/ (function(module, exports) { /** @@ -183453,7 +183811,7 @@ module.exports = 'pause'; /***/ }), -/* 1375 */ +/* 1379 */ /***/ (function(module, exports) { /** @@ -183490,7 +183848,7 @@ module.exports = 'resume'; /***/ }), -/* 1376 */ +/* 1380 */ /***/ (function(module, exports) { /** @@ -183526,7 +183884,7 @@ module.exports = 'start'; /***/ }), -/* 1377 */ +/* 1381 */ /***/ (function(module, exports) { /** @@ -183563,7 +183921,7 @@ module.exports = 'update'; /***/ }), -/* 1378 */ +/* 1382 */ /***/ (function(module, exports) { /** @@ -183603,7 +183961,7 @@ module.exports = 'active'; /***/ }), -/* 1379 */ +/* 1383 */ /***/ (function(module, exports) { /** @@ -183644,7 +184002,7 @@ module.exports = 'complete'; /***/ }), -/* 1380 */ +/* 1384 */ /***/ (function(module, exports) { /** @@ -183688,7 +184046,7 @@ module.exports = 'loop'; /***/ }), -/* 1381 */ +/* 1385 */ /***/ (function(module, exports) { /** @@ -183733,7 +184091,7 @@ module.exports = 'repeat'; /***/ }), -/* 1382 */ +/* 1386 */ /***/ (function(module, exports) { /** @@ -183773,7 +184131,7 @@ module.exports = 'start'; /***/ }), -/* 1383 */ +/* 1387 */ /***/ (function(module, exports) { /** @@ -183809,7 +184167,7 @@ module.exports = 'stop'; /***/ }), -/* 1384 */ +/* 1388 */ /***/ (function(module, exports) { /** @@ -183852,7 +184210,7 @@ module.exports = 'update'; /***/ }), -/* 1385 */ +/* 1389 */ /***/ (function(module, exports) { /** @@ -183898,7 +184256,7 @@ module.exports = 'yoyo'; /***/ }), -/* 1386 */ +/* 1390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183907,15 +184265,15 @@ module.exports = 'yoyo'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(95); +var ArrayRemove = __webpack_require__(96); var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(527); +var NumberTweenBuilder = __webpack_require__(528); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); -var StaggerBuilder = __webpack_require__(528); -var TimelineBuilder = __webpack_require__(529); +var StaggerBuilder = __webpack_require__(529); +var TimelineBuilder = __webpack_require__(530); var TWEEN_CONST = __webpack_require__(91); -var TweenBuilder = __webpack_require__(155); +var TweenBuilder = __webpack_require__(156); /** * @classdesc @@ -184687,7 +185045,7 @@ module.exports = TweenManager; /***/ }), -/* 1387 */ +/* 1391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184702,17 +185060,17 @@ module.exports = TweenManager; module.exports = { - Array: __webpack_require__(192), - Base64: __webpack_require__(1388), - Objects: __webpack_require__(1390), - String: __webpack_require__(1394), + Array: __webpack_require__(194), + Base64: __webpack_require__(1392), + Objects: __webpack_require__(1394), + String: __webpack_require__(1398), NOOP: __webpack_require__(1) }; /***/ }), -/* 1388 */ +/* 1392 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184727,14 +185085,14 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1389), - Base64ToArrayBuffer: __webpack_require__(399) + ArrayBufferToBase64: __webpack_require__(1393), + Base64ToArrayBuffer: __webpack_require__(400) }; /***/ }), -/* 1389 */ +/* 1393 */ /***/ (function(module, exports) { /** @@ -184792,7 +185150,7 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1390 */ +/* 1394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184811,22 +185169,22 @@ module.exports = { Extend: __webpack_require__(19), GetAdvancedValue: __webpack_require__(15), GetFastValue: __webpack_require__(2), - GetMinMaxValue: __webpack_require__(1391), + GetMinMaxValue: __webpack_require__(1395), GetValue: __webpack_require__(6), - HasAll: __webpack_require__(1392), - HasAny: __webpack_require__(421), - HasValue: __webpack_require__(113), + HasAll: __webpack_require__(1396), + HasAny: __webpack_require__(422), + HasValue: __webpack_require__(115), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(133), - MergeRight: __webpack_require__(1393), - Pick: __webpack_require__(513), - SetValue: __webpack_require__(444) + Merge: __webpack_require__(134), + MergeRight: __webpack_require__(1397), + Pick: __webpack_require__(514), + SetValue: __webpack_require__(445) }; /***/ }), -/* 1391 */ +/* 1395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184865,7 +185223,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1392 */ +/* 1396 */ /***/ (function(module, exports) { /** @@ -184902,7 +185260,7 @@ module.exports = HasAll; /***/ }), -/* 1393 */ +/* 1397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184945,7 +185303,7 @@ module.exports = MergeRight; /***/ }), -/* 1394 */ +/* 1398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184960,18 +185318,18 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1395), - Pad: __webpack_require__(171), - RemoveAt: __webpack_require__(1396), - Reverse: __webpack_require__(1397), - UppercaseFirst: __webpack_require__(189), - UUID: __webpack_require__(205) + Format: __webpack_require__(1399), + Pad: __webpack_require__(173), + RemoveAt: __webpack_require__(1400), + Reverse: __webpack_require__(1401), + UppercaseFirst: __webpack_require__(191), + UUID: __webpack_require__(207) }; /***/ }), -/* 1395 */ +/* 1399 */ /***/ (function(module, exports) { /** @@ -185006,7 +185364,7 @@ module.exports = Format; /***/ }), -/* 1396 */ +/* 1400 */ /***/ (function(module, exports) { /** @@ -185042,7 +185400,7 @@ module.exports = RemoveAt; /***/ }), -/* 1397 */ +/* 1401 */ /***/ (function(module, exports) { /** @@ -185071,7 +185429,7 @@ module.exports = Reverse; /***/ }), -/* 1398 */ +/* 1402 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185087,30 +185445,26 @@ module.exports = Reverse; module.exports = { - SoundManagerCreator: __webpack_require__(392), + SoundManagerCreator: __webpack_require__(393), Events: __webpack_require__(61), - BaseSound: __webpack_require__(135), - BaseSoundManager: __webpack_require__(134), + BaseSound: __webpack_require__(136), + BaseSoundManager: __webpack_require__(135), - WebAudioSound: __webpack_require__(400), - WebAudioSoundManager: __webpack_require__(398), + WebAudioSound: __webpack_require__(401), + WebAudioSoundManager: __webpack_require__(399), - HTML5AudioSound: __webpack_require__(395), - HTML5AudioSoundManager: __webpack_require__(393), + HTML5AudioSound: __webpack_require__(396), + HTML5AudioSoundManager: __webpack_require__(394), - NoAudioSound: __webpack_require__(397), - NoAudioSoundManager: __webpack_require__(396) + NoAudioSound: __webpack_require__(398), + NoAudioSoundManager: __webpack_require__(397) }; /***/ }), -/* 1399 */, -/* 1400 */, -/* 1401 */, -/* 1402 */, /* 1403 */, /* 1404 */, /* 1405 */, @@ -185159,16 +185513,20 @@ module.exports = { /* 1448 */, /* 1449 */, /* 1450 */, -/* 1451 */ +/* 1451 */, +/* 1452 */, +/* 1453 */, +/* 1454 */, +/* 1455 */ /***/ (function(module, exports, __webpack_require__) { -/** +/* WEBPACK VAR INJECTION */(function(global) {/** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(544); +__webpack_require__(547); var CONST = __webpack_require__(34); var Extend = __webpack_require__(19); @@ -185186,37 +185544,37 @@ var Extend = __webpack_require__(19); var Phaser = { - Actions: __webpack_require__(251), - Animations: __webpack_require__(648), - Cache: __webpack_require__(659), - Cameras: __webpack_require__(662), - Core: __webpack_require__(750), + Actions: __webpack_require__(252), + Animations: __webpack_require__(651), + Cache: __webpack_require__(663), + Cameras: __webpack_require__(666), + Core: __webpack_require__(754), Class: __webpack_require__(0), - Create: __webpack_require__(815), - Curves: __webpack_require__(821), - Data: __webpack_require__(823), - Display: __webpack_require__(825), - DOM: __webpack_require__(843), - Events: __webpack_require__(844), - Game: __webpack_require__(846), - GameObjects: __webpack_require__(936), - Geom: __webpack_require__(447), - Input: __webpack_require__(1220), - Loader: __webpack_require__(1253), - Math: __webpack_require__(178), + Create: __webpack_require__(819), + Curves: __webpack_require__(825), + Data: __webpack_require__(827), + Display: __webpack_require__(829), + DOM: __webpack_require__(847), + Events: __webpack_require__(848), + Game: __webpack_require__(850), + GameObjects: __webpack_require__(940), + Geom: __webpack_require__(448), + Input: __webpack_require__(1224), + Loader: __webpack_require__(1257), + Math: __webpack_require__(180), Physics: { - Arcade: __webpack_require__(1279) + Arcade: __webpack_require__(1283) }, - Plugins: __webpack_require__(1313), - Scale: __webpack_require__(1315), - Scene: __webpack_require__(384), - Scenes: __webpack_require__(1316), - Structs: __webpack_require__(1318), - Textures: __webpack_require__(1319), - Tilemaps: __webpack_require__(1321), - Time: __webpack_require__(1367), - Tweens: __webpack_require__(1369), - Utils: __webpack_require__(1387) + Plugins: __webpack_require__(1317), + Scale: __webpack_require__(1319), + Scene: __webpack_require__(385), + Scenes: __webpack_require__(1320), + Structs: __webpack_require__(1322), + Textures: __webpack_require__(1323), + Tilemaps: __webpack_require__(1325), + Time: __webpack_require__(1371), + Tweens: __webpack_require__(1373), + Utils: __webpack_require__(1391) }; @@ -185226,19 +185584,22 @@ Phaser = Extend(false, Phaser, CONST); if (true) { - Phaser.Sound = __webpack_require__(1398); + Phaser.Sound = __webpack_require__(1402); } // Export it module.exports = Phaser; +global.Phaser = Phaser; + /* * "Documentation is like pizza: when it is good, it is very, very good; * and when it is bad, it is better than nothing." * -- Dick Brandon */ +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(546))) /***/ }) /******/ ]); diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js index bffba9303..d24227804 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 n={},s.m=i=[function(t,e){function r(t,e,i,n){for(var s in e)if(e.hasOwnProperty(s)){var r=(u=e,l=s,f=d=void 0,f=(c=i)?u[l]:Object.getOwnPropertyDescriptor(u,l),!c&&f.value&&"object"==typeof f.value&&(f=f.value),!(!f||!((d=f).get&&"function"==typeof d.get||d.set&&"function"==typeof d.set))&&(void 0===f.enumerable&&(f.enumerable=!0),void 0===f.configurable&&(f.configurable=!0),f));if(!1!==r){if(o=(n||t).prototype,a=s,h=void 0,(h=Object.getOwnPropertyDescriptor(o,a))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,s,r)}else t.prototype[s]=e[s]}var o,a,h,u,l,c,d,f}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i=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){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;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var u=[],l=e;lthis.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=u},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(667),FADE_IN_COMPLETE:i(668),FADE_IN_START:i(669),FADE_OUT_COMPLETE:i(670),FADE_OUT_START:i(671),FLASH_COMPLETE:i(672),FLASH_START:i(673),PAN_COMPLETE:i(674),PAN_START:i(675),POST_RENDER:i(676),PRE_RENDER:i(677),ROTATE_COMPLETE:i(678),ROTATE_START:i(679),SHAKE_COMPLETE:i(680),SHAKE_START:i(681),ZOOM_COMPLETE:i(682),ZOOM_START:i(683)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},,function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var d=i(149),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,u=f(t,e,i,n,null,s),l=0;l=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,s,r,o,a,h,u,l=e&&e.length,c=l?e[0]*i:t.length,d=g(t,0,c,i,!0),f=[];if(!d||d.next===d.prev)return f;if(l&&(d=function(t,e,i,n){var s,r,o,a,h,u=[];for(s=0,r=e.length;s=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&&o=n.x&&n.x>=l&&s!==n.x&&T(ri.x||n.x===i.x&&function(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}(i,n)))&&(i=n,d=h)),n=n.next,n!==u;);return i}(t,e))&&(i=_(e,t),v(e,e.next),v(i,i.next))}}(u[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.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=x(a,h,e,i,n),d=x(u,l,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,u=h.next;else if((t=h)===u){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!l(s,r)&&c(s,n,n.next,r)&&E(s,r)&&E(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return v(n)}(v(t),e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;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,i!==t;);return n}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||l(t,e)&&0=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function u(t){return 0=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(18),c=i(22),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var u,l={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,l),o&&((u=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(u),e.addFile(u))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return 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),this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e,i){var r=i(248),n=i(0),s=i(11),o=i(14),a=i(29),h=i(987),u=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,h],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=u},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return 0=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>u)?(l=Math.max(a.x,e),c=Math.max(a.y,i),E=d=Math.min(a.r,h)-l,_=f=Math.min(a.b,u)-c,T=r?p+(v-(l-a.x)-d):p+(l-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=l,i=c,n=d,s=f):_=E=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var S=this.source.width,A=this.source.height;return t.u0=Math.max(0,T/S),t.v0=Math.max(0,w/A),t.u1=Math.min(1,(T+E)/S),t.v1=Math.min(1,(w+_)/A),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=E,t.ch=_,t.width=n,t.height=s,t.flipX=r,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new 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.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(98),r=i(411),o=i(412),a=i(49),h=i(165),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var U=i(251),n=i(0),r=i(29),s=i(191),z=i(2),G=i(6),o=i(7),W=i(403),a=i(140),h=i(76),u=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?o(e[0])&&(i=e,e=null):o(e)&&(i=e,e=null),this.scene=t,this.children=new a,this.isParent=!0,this.type="Group",this.classType=z(i,"classType",h),this.name=z(i,"name",""),this.active=z(i,"active",!0),this.maxSize=z(i,"maxSize",-1),this.defaultKey=z(i,"defaultKey",null),this.defaultFrame=z(i,"defaultFrame",null),this.runChildUpdate=z(i,"runChildUpdate",!1),this.createCallback=z(i,"createCallback",null),this.removeCallback=z(i,"removeCallback",null),this.createMultipleCallback=z(i,"createMultipleCallback",null),this.internalCreateCallback=z(i,"internalCreateCallback",null),this.internalRemoveCallback=z(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=this.firstgid&&t=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(t){void 0===t&&(t=!1);var e=this.vertexBuffer,i=this.program,n=this.renderer;return n.setProgram(i),n.setVertexBuffer(e),this.setAttribPointers(t),this},setAttribPointers:function(t){void 0===t&&(t=!1);for(var e=this.gl,i=this.attributes,n=this.vertexSize,s=this.program,r=0;rthis.vertexCapacity&&this.flush();var Y=this.setGameObject(t),N=t._isTinted&&t.tintFill;this.batchQuad(A,C,M,O,R,P,L,D,u,l,c,d,F,k,I,B,N,h,Y)},batchQuad:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=l,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=l,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,T,w,E,_,b,S,A,C,M,O,R,P){this.renderer.setPipeline(this,t);var L,D,F,k=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,Y=m/i+A,N=y/n+C,X=(m+x)/i+A,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,D=m=L.x,F=y=L.y,c&&(D=x-L.x-L.width),d&&!e.isRenderTexture&&(F=T-L.y-L.height),Y=D/i+A,N=F/n+C,X=(D+L.width)/i+A,U=(F+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!R&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,l,h,u),k.copyFrom(M.matrix),O?(k.multiplyWithOffset(O,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),k.multiply(I,B);var K=B.getX(W,V),q=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(K=Math.round(K),q=Math.round(q),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===P&&(P=this.renderer.setTexture2D(e)),this.batchQuad(K,q,Z,J,Q,$,tt,et,Y,N,X,U,w,E,_,b,S,e,P)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=e+t.width,l=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,l),p=h.getY(e,l),g=h.getX(u,l),v=h.getY(u,l),m=h.getX(u,i),y=h.getY(u,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,u=this.renderer.setTexture2D(h),l=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,l,l,l,l,2,h,u)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,u=o.getX(t,e),l=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,E=this.fillTint;this.batchQuad(u,l,c,d,f,p,g,v,y,x,T,w,E.TL,E.TR,E.BL,E.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var u=h.getX(t,e),l=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(u,l,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var u=this.tempTriangle;u[0].x=t,u[0].y=e,u[0].width=o,u[1].x=i,u[1].y=n,u[1].width=o,u[2].x=s,u[2].y=r,u[2].width=o,u[3].x=t,u[3].y=e,u[3].width=o,this.batchStrokePath(u,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,u=this.fillTint.TR,l=this.fillTint.BL,c=this.tintEffect,d=0;d>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(292),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var u=i(6),l={},n={register:function(t,e,i,n,s){l[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return l[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in l){var r=l[s].plugin,o=l[s].mapping,a=l[s].settingsKey,h=l[s].configKey;u(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){l.hasOwnProperty(t)&&delete l[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1235),ANY_KEY_UP:i(1236),COMBO_MATCH:i(1237),DOWN:i(1238),KEY_DOWN:i(1239),KEY_UP:i(1240),UP:i(1241)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(226),r=i(76),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(233),CalculateFacesWithin:i(53),Copy:i(1322),CreateFromTiles:i(1323),CullTiles:i(1324),Fill:i(1325),FilterTiles:i(1326),FindByIndex:i(1327),FindTile:i(1328),ForEachTile:i(1329),GetTileAt:i(149),GetTileAtWorldXY:i(1330),GetTilesWithin:i(24),GetTilesWithinShape:i(1331),GetTilesWithinWorldXY:i(1332),HasTileAt:i(503),HasTileAtWorldXY:i(1333),IsInLayerBounds:i(103),PutTileAt:i(234),PutTileAtWorldXY:i(1334),PutTilesAt:i(1335),Randomize:i(1336),RemoveTileAt:i(504),RemoveTileAtWorldXY:i(1337),RenderDebug:i(1338),ReplaceByIndex:i(502),SetCollision:i(1339),SetCollisionBetween:i(1340),SetCollisionByExclusion:i(1341),SetCollisionByProperty:i(1342),SetCollisionFromCollisionGroup:i(1343),SetLayerCollisionIndex:i(152),SetTileCollision:i(65),SetTileIndexCallback:i(1344),SetTileLocationCallback:i(1345),Shuffle:i(1346),SwapByIndex:i(1347),TileToWorldX:i(150),TileToWorldXY:i(1348),TileToWorldY:i(151),WeightedRandomize:i(1349),WorldToTileX:i(66),WorldToTileXY:i(1350),WorldToTileY:i(67)}},function(t,e,i){var r=i(103);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var r=i(2);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=e.x+r(e,"startx",0)*t.tilewidth+r(e,"offsetx",0),s=e.y+r(e,"starty",0)*t.tileheight+r(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+s}}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var P=i(241),L=i(15),D=i(90),F=i(71),k=i(154),I=i(525),B=i(239),Y=i(6),N=i(240),X=i(242),U=i(244);t.exports=function(t,e,i){void 0===i&&(i=P);for(var n=i.targets?i.targets:B(e),s=I(e),r=k(e,"delay",i.delay),o=k(e,"duration",i.duration),a=Y(e,"easeParams",i.easeParams),h=F(Y(e,"ease",i.ease),a),u=k(e,"hold",i.hold),l=k(e,"repeat",i.repeat),c=k(e,"repeatDelay",i.repeatDelay),d=D(e,"yoyo",i.yoyo),f=D(e,"flipX",i.flipX),p=D(e,"flipY",i.flipY),g=[],v=0;v=(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(1+(s-r)).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(306),s=i(309),r=i(311),o=i(312);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var a=i(173);function h(t,e,i,n){var s=(t+6*e)%6,r=Math.min(s,4-s,1);return Math.round(255*(n-n*i*Math.max(0,r)))}t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=h(5,t,e,i),r=h(3,t,e,i),o=h(1,t,e,i);return n?n.setTo?n.setTo(s,r,o,n.alpha,!1):(n.r=s,n.g=r,n.b=o,n.color=a(s,r,o),n):{r:s,g:r,b:o,color:a(s,r,o)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.gl,a=this.frame,h=this.texture,u=this.camera,l=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=a.cutWidth),void 0===r&&(r=a.cutHeight);var c,d,f,p,g,v,m,y,x,T,w=255&(t>>16|0),E=255&(t>>8|0),_=255&(0|t);return u.preRender(1,1),o?(c=u._cx,d=u._cy,f=u._cw,p=u._ch,l.resetTextures(!0),l.pushScissor(c,d,f,-p),l.setFramebuffer(this.framebuffer,!1),g=this.pipeline,v=h.width,m=h.height,y=g.width/v,x=g.height/m,g.drawFillRect(i*y,(m-r-n)*x,s*y,r*x,b.getTintFromFloats(w/255,E/255,_/255,1),e),g.flush(),l.setFramebuffer(null,!1),l.popScissor()):(T=this.context,l.setContext(T),T.fillStyle="rgba("+w+","+E+","+_+","+e+")",T.fillRect(i+a.cutX,n+a.cutY,s,r),l.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,u,l=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),l?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),u=this.pipeline,g(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),g(u,0,u.width,u.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,u,l,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,u=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,u,u),l=this.pipeline,g(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),l.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),l.flush(),f.setFramebuffer(null,!1),f.popScissor(),g(l,0,l.width,l.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0e._dx?r<(s=t.right-e.x)&&!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,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!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,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.right||e.position.y>=t.bottom)}},,function(t,e,i){var u=i(149);t.exports=function(t,e,i){var n=u(t,e,!0,i),s=u(t,e-1,!0,i),r=u(t,e+1,!0,i),o=u(t-1,e,!0,i),a=u(t+1,e,!0,i),h=n&&n.collides;return h&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),s&&s.collides&&(h&&(n.faceTop=!1),s.faceBottom=!h),r&&r.collides&&(h&&(n.faceBottom=!1),r.faceTop=!h),o&&o.collides&&(h&&(n.faceLeft=!1),o.faceRight=!h),a&&a.collides&&(h&&(n.faceRight=!1),a.faceLeft=!h),n&&!n.collides&&n.resetFaces(),n}},function(t,e,i){var l=i(75),c=i(103),d=i(233),f=i(65);t.exports=function(t,e,i,n,s){if(!c(e,i,s))return null;void 0===n&&(n=!0);var r,o=s.data[i][e],a=o&&o.collides;t instanceof l?(null===s.data[i][e]&&(s.data[i][e]=new l(s,t.index,e,i,t.width,t.height)),s.data[i][e].copy(t)):(r=t,null===s.data[i][e]?s.data[i][e]=new l(s,r,e,i,s.tileWidth,s.tileHeight):s.data[i][e].index=r);var h=s.data[i][e],u=-1!==s.collideIndexes.indexOf(h.index);return f(h,u),n&&a!==h.collides&&d(e,i,s),h}},function(t,e,i){var p=i(33),g=i(104),v=i(105),m=i(75);t.exports=function(t,e,i,n,s){for(var r=new g({tileWidth:i,tileHeight:n}),o=new v({name:t,tileWidth:i,tileHeight:n,format:p.ARRAY_2D,layers:[r]}),a=[],h=e.length,u=0,l=0;lt&&(t=s.totalDuration),s.delayh.getTotalFrames()&&(s=0),r=h.frames[s],0!==s||this.forward||(r=h.getLastFrame()),this.currentFrame=r):console.warn("Missing animation: "+a),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){var i,n;return this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e):(this.delayCounter=e,this.play(t,!0)),this.parent},playAfterRepeat:function(t,e){var i,n;return void 0===e&&(e=1),this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e):this.play(t),this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent,s="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===s)return n;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(0this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick))for(var n=0;this.forward?i.nextFrame(this):i.previousFrame(this),n++,this.accumulator>this.nextTick&&n<60;);}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(r.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims&&this.anims.get(t)},exists:function(t){return this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new o(this,e,t),this.anims||(this.anims=new s),this.anims.set(e,i))),i},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=a},,,function(t,e,i){t.exports={AlignTo:i(553),Angle:i(554),Call:i(555),GetFirst:i(556),GetLast:i(557),GridAlign:i(558),IncAlpha:i(603),IncX:i(604),IncXY:i(605),IncY:i(606),PlaceOnCircle:i(607),PlaceOnEllipse:i(608),PlaceOnLine:i(609),PlaceOnRectangle:i(610),PlaceOnTriangle:i(611),PlayAnimation:i(612),PropertyValueInc:i(39),PropertyValueSet:i(25),RandomCircle:i(613),RandomEllipse:i(614),RandomLine:i(615),RandomRectangle:i(616),RandomTriangle:i(617),Rotate:i(618),RotateAround:i(619),RotateAroundDistance:i(620),ScaleX:i(621),ScaleXY:i(622),ScaleY:i(623),SetAlpha:i(624),SetBlendMode:i(625),SetDepth:i(626),SetHitArea:i(627),SetOrigin:i(628),SetRotation:i(629),SetScale:i(630),SetScaleX:i(631),SetScaleY:i(632),SetScrollFactor:i(633),SetScrollFactorX:i(634),SetScrollFactorY:i(635),SetTint:i(636),SetVisible:i(637),SetX:i(638),SetXY:i(639),SetY:i(640),ShiftPosition:i(641),Shuffle:i(642),SmootherStep:i(643),SmoothStep:i(644),Spread:i(645),ToggleVisible:i(646),WrapInRectangle:i(647)}},function(t,e,i){var n=i(107),r=[];r[n.BOTTOM_CENTER]=i(253),r[n.BOTTOM_LEFT]=i(254),r[n.BOTTOM_RIGHT]=i(255),r[n.LEFT_BOTTOM]=i(256),r[n.LEFT_CENTER]=i(257),r[n.LEFT_TOP]=i(258),r[n.RIGHT_BOTTOM]=i(259),r[n.RIGHT_CENTER]=i(260),r[n.RIGHT_TOP]=i(261),r[n.TOP_CENTER]=i(262),r[n.TOP_LEFT]=i(263),r[n.TOP_RIGHT]=i(264);t.exports=function(t,e,i,n,s){return r[i](t,e,n,s)}},function(t,e,i){var s=i(35),r=i(77),o=i(78),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)+i),a(t,s(e)+n),t}},function(t,e,i){var s=i(35),r=i(36),o=i(46),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)-i),a(t,s(e)+n),t}},function(t,e,i){var s=i(35),r=i(37),o=i(47),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)+i),a(t,s(e)+n),t}},function(t,e,i){var s=i(35),r=i(36),o=i(48),a=i(47);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)-i),o(t,s(e)+n),t}},function(t,e,i){var s=i(79),r=i(36),o=i(80),a=i(47);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)-i),o(t,s(e)+n),t}},function(t,e,i){var s=i(36),r=i(38),o=i(47),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)-i),a(t,r(e)-n),t}},function(t,e,i){var s=i(35),r=i(37),o=i(48),a=i(46);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)+n),t}},function(t,e,i){var s=i(79),r=i(37),o=i(80),a=i(46);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)+n),t}},function(t,e,i){var s=i(37),r=i(38),o=i(46),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)+i),a(t,r(e)-n),t}},function(t,e,i){var s=i(77),r=i(38),o=i(48),a=i(78);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)-n),t}},function(t,e,i){var s=i(36),r=i(38),o=i(48),a=i(46);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)-i),o(t,r(e)-n),t}},function(t,e,i){var s=i(37),r=i(38),o=i(48),a=i(47);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)-n),t}},function(t,e,i){var n=i(107),r=[];r[n.BOTTOM_CENTER]=i(266),r[n.BOTTOM_LEFT]=i(267),r[n.BOTTOM_RIGHT]=i(268),r[n.CENTER]=i(269),r[n.LEFT_CENTER]=i(271),r[n.RIGHT_CENTER]=i(272),r[n.TOP_CENTER]=i(273),r[n.TOP_LEFT]=i(274),r[n.TOP_RIGHT]=i(275),r[n.LEFT_BOTTOM]=r[n.BOTTOM_LEFT],r[n.LEFT_TOP]=r[n.TOP_LEFT],r[n.RIGHT_BOTTOM]=r[n.BOTTOM_RIGHT],r[n.RIGHT_TOP]=r[n.TOP_RIGHT];t.exports=function(t,e,i,n,s){return r[i](t,e,n,s)}},function(t,e,i){var s=i(35),r=i(77),o=i(48),a=i(78);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)+n),t}},function(t,e,i){var s=i(35),r=i(36),o=i(48),a=i(46);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)-i),o(t,s(e)+n),t}},function(t,e,i){var s=i(35),r=i(37),o=i(48),a=i(47);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)+n),t}},function(t,e,i){var s=i(270),r=i(77),o=i(79);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),s(t,r(e)+i,o(e)+n),t}},function(t,e,i){var n=i(78),s=i(80);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var s=i(79),r=i(36),o=i(80),a=i(46);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)-i),o(t,s(e)+n),t}},function(t,e,i){var s=i(79),r=i(37),o=i(80),a=i(47);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)+n),t}},function(t,e,i){var s=i(77),r=i(38),o=i(78),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)+i),a(t,r(e)-n),t}},function(t,e,i){var s=i(36),r=i(38),o=i(46),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)-i),a(t,r(e)-n),t}},function(t,e,i){var s=i(37),r=i(38),o=i(47),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)+i),a(t,r(e)-n),t}},function(t,e,i){var s=i(157),r=i(89),o=i(13),a=i(4);t.exports=function(t,e,i){void 0===i&&(i=new a);var n=r(e,0,o.PI2);return s(t,n,i)}},function(t,e,i){var o=i(278),a=i(157),h=i(89),u=i(13);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;ne.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e){t.exports=function(t){var i=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(i,""),10)-parseInt(e.replace(i,""),10)}),t}},function(t,e,i){var n=i(170),s=i(0),r=i(121),o=i(12),a=i(120),h=i(21),T=i(2),d=i(6),f=i(171),p=i(301),u=new s({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var n,s=this.anims,r=this.mixes,o="string"==typeof t?t:t.key,a="string"==typeof e?e:e.key;return s.has(o)&&s.has(a)&&((n=(n=r.get(o))||{})[a]=i,r.set(o,n)),this},removeMix:function(t,e){var i,n=this.mixes,s="string"==typeof t?t:t.key,r=n.get(s);return r&&(e?(i="string"==typeof e?e:e.key,r.hasOwnProperty(i)&&delete r[i]):e||n.delete(s)),this},getMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s="string"==typeof e?e:e.key,r=i.get(n);return r&&r.hasOwnProperty(s)?r[s]:0},add:function(t,e){return this.anims.has(t)?console.warn("Animation key exists: "+t):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e)),this},exists:function(t){return this.anims.has(t)},createFromAseprite:function(g,v){var m=[],t=this.game.cache.json.get(g);if(!t)return m;var y=this,e=d(t,"meta",null),x=d(t,"frames",null);return e&&x&&d(e,"frameTags",[]).forEach(function(t){var e=[],i=T(t,"name",null),n=T(t,"from",0),s=T(t,"to",0),r=T(t,"direction","forward");if(i&&(!v||v&&-1d.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-u,this.lerp.x),p=T(p,i-l,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(u=Math.round(u),l=Math.round(l));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+u,this.y+l,this.rotation,a,a),h.translate(-u,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=l(i,0,1),n=l(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,u=t.y-r;return this.midPoint.set(h,u),this.scrollX=h-o,this.scrollY=u-a,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(32);t.exports=function(t){var e=new o;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,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,u=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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(32);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(32);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(684),Flash:i(685),Pan:i(686),Shake:i(719),RotateTo:i(720),Zoom:i(721)}},function(t,e,i){t.exports={In:i(687),Out:i(688),InOut:i(689)}},function(t,e,i){t.exports={In:i(690),Out:i(691),InOut:i(692)}},function(t,e,i){t.exports={In:i(693),Out:i(694),InOut:i(695)}},function(t,e,i){t.exports={In:i(696),Out:i(697),InOut:i(698)}},function(t,e,i){t.exports={In:i(699),Out:i(700),InOut:i(701)}},function(t,e,i){t.exports={In:i(702),Out:i(703),InOut:i(704)}},function(t,e,i){t.exports=i(705)},function(t,e,i){t.exports={In:i(706),Out:i(707),InOut:i(708)}},function(t,e,i){t.exports={In:i(709),Out:i(710),InOut:i(711)}},function(t,e,i){t.exports={In:i(712),Out:i(713),InOut:i(714)}},function(t,e,i){t.exports={In:i(715),Out:i(716),InOut:i(717)}},function(t,e,i){t.exports=i(718)},function(t,e,i){var n=i(0),a=i(34),h=i(327),u=i(2),l=i(6),c=i(7),d=i(178),f=i(1),p=i(182),g=i(172),s=new n({initialize:function(t){void 0===t&&(t={});this.width=l(t,"width",1024),this.height=l(t,"height",768),this.zoom=l(t,"zoom",1),this.resolution=l(t,"resolution",1),this.parent=l(t,"parent",void 0),this.scaleMode=l(t,"scaleMode",0),this.expandParent=l(t,"expandParent",!0),this.autoRound=l(t,"autoRound",!1),this.autoCenter=l(t,"autoCenter",0),this.resizeInterval=l(t,"resizeInterval",500),this.fullscreenTarget=l(t,"fullscreenTarget",null),this.minWidth=l(t,"minWidth",0),this.maxWidth=l(t,"maxWidth",0),this.minHeight=l(t,"minHeight",0),this.maxHeight=l(t,"maxHeight",0);var e=l(t,"scale",null);e&&(this.width=l(e,"width",this.width),this.height=l(e,"height",this.height),this.zoom=l(e,"zoom",this.zoom),this.resolution=l(e,"resolution",this.resolution),this.parent=l(e,"parent",this.parent),this.scaleMode=l(e,"mode",this.scaleMode),this.expandParent=l(e,"expandParent",this.expandParent),this.autoRound=l(e,"autoRound",this.autoRound),this.autoCenter=l(e,"autoCenter",this.autoCenter),this.resizeInterval=l(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=l(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=l(e,"min.width",this.minWidth),this.maxWidth=l(e,"max.width",this.maxWidth),this.minHeight=l(e,"min.height",this.minHeight),this.maxHeight=l(e,"max.height",this.maxHeight)),this.renderType=l(t,"type",a.AUTO),this.canvas=l(t,"canvas",null),this.context=l(t,"context",null),this.canvasStyle=l(t,"canvasStyle",null),this.customEnvironment=l(t,"customEnvironment",!1),this.sceneConfig=l(t,"scene",null),this.seed=l(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=l(t,"title",""),this.gameURL=l(t,"url","https://phaser.io"),this.gameVersion=l(t,"version",""),this.autoFocus=l(t,"autoFocus",!0),this.domCreateContainer=l(t,"dom.createContainer",!1),this.domBehindCanvas=l(t,"dom.behindCanvas",!1),this.inputKeyboard=l(t,"input.keyboard",!0),this.inputKeyboardEventTarget=l(t,"input.keyboard.target",window),this.inputKeyboardCapture=l(t,"input.keyboard.capture",[]),this.inputMouse=l(t,"input.mouse",!0),this.inputMouseEventTarget=l(t,"input.mouse.target",null),this.inputMouseCapture=l(t,"input.mouse.capture",!0),this.inputTouch=l(t,"input.touch",h.input.touch),this.inputTouchEventTarget=l(t,"input.touch.target",null),this.inputTouchCapture=l(t,"input.touch.capture",!0),this.inputActivePointers=l(t,"input.activePointers",1),this.inputSmoothFactor=l(t,"input.smoothFactor",0),this.inputWindowEvents=l(t,"input.windowEvents",!0),this.inputGamepad=l(t,"input.gamepad",!1),this.inputGamepadEventTarget=l(t,"input.gamepad.target",window),this.disableContextMenu=l(t,"disableContextMenu",!1),this.audio=l(t,"audio"),this.hideBanner=!1===l(t,"banner",null),this.hidePhaser=l(t,"banner.hidePhaser",!1),this.bannerTextColor=l(t,"banner.text","#ffffff"),this.bannerBackgroundColor=l(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=l(t,"fps",null);var i=l(t,"render",t);this.antialias=l(i,"antialias",!0),this.antialiasGL=l(i,"antialiasGL",!0),this.mipmapFilter=l(i,"mipmapFilter","LINEAR"),this.desynchronized=l(i,"desynchronized",!1),this.roundPixels=l(i,"roundPixels",!1),this.pixelArt=l(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=l(i,"transparent",!1),this.clearBeforeRender=l(i,"clearBeforeRender",!0),this.premultipliedAlpha=l(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=l(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=l(i,"powerPreference","default"),this.batchSize=l(i,"batchSize",4096),this.maxTextures=l(i,"maxTextures",-1),this.maxLights=l(i,"maxLights",10);var n=l(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=l(t,"callbacks.preBoot",f),this.postBoot=l(t,"callbacks.postBoot",f),this.physics=l(t,"physics",{}),this.defaultPhysicsSystem=l(this.physics,"default",!1),this.loaderBaseURL=l(t,"loader.baseURL",""),this.loaderPath=l(t,"loader.path",""),this.loaderMaxParallelDownloads=l(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=l(t,"loader.crossOrigin",void 0),this.loaderResponseType=l(t,"loader.responseType",""),this.loaderAsync=l(t,"loader.async",!0),this.loaderUser=l(t,"loader.user",""),this.loaderPassword=l(t,"loader.password",""),this.loaderTimeout=l(t,"loader.timeout",0),this.loaderWithCredentials=l(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=l(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=u(s,"global",[]),this.installScenePlugins=u(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=l(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=l(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(124),browser:i(125),features:i(177),input:i(752),audio:i(753),video:i(754),fullscreen:i(755),canvasFeatures:i(328)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(349),u=a(26),l=a(34),c=a(177);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===l.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==l.HEADLESS)if(e.renderType===l.CANVAS||e.renderType!==l.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=l.CANVAS}else e.renderType=l.WEBGL;e.antialias||u.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=u.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==l.HEADLESS&&(i=a(531),n=a(534),e.renderType===l.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var u=i(34);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===u.CANVAS?e="Canvas":h.renderType===u.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+u.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+u.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(352),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(21);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(355),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),u=x(t,"postRender",null),l=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,l,c),a=o=!1),o&&(i.width=l,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,l,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],u=i[s>i.length-3?i.length-1:s+2];return e.set(l(r,o.x,a.x,h.x,u.x),l(r,o.y,a.y,h.y,u.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(94),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,u[a++]=(15&i)<<4|n>>2,u[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(135),s=i(0),r=i(61),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,u.strokeStyle="rgba("+g+","+v+","+m+","+l+")",u.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,u.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:u.beginPath();break;case x.CLOSE_PATH:u.closePath();break;case x.FILL_PATH:o||u.fill();break;case x.STROKE_PATH:o||u.stroke();break;case x.FILL_RECT:o?u.rect(a[y+1],a[y+2],a[y+3],a[y+4]):u.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.fill(),y+=6;break;case x.STROKE_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.stroke(),y+=6;break;case x.LINE_TO:u.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:u.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:u.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:u.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:u.save();break;case x.RESTORE:u.restore();break;case x.TRANSLATE:u.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:u.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:u.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}u.restore()}}},function(t,e,i){var n=i(0),s=i(126),r=i(71),o=i(2),a=i(59),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t,e,i,n=this.propertyValue,s=typeof n;return"number"==s?(this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate):Array.isArray(n)?this.onEmit=this.randomStaticValueEmit:"function"==s?this.emitOnly?this.onEmit=n:this.onUpdate=n:"object"==s&&(this.has(n,"random")||this.hasBoth(n,"start","end")||this.hasBoth(n,"min","max"))?(this.start=this.has(n,"start")?n.start:n.min,this.end=this.has(n,"end")?n.end:n.max,(t=this.hasBoth(n,"min","max")||!!n.random)&&(e=n.random,Array.isArray(e)&&(this.start=e[0],this.end=e[1]),this.onEmit=this.randomRangedValueEmit),this.has(n,"steps")?(this.steps=n.steps,this.counter=this.start,this.onEmit=this.steppedEmit):(i=this.has(n,"ease")?n.ease:"Linear",this.ease=r(i),t||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate)):"object"==s&&this.hasEither(n,"onEmit","onUpdate")&&(this.has(n,"onEmit")&&(this.onEmit=n.onEmit),this.has(n,"onUpdate")&&(this.onUpdate=n.onUpdate)),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){var i;return t&&t.data[e]&&((i=t.data[e]).min=this.start,i.max=this.end),this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=l(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1019),r=i(60),o=i(9),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(471),h=i(472),n=i(0),u=i(12),l=i(3),s=new n({Extends:u,initialize:function(t,e){u.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xl))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=A(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,l+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,u,l,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,u=t.body,l={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return 0=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,n,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!u(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._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=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,u,l,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),u=n,l=s,p=f=d=c=void 0,c=Math.max(u.minX,l.minX),d=Math.max(u.minY,l.minY),f=Math.min(u.maxX,l.maxX),p=Math.min(u.maxY,l.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),u=i(153);t.exports=function(t){for(var e=[],i=[],n=u(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=u(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(106),T=i(512),w=i(237);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],u=0;un&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=u(e,i),o.tilesets=l(e),o}},function(t,e,i){var d=i(104),f=i(75);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(u=0;ux||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(u=d-1;0<=u;u--)!(a=v[h][u])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,u=i.tileHeight,l=h/2,c=u/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+u)/s,v=this._tempMatrix,m=-l,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(u*=-1,y+=i.tileHeight);var x=m+h,T=y+u;v.applyITRS(l+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),E=v.getX(m,y),_=v.getY(m,y),b=v.getX(m,T),S=v.getY(m,T),A=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),O=v.getY(x,y);r.roundPixels&&(E=Math.round(E),_=Math.round(_),b=Math.round(b),S=Math.round(S),A=Math.round(A),C=Math.round(C),M=Math.round(M),O=Math.round(O));var R=this.vertexViewF32[o],P=this.vertexViewU32[o];return R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=b,R[++t]=S,R[++t]=d,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=A,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=A,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=M,R[++t]=O,R[++t]=p,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;ethis.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=l,T[++E]=u,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=l,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=u,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=u,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},bind:function(t){return void 0===t&&(t=!1),u.prototype.bind.call(this,t),this}});t.exports=l},,,,,function(t,e,i){i(545),i(546),i(547),i(548),i(549),i(550),i(551),i(552)},function(t,e){Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(null==this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001)))},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(305),BaseCamera:i(92),CameraManager:i(722),Effects:i(313),Events:i(42)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),u=i(42),r=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?u.FADE_OUT_START:u.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(l=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:lMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(126);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(126);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(331);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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=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;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new r([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(32),u=i(365);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=u(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=u(s,n,t),a=u(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(174);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(s(n/359,t,e));return i}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:u(t,n,h),g:u(e,s,h),b:u(i,r,h)}}var u=i(123);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(180),s=i(32);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(364);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(286),GeometryMask:i(287)}},function(t,e,i){var n={AddToDOM:i(130),DOMContentLoaded:i(366),GetInnerHeight:i(367),GetScreenOrientation:i(368),GetTarget:i(373),ParseXML:i(374),RemoveFromDOM:i(186),RequestAnimationFrame:i(352)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(845)}},function(t,e,i){var n=i(0),s=i(12),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(130),s=i(300),r=i(304),o=i(26),a=i(0),h=i(326),u=i(847),l=i(348),c=i(118),d=i(350),f=i(327),p=i(366),g=i(12),v=i(21),m=i(375),y=i(23),x=i(380),T=i(381),w=i(383),E=i(129),_=i(388),b=i(351),S=i(353),A=i(392),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new _(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new b(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),l(this),u(this),d(this),n(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),S(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(130);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=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,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var u=i(70);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),u(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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 T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),u=T(e,"offset.y",0),l=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=u,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(176);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(142);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(41);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;it._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){u.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){u.revokeObjectURL(s.data),s.onProcessError()},u.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(a.UPDATE,this.step,this),t.events.emit(a.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={Events:i(404),List:i(136),Map:i(121),ProcessQueue:i(195),RTree:i(490),Set:i(140),Size:i(382)}},function(t,e,i){var n=i(19),s=i(1320),r=n(!1,r={CanvasTexture:i(389),Events:i(129),FilterMode:s,Frame:i(96),Parsers:i(391),Texture:i(190),TextureManager:i(388),TextureSource:i(390)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(148),Parsers:i(1351),Formats:i(33),ImageCollection:i(512),ParseToTilemap:i(238),Tile:i(75),Tilemap:i(521),TilemapCreator:i(1365),TilemapFactory:i(1366),Tileset:i(106),LayerData:i(104),MapData:i(105),ObjectLayer:i(515),DynamicTilemapLayer:i(522),StaticTilemapLayer:i(523)}},function(t,e,i){var p=i(24),g=i(53);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),u=s-t,l=r-e,c=0;c=t&&u.index<=e&&l(u,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(65),h=i(53),u=i(152);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(69),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1391),GetValue:i(6),HasAll:i(1392),HasAny:i(421),HasValue:i(113),IsPlainObject:i(7),Merge:i(133),MergeRight:i(1393),Pick:i(513),SetValue:i(444)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;i=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){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;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var u=[],l=e;lthis.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=u},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(671),FADE_IN_COMPLETE:i(672),FADE_IN_START:i(673),FADE_OUT_COMPLETE:i(674),FADE_OUT_START:i(675),FLASH_COMPLETE:i(676),FLASH_START:i(677),PAN_COMPLETE:i(678),PAN_START:i(679),POST_RENDER:i(680),PRE_RENDER:i(681),ROTATE_COMPLETE:i(682),ROTATE_START:i(683),SHAKE_COMPLETE:i(684),SHAKE_START:i(685),ZOOM_COMPLETE:i(686),ZOOM_START:i(687)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},,function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var d=i(150),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,u=f(t,e,i,n,null,s),l=0;l=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,s,r,o,a,h,u,l=e&&e.length,c=l?e[0]*i:t.length,d=g(t,0,c,i,!0),f=[];if(!d||d.next===d.prev)return f;if(l&&(d=function(t,e,i,n){var s,r,o,a,h,u=[];for(s=0,r=e.length;s=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&&o=n.x&&n.x>=l&&s!==n.x&&T(ri.x||n.x===i.x&&function(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}(i,n)))&&(i=n,d=h)),n=n.next,n!==u;);return i}(t,e))&&(i=_(e,t),v(e,e.next),v(i,i.next))}}(u[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.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=x(a,h,e,i,n),d=x(u,l,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,u=h.next;else if((t=h)===u){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!l(s,r)&&c(s,n,n.next,r)&&E(s,r)&&E(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return v(n)}(v(t),e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;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,i!==t;);return n}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||l(t,e)&&0=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function u(t){return 0=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(18),c=i(22),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var u,l={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,l),o&&((u=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(u),e.addFile(u))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return 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),this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e,i){var r=i(157),n=i(0),s=i(11),o=i(14),a=i(29),h=i(991),u=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,h],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=u},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return 0=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>u)?(l=Math.max(a.x,e),c=Math.max(a.y,i),E=d=Math.min(a.r,h)-l,_=f=Math.min(a.b,u)-c,T=r?p+(v-(l-a.x)-d):p+(l-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=l,i=c,n=d,s=f):_=E=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var S=this.source.width,A=this.source.height;return t.u0=Math.max(0,T/S),t.v0=Math.max(0,w/A),t.u1=Math.min(1,(T+E)/S),t.v1=Math.min(1,(w+_)/A),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=E,t.ch=_,t.width=n,t.height=s,t.flipX=r,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new 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.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(99),r=i(412),o=i(413),a=i(49),h=i(167),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var U=i(252),n=i(0),r=i(29),s=i(193),z=i(2),G=i(6),o=i(7),W=i(404),a=i(141),h=i(76),u=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?o(e[0])&&(i=e,e=null):o(e)&&(i=e,e=null),this.scene=t,this.children=new a,this.isParent=!0,this.type="Group",this.classType=z(i,"classType",h),this.name=z(i,"name",""),this.active=z(i,"active",!0),this.maxSize=z(i,"maxSize",-1),this.defaultKey=z(i,"defaultKey",null),this.defaultFrame=z(i,"defaultFrame",null),this.runChildUpdate=z(i,"runChildUpdate",!1),this.createCallback=z(i,"createCallback",null),this.removeCallback=z(i,"removeCallback",null),this.createMultipleCallback=z(i,"createMultipleCallback",null),this.internalCreateCallback=z(i,"internalCreateCallback",null),this.internalRemoveCallback=z(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=this.firstgid&&t=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(t){void 0===t&&(t=!1);var e=this.vertexBuffer,i=this.program,n=this.renderer;return n.setProgram(i),n.setVertexBuffer(e),this.setAttribPointers(t),this},setAttribPointers:function(t){void 0===t&&(t=!1);for(var e=this.gl,i=this.attributes,n=this.vertexSize,s=this.program,r=0;rthis.vertexCapacity&&this.flush();var N=this.setGameObject(t),Y=t._isTinted&&t.tintFill;this.batchQuad(A,C,M,O,R,P,L,D,u,l,c,d,F,k,I,B,Y,h,N)},batchQuad:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=l,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=l,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,T,w,E,_,b,S,A,C,M,O,R,P){this.renderer.pipelines.set(this,t);var L,D,F,k=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,N=m/i+A,Y=y/n+C,X=(m+x)/i+A,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,D=m=L.x,F=y=L.y,c&&(D=x-L.x-L.width),d&&!e.isRenderTexture&&(F=T-L.y-L.height),N=D/i+A,Y=F/n+C,X=(D+L.width)/i+A,U=(F+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!R&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,l,h,u),k.copyFrom(M.matrix),O?(k.multiplyWithOffset(O,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),k.multiply(I,B);var K=B.getX(W,V),q=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(K=Math.round(K),q=Math.round(q),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===P&&(P=this.renderer.setTexture2D(e)),this.batchQuad(K,q,Z,J,Q,$,tt,et,N,Y,X,U,w,E,_,b,S,e,P)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.pipelines.set(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=e+t.width,l=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,l),p=h.getY(e,l),g=h.getX(u,l),v=h.getY(u,l),m=h.getX(u,i),y=h.getY(u,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,u=this.renderer.setTexture2D(h),l=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,l,l,l,l,2,h,u)},batchFillRect:function(t,e,i,n,s,r){this.renderer.pipelines.set(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,u=o.getX(t,e),l=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,E=this.fillTint;this.batchQuad(u,l,c,d,f,p,g,v,y,x,T,w,E.TL,E.TR,E.BL,E.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.pipelines.set(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var u=h.getX(t,e),l=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(u,l,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var u=this.tempTriangle;u[0].x=t,u[0].y=e,u[0].width=o,u[1].x=i,u[1].y=n,u[1].width=o,u[2].x=s,u[2].y=r,u[2].width=o,u[3].x=t,u[3].y=e,u[3].width=o,this.batchStrokePath(u,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,u=this.fillTint.TR,l=this.fillTint.BL,c=this.tintEffect,d=0;d>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(293),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var u=i(6),l={},n={register:function(t,e,i,n,s){l[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return l[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in l){var r=l[s].plugin,o=l[s].mapping,a=l[s].settingsKey,h=l[s].configKey;u(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){l.hasOwnProperty(t)&&delete l[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1239),ANY_KEY_UP:i(1240),COMBO_MATCH:i(1241),DOWN:i(1242),KEY_DOWN:i(1243),KEY_UP:i(1244),UP:i(1245)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(228),r=i(76),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(235),CalculateFacesWithin:i(53),Copy:i(1326),CreateFromTiles:i(1327),CullTiles:i(1328),Fill:i(1329),FilterTiles:i(1330),FindByIndex:i(1331),FindTile:i(1332),ForEachTile:i(1333),GetTileAt:i(150),GetTileAtWorldXY:i(1334),GetTilesWithin:i(24),GetTilesWithinShape:i(1335),GetTilesWithinWorldXY:i(1336),HasTileAt:i(504),HasTileAtWorldXY:i(1337),IsInLayerBounds:i(104),PutTileAt:i(236),PutTileAtWorldXY:i(1338),PutTilesAt:i(1339),Randomize:i(1340),RemoveTileAt:i(505),RemoveTileAtWorldXY:i(1341),RenderDebug:i(1342),ReplaceByIndex:i(503),SetCollision:i(1343),SetCollisionBetween:i(1344),SetCollisionByExclusion:i(1345),SetCollisionByProperty:i(1346),SetCollisionFromCollisionGroup:i(1347),SetLayerCollisionIndex:i(153),SetTileCollision:i(65),SetTileIndexCallback:i(1348),SetTileLocationCallback:i(1349),Shuffle:i(1350),SwapByIndex:i(1351),TileToWorldX:i(151),TileToWorldXY:i(1352),TileToWorldY:i(152),WeightedRandomize:i(1353),WorldToTileX:i(66),WorldToTileXY:i(1354),WorldToTileY:i(67)}},function(t,e,i){var r=i(104);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var r=i(2);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=e.x+r(e,"startx",0)*t.tilewidth+r(e,"offsetx",0),s=e.y+r(e,"starty",0)*t.tileheight+r(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+s}}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var P=i(243),L=i(15),D=i(90),F=i(71),k=i(155),I=i(526),B=i(241),N=i(6),Y=i(242),X=i(244),U=i(246);t.exports=function(t,e,i){void 0===i&&(i=P);for(var n=i.targets?i.targets:B(e),s=I(e),r=k(e,"delay",i.delay),o=k(e,"duration",i.duration),a=N(e,"easeParams",i.easeParams),h=F(N(e,"ease",i.ease),a),u=k(e,"hold",i.hold),l=k(e,"repeat",i.repeat),c=k(e,"repeatDelay",i.repeatDelay),d=D(e,"yoyo",i.yoyo),f=D(e,"flipX",i.flipX),p=D(e,"flipY",i.flipY),g=[],v=0;vh.getTotalFrames()&&(s=0),r=h.frames[s],0!==s||this.forward||(r=h.getLastFrame()),this.currentFrame=r):console.warn("Missing animation: "+a),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){var i,n;return this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e):(this.delayCounter=e,this.play(t,!0)),this.parent},playAfterRepeat:function(t,e){var i,n;return void 0===e&&(e=1),this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e):this.play(t),this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent,s="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===s)return n;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(0this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick))for(var n=0;this.forward?i.nextFrame(this):i.previousFrame(this),n++,this.accumulator>this.nextTick&&n<60;);}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(r.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims&&this.anims.get(t)},exists:function(t){return this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new o(this,e,t),this.anims||(this.anims=new s),this.anims.set(e,i))),i},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=a},,function(t,e,i){var n=i(4);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},function(t,e,i){var a=i(4);t.exports=function(t,e){void 0===e&&(e=new a);var i=2*Math.PI*Math.random(),n=Math.random()+Math.random(),s=1=(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(1+(s-r)).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(307),s=i(310),r=i(312),o=i(313);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var a=i(175);function h(t,e,i,n){var s=(t+6*e)%6,r=Math.min(s,4-s,1);return Math.round(255*(n-n*i*Math.max(0,r)))}t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=h(5,t,e,i),r=h(3,t,e,i),o=h(1,t,e,i);return n?n.setTo?n.setTo(s,r,o,n.alpha,!1):(n.r=s,n.g=r,n.b=o,n.color=a(s,r,o),n):{r:s,g:r,b:o,color:a(s,r,o)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.gl,a=this.frame,h=this.texture,u=this.camera,l=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=a.cutWidth),void 0===r&&(r=a.cutHeight);var c,d,f,p,g,v,m,y,x,T,w=255&(t>>16|0),E=255&(t>>8|0),_=255&(0|t);return u.preRender(1,1),o?(c=u._cx,d=u._cy,f=u._cw,p=u._ch,l.resetTextures(!0),l.pushScissor(c,d,f,-p),l.setFramebuffer(this.framebuffer,!1),g=this.pipeline,v=h.width,m=h.height,y=g.width/v,x=g.height/m,g.drawFillRect(i*y,(m-r-n)*x,s*y,r*x,b.getTintFromFloats(w/255,E/255,_/255,1),e),g.flush(),l.setFramebuffer(null,!1),l.popScissor()):(T=this.context,l.setContext(T),T.fillStyle="rgba("+w+","+E+","+_+","+e+")",T.fillRect(i+a.cutX,n+a.cutY,s,r),l.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,u,l=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),l?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),u=this.pipeline,g(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),g(u,0,u.width,u.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,u,l,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,u=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,u,u),l=this.pipeline,g(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),l.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),l.flush(),f.setFramebuffer(null,!1),f.popScissor(),g(l,0,l.width,l.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0e._dx?r<(s=t.right-e.x)&&!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,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!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,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.right||e.position.y>=t.bottom)}},,function(t,e,i){var u=i(150);t.exports=function(t,e,i){var n=u(t,e,!0,i),s=u(t,e-1,!0,i),r=u(t,e+1,!0,i),o=u(t-1,e,!0,i),a=u(t+1,e,!0,i),h=n&&n.collides;return h&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),s&&s.collides&&(h&&(n.faceTop=!1),s.faceBottom=!h),r&&r.collides&&(h&&(n.faceBottom=!1),r.faceTop=!h),o&&o.collides&&(h&&(n.faceLeft=!1),o.faceRight=!h),a&&a.collides&&(h&&(n.faceRight=!1),a.faceLeft=!h),n&&!n.collides&&n.resetFaces(),n}},function(t,e,i){var l=i(75),c=i(104),d=i(235),f=i(65);t.exports=function(t,e,i,n,s){if(!c(e,i,s))return null;void 0===n&&(n=!0);var r,o=s.data[i][e],a=o&&o.collides;t instanceof l?(null===s.data[i][e]&&(s.data[i][e]=new l(s,t.index,e,i,t.width,t.height)),s.data[i][e].copy(t)):(r=t,null===s.data[i][e]?s.data[i][e]=new l(s,r,e,i,s.tileWidth,s.tileHeight):s.data[i][e].index=r);var h=s.data[i][e],u=-1!==s.collideIndexes.indexOf(h.index);return f(h,u),n&&a!==h.collides&&d(e,i,s),h}},function(t,e,i){var p=i(33),g=i(105),v=i(106),m=i(75);t.exports=function(t,e,i,n,s){for(var r=new g({tileWidth:i,tileHeight:n}),o=new v({name:t,tileWidth:i,tileHeight:n,format:p.ARRAY_2D,layers:[r]}),a=[],h=e.length,u=0,l=0;lt&&(t=s.totalDuration),s.delay=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;ne.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e){t.exports=function(t){var i=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(i,""),10)-parseInt(e.replace(i,""),10)}),t}},function(t,e,i){var n=i(172),s=i(0),r=i(92),o=i(12),a=i(122),h=i(21),T=i(2),d=i(6),f=i(173),p=i(302),u=new s({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var n,s=this.anims,r=this.mixes,o="string"==typeof t?t:t.key,a="string"==typeof e?e:e.key;return s.has(o)&&s.has(a)&&((n=(n=r.get(o))||{})[a]=i,r.set(o,n)),this},removeMix:function(t,e){var i,n=this.mixes,s="string"==typeof t?t:t.key,r=n.get(s);return r&&(e?(i="string"==typeof e?e:e.key,r.hasOwnProperty(i)&&delete r[i]):e||n.delete(s)),this},getMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s="string"==typeof e?e:e.key,r=i.get(n);return r&&r.hasOwnProperty(s)?r[s]:0},add:function(t,e){return this.anims.has(t)?console.warn("Animation key exists: "+t):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e)),this},exists:function(t){return this.anims.has(t)},createFromAseprite:function(g,v){var m=[],t=this.game.cache.json.get(g);if(!t)return m;var y=this,e=d(t,"meta",null),x=d(t,"frames",null);return e&&x&&d(e,"frameTags",[]).forEach(function(t){var e=[],i=T(t,"name",null),n=T(t,"from",0),s=T(t,"to",0),r=T(t,"direction","forward");if(i&&(!v||v&&-1d.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-u,this.lerp.x),p=T(p,i-l,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(u=Math.round(u),l=Math.round(l));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+u,this.y+l,this.rotation,a,a),h.translate(-u,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=l(i,0,1),n=l(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,u=t.y-r;return this.midPoint.set(h,u),this.scrollX=h-o,this.scrollY=u-a,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(32);t.exports=function(t){var e=new o;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,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,u=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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(32);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(32);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(688),Flash:i(689),Pan:i(690),Shake:i(723),RotateTo:i(724),Zoom:i(725)}},function(t,e,i){t.exports={In:i(691),Out:i(692),InOut:i(693)}},function(t,e,i){t.exports={In:i(694),Out:i(695),InOut:i(696)}},function(t,e,i){t.exports={In:i(697),Out:i(698),InOut:i(699)}},function(t,e,i){t.exports={In:i(700),Out:i(701),InOut:i(702)}},function(t,e,i){t.exports={In:i(703),Out:i(704),InOut:i(705)}},function(t,e,i){t.exports={In:i(706),Out:i(707),InOut:i(708)}},function(t,e,i){t.exports=i(709)},function(t,e,i){t.exports={In:i(710),Out:i(711),InOut:i(712)}},function(t,e,i){t.exports={In:i(713),Out:i(714),InOut:i(715)}},function(t,e,i){t.exports={In:i(716),Out:i(717),InOut:i(718)}},function(t,e,i){t.exports={In:i(719),Out:i(720),InOut:i(721)}},function(t,e,i){t.exports=i(722)},function(t,e,i){var n=i(0),a=i(34),h=i(328),u=i(2),l=i(6),c=i(7),d=i(180),f=i(1),p=i(184),g=i(174),s=new n({initialize:function(t){void 0===t&&(t={});this.width=l(t,"width",1024),this.height=l(t,"height",768),this.zoom=l(t,"zoom",1),this.resolution=l(t,"resolution",1),this.parent=l(t,"parent",void 0),this.scaleMode=l(t,"scaleMode",0),this.expandParent=l(t,"expandParent",!0),this.autoRound=l(t,"autoRound",!1),this.autoCenter=l(t,"autoCenter",0),this.resizeInterval=l(t,"resizeInterval",500),this.fullscreenTarget=l(t,"fullscreenTarget",null),this.minWidth=l(t,"minWidth",0),this.maxWidth=l(t,"maxWidth",0),this.minHeight=l(t,"minHeight",0),this.maxHeight=l(t,"maxHeight",0);var e=l(t,"scale",null);e&&(this.width=l(e,"width",this.width),this.height=l(e,"height",this.height),this.zoom=l(e,"zoom",this.zoom),this.resolution=l(e,"resolution",this.resolution),this.parent=l(e,"parent",this.parent),this.scaleMode=l(e,"mode",this.scaleMode),this.expandParent=l(e,"expandParent",this.expandParent),this.autoRound=l(e,"autoRound",this.autoRound),this.autoCenter=l(e,"autoCenter",this.autoCenter),this.resizeInterval=l(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=l(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=l(e,"min.width",this.minWidth),this.maxWidth=l(e,"max.width",this.maxWidth),this.minHeight=l(e,"min.height",this.minHeight),this.maxHeight=l(e,"max.height",this.maxHeight)),this.renderType=l(t,"type",a.AUTO),this.canvas=l(t,"canvas",null),this.context=l(t,"context",null),this.canvasStyle=l(t,"canvasStyle",null),this.customEnvironment=l(t,"customEnvironment",!1),this.sceneConfig=l(t,"scene",null),this.seed=l(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=l(t,"title",""),this.gameURL=l(t,"url","https://phaser.io"),this.gameVersion=l(t,"version",""),this.autoFocus=l(t,"autoFocus",!0),this.domCreateContainer=l(t,"dom.createContainer",!1),this.domBehindCanvas=l(t,"dom.behindCanvas",!1),this.inputKeyboard=l(t,"input.keyboard",!0),this.inputKeyboardEventTarget=l(t,"input.keyboard.target",window),this.inputKeyboardCapture=l(t,"input.keyboard.capture",[]),this.inputMouse=l(t,"input.mouse",!0),this.inputMouseEventTarget=l(t,"input.mouse.target",null),this.inputMouseCapture=l(t,"input.mouse.capture",!0),this.inputTouch=l(t,"input.touch",h.input.touch),this.inputTouchEventTarget=l(t,"input.touch.target",null),this.inputTouchCapture=l(t,"input.touch.capture",!0),this.inputActivePointers=l(t,"input.activePointers",1),this.inputSmoothFactor=l(t,"input.smoothFactor",0),this.inputWindowEvents=l(t,"input.windowEvents",!0),this.inputGamepad=l(t,"input.gamepad",!1),this.inputGamepadEventTarget=l(t,"input.gamepad.target",window),this.disableContextMenu=l(t,"disableContextMenu",!1),this.audio=l(t,"audio"),this.hideBanner=!1===l(t,"banner",null),this.hidePhaser=l(t,"banner.hidePhaser",!1),this.bannerTextColor=l(t,"banner.text","#ffffff"),this.bannerBackgroundColor=l(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=l(t,"fps",null);var i=l(t,"render",t);this.antialias=l(i,"antialias",!0),this.antialiasGL=l(i,"antialiasGL",!0),this.mipmapFilter=l(i,"mipmapFilter","LINEAR"),this.desynchronized=l(i,"desynchronized",!1),this.roundPixels=l(i,"roundPixels",!1),this.pixelArt=l(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=l(i,"transparent",!1),this.clearBeforeRender=l(i,"clearBeforeRender",!0),this.premultipliedAlpha=l(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=l(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=l(i,"powerPreference","default"),this.batchSize=l(i,"batchSize",4096),this.maxTextures=l(i,"maxTextures",-1),this.maxLights=l(i,"maxLights",10);var n=l(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=l(t,"callbacks.preBoot",f),this.postBoot=l(t,"callbacks.postBoot",f),this.physics=l(t,"physics",{}),this.defaultPhysicsSystem=l(this.physics,"default",!1),this.loaderBaseURL=l(t,"loader.baseURL",""),this.loaderPath=l(t,"loader.path",""),this.loaderMaxParallelDownloads=l(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=l(t,"loader.crossOrigin",void 0),this.loaderResponseType=l(t,"loader.responseType",""),this.loaderAsync=l(t,"loader.async",!0),this.loaderUser=l(t,"loader.user",""),this.loaderPassword=l(t,"loader.password",""),this.loaderTimeout=l(t,"loader.timeout",0),this.loaderWithCredentials=l(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=l(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=u(s,"global",[]),this.installScenePlugins=u(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=l(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=l(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(125),browser:i(126),features:i(179),input:i(756),audio:i(757),video:i(758),fullscreen:i(759),canvasFeatures:i(329)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(350),u=a(26),l=a(34),c=a(179);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===l.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==l.HEADLESS)if(e.renderType===l.CANVAS||e.renderType!==l.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=l.CANVAS}else e.renderType=l.WEBGL;e.antialias||u.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=u.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==l.HEADLESS&&(i=a(532),n=a(535),e.renderType===l.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var u=i(34);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===u.CANVAS?e="Canvas":h.renderType===u.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+u.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+u.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(353),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(21);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(356),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),u=x(t,"postRender",null),l=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,l,c),a=o=!1),o&&(i.width=l,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,l,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],u=i[s>i.length-3?i.length-1:s+2];return e.set(l(r,o.x,a.x,h.x,u.x),l(r,o.y,a.y,h.y,u.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(95),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,u[a++]=(15&i)<<4|n>>2,u[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(136),s=i(0),r=i(61),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,u.strokeStyle="rgba("+g+","+v+","+m+","+l+")",u.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,u.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:u.beginPath();break;case x.CLOSE_PATH:u.closePath();break;case x.FILL_PATH:o||u.fill();break;case x.STROKE_PATH:o||u.stroke();break;case x.FILL_RECT:o?u.rect(a[y+1],a[y+2],a[y+3],a[y+4]):u.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.fill(),y+=6;break;case x.STROKE_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.stroke(),y+=6;break;case x.LINE_TO:u.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:u.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:u.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:u.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:u.save();break;case x.RESTORE:u.restore();break;case x.TRANSLATE:u.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:u.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:u.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}u.restore()}}},function(t,e,i){var n=i(0),s=i(127),r=i(71),o=i(2),a=i(59),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t,e,i,n=this.propertyValue,s=typeof n;return"number"==s?(this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate):Array.isArray(n)?this.onEmit=this.randomStaticValueEmit:"function"==s?this.emitOnly?this.onEmit=n:this.onUpdate=n:"object"==s&&(this.has(n,"random")||this.hasBoth(n,"start","end")||this.hasBoth(n,"min","max"))?(this.start=this.has(n,"start")?n.start:n.min,this.end=this.has(n,"end")?n.end:n.max,(t=this.hasBoth(n,"min","max")||!!n.random)&&(e=n.random,Array.isArray(e)&&(this.start=e[0],this.end=e[1]),this.onEmit=this.randomRangedValueEmit),this.has(n,"steps")?(this.steps=n.steps,this.counter=this.start,this.onEmit=this.steppedEmit):(i=this.has(n,"ease")?n.ease:"Linear",this.ease=r(i),t||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate)):"object"==s&&this.hasEither(n,"onEmit","onUpdate")&&(this.has(n,"onEmit")&&(this.onEmit=n.onEmit),this.has(n,"onUpdate")&&(this.onUpdate=n.onUpdate)),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){var i;return t&&t.data[e]&&((i=t.data[e]).min=this.start,i.max=this.end),this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=l(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1023),r=i(60),o=i(9),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(472),h=i(473),n=i(0),u=i(12),l=i(3),s=new n({Extends:u,initialize:function(t,e){u.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xl))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=A(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,l+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,u,l,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,u=t.body,l={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return 0=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,n,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!u(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._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=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,u,l,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),u=n,l=s,p=f=d=c=void 0,c=Math.max(u.minX,l.minX),d=Math.max(u.minY,l.minY),f=Math.min(u.maxX,l.maxX),p=Math.min(u.maxY,l.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),u=i(154);t.exports=function(t){for(var e=[],i=[],n=u(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=u(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(107),T=i(513),w=i(239);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],u=0;un&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=u(e,i),o.tilesets=l(e),o}},function(t,e,i){var d=i(105),f=i(75);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(u=0;ux||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(u=d-1;0<=u;u--)!(a=v[h][u])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,u=i.tileHeight,l=h/2,c=u/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+u)/s,v=this._tempMatrix,m=-l,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(u*=-1,y+=i.tileHeight);var x=m+h,T=y+u;v.applyITRS(l+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),E=v.getX(m,y),_=v.getY(m,y),b=v.getX(m,T),S=v.getY(m,T),A=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),O=v.getY(x,y);r.roundPixels&&(E=Math.round(E),_=Math.round(_),b=Math.round(b),S=Math.round(S),A=Math.round(A),C=Math.round(C),M=Math.round(M),O=Math.round(O));var R=this.vertexViewF32[o],P=this.vertexViewU32[o];return R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=b,R[++t]=S,R[++t]=d,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=A,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=A,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=M,R[++t]=O,R[++t]=p,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;ethis.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=l,T[++E]=u,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=l,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=u,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=u,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},bind:function(t){return void 0===t&&(t=!1),u.prototype.bind.call(this,t),this}});t.exports=l},function(t,e,i){var C=i(26),M=i(32),O=i(2);t.exports=function(t,e){var i=t.getContext("experimental-webgl"),n=O(e,"callback"),s=O(e,"type","image/png"),r=O(e,"encoder",.92),o=O(e,"x",0),a=O(e,"y",0),h=O(e,"getPixel",!1),u=O(e,"isFramebuffer",!1),l=u?O(e,"bufferWidth",1):i.drawingBufferWidth,c=u?O(e,"bufferHeight",1):i.drawingBufferHeight;if(h){var d=new Uint8Array(4),f=u?a:c-a;i.readPixels(o,f,1,1,i.RGBA,i.UNSIGNED_BYTE,d),n.call(null,new M(d[0],d[1],d[2],d[3]/255))}else{var p=O(e,"width",l),g=O(e,"height",c),v=p*g*4,m=new Uint8Array(v);i.readPixels(o,c-a-g,p,g,i.RGBA,i.UNSIGNED_BYTE,m);for(var y=C.createWebGL(this,p,g),x=y.getContext("2d"),T=x.getImageData(0,0,p,g),w=T.data,E=0;E>>0;if("function"!=typeof t)throw new TypeError;for(var n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001)))},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(306),BaseCamera:i(93),CameraManager:i(726),Effects:i(314),Events:i(42)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),u=i(42),r=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?u.FADE_OUT_START:u.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(l=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:lMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(127);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(127);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(332);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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=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;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new r([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(32),u=i(366);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=u(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=u(s,n,t),a=u(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(176);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(s(n/359,t,e));return i}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:u(t,n,h),g:u(e,s,h),b:u(i,r,h)}}var u=i(124);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(182),s=i(32);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(365);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(287),GeometryMask:i(288)}},function(t,e,i){var n={AddToDOM:i(131),DOMContentLoaded:i(367),GetInnerHeight:i(368),GetScreenOrientation:i(369),GetTarget:i(374),ParseXML:i(375),RemoveFromDOM:i(188),RequestAnimationFrame:i(353)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(849)}},function(t,e,i){var n=i(0),s=i(12),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(131),s=i(301),r=i(305),o=i(26),a=i(0),h=i(327),u=i(851),l=i(349),c=i(120),d=i(351),f=i(328),p=i(367),g=i(12),v=i(21),m=i(376),y=i(23),x=i(381),T=i(382),w=i(384),E=i(130),_=i(389),b=i(352),S=i(354),A=i(393),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new _(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new b(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),l(this),u(this),d(this),n(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),S(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(131);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=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,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var u=i(70);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),u(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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 T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),u=T(e,"offset.y",0),l=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=u,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(178);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(143);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(41);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;it._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){u.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){u.revokeObjectURL(s.data),s.onProcessError()},u.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(a.UPDATE,this.step,this),t.events.emit(a.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={Events:i(405),List:i(137),Map:i(92),ProcessQueue:i(197),RTree:i(491),Set:i(141),Size:i(383)}},function(t,e,i){var n=i(19),s=i(1324),r=n(!1,r={CanvasTexture:i(390),Events:i(130),FilterMode:s,Frame:i(97),Parsers:i(392),Texture:i(192),TextureManager:i(389),TextureSource:i(391)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(149),Parsers:i(1355),Formats:i(33),ImageCollection:i(513),ParseToTilemap:i(240),Tile:i(75),Tilemap:i(522),TilemapCreator:i(1369),TilemapFactory:i(1370),Tileset:i(107),LayerData:i(105),MapData:i(106),ObjectLayer:i(516),DynamicTilemapLayer:i(523),StaticTilemapLayer:i(524)}},function(t,e,i){var p=i(24),g=i(53);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),u=s-t,l=r-e,c=0;c=t&&u.index<=e&&l(u,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(65),h=i(53),u=i(153);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(69),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1395),GetValue:i(6),HasAll:i(1396),HasAny:i(422),HasValue:i(115),IsPlainObject:i(7),Merge:i(134),MergeRight:i(1397),Pick:i(514),SetValue:i(445)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @callback EachMapCallback + * + * @param {string} key - The key of the Map entry. + * @param {E} entry - The value of the Map entry. + * + * @return {?boolean} The callback result. + */ + +/** + * @classdesc + * The keys of a Map can be arbitrary values. + * + * ```javascript + * var map = new Map([ + * [ 1, 'one' ], + * [ 2, 'two' ], + * [ 3, 'three' ] + * ]); + * ``` + * + * @class Map + * @memberof Phaser.Structs + * @constructor + * @since 3.0.0 + * + * @generic K + * @generic V + * @genericUse {V[]} - [elements] + * + * @param {Array.<*>} elements - An optional array of key-value pairs to populate this Map with. + */ +var Map = new Class({ + + initialize: + + function Map (elements) + { + /** + * The entries in this Map. + * + * @genericUse {Object.} - [$type] + * + * @name Phaser.Structs.Map#entries + * @type {Object.} + * @default {} + * @since 3.0.0 + */ + this.entries = {}; + + /** + * The number of key / value pairs in this Map. + * + * @name Phaser.Structs.Map#size + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.size = 0; + + if (Array.isArray(elements)) + { + for (var i = 0; i < elements.length; i++) + { + this.set(elements[i][0], elements[i][1]); + } + } + }, + + /** + * Adds an element with a specified `key` and `value` to this Map. + * If the `key` already exists, the value will be replaced. + * + * @method Phaser.Structs.Map#set + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {V} - [value] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {string} key - The key of the element to be added to this Map. + * @param {*} value - The value of the element to be added to this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + set: function (key, value) + { + if (!this.has(key)) + { + this.size++; + } + + this.entries[key] = value; + + return this; + }, + + /** + * Returns the value associated to the `key`, or `undefined` if there is none. + * + * @method Phaser.Structs.Map#get + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {V} - [$return] + * + * @param {string} key - The key of the element to return from the `Map` object. + * + * @return {*} The element associated with the specified key or `undefined` if the key can't be found in this Map object. + */ + get: function (key) + { + if (this.has(key)) + { + return this.entries[key]; + } + }, + + /** + * Returns an `Array` of all the values stored in this Map. + * + * @method Phaser.Structs.Map#getArray + * @since 3.0.0 + * + * @genericUse {V[]} - [$return] + * + * @return {Array.<*>} An array of the values stored in this Map. + */ + getArray: function () + { + var output = []; + var entries = this.entries; + + for (var key in entries) + { + output.push(entries[key]); + } + + return output; + }, + + /** + * Returns a boolean indicating whether an element with the specified key exists or not. + * + * @method Phaser.Structs.Map#has + * @since 3.0.0 + * + * @genericUse {K} - [key] + * + * @param {string} key - The key of the element to test for presence of in this Map. + * + * @return {boolean} Returns `true` if an element with the specified key exists in this Map, otherwise `false`. + */ + has: function (key) + { + return (this.entries.hasOwnProperty(key)); + }, + + /** + * Delete the specified element from this Map. + * + * @method Phaser.Structs.Map#delete + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {string} key - The key of the element to delete from this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + delete: function (key) + { + if (this.has(key)) + { + delete this.entries[key]; + this.size--; + } + + return this; + }, + + /** + * Delete all entries from this Map. + * + * @method Phaser.Structs.Map#clear + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @return {Phaser.Structs.Map} This Map object. + */ + clear: function () + { + Object.keys(this.entries).forEach(function (prop) + { + delete this.entries[prop]; + + }, this); + + this.size = 0; + + return this; + }, + + /** + * Returns all entries keys in this Map. + * + * @method Phaser.Structs.Map#keys + * @since 3.0.0 + * + * @genericUse {K[]} - [$return] + * + * @return {string[]} Array containing entries' keys. + */ + keys: function () + { + return Object.keys(this.entries); + }, + + /** + * Returns an `Array` of all entries. + * + * @method Phaser.Structs.Map#values + * @since 3.0.0 + * + * @genericUse {V[]} - [$return] + * + * @return {Array.<*>} An `Array` of entries. + */ + values: function () + { + var output = []; + var entries = this.entries; + + for (var key in entries) + { + output.push(entries[key]); + } + + return output; + }, + + /** + * Dumps the contents of this Map to the console via `console.group`. + * + * @method Phaser.Structs.Map#dump + * @since 3.0.0 + */ + dump: function () + { + var entries = this.entries; + + // eslint-disable-next-line no-console + console.group('Map'); + + for (var key in entries) + { + console.log(key, entries[key]); + } + + // eslint-disable-next-line no-console + console.groupEnd(); + }, + + /** + * Passes all entries in this Map to the given callback. + * + * @method Phaser.Structs.Map#each + * @since 3.0.0 + * + * @genericUse {EachMapCallback.} - [callback] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {EachMapCallback} callback - The callback which will receive the keys and entries held in this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + each: function (callback) + { + var entries = this.entries; + + for (var key in entries) + { + if (callback(key, entries[key]) === false) + { + break; + } + } + + return this; + }, + + /** + * Returns `true` if the value exists within this Map. Otherwise, returns `false`. + * + * @method Phaser.Structs.Map#contains + * @since 3.0.0 + * + * @genericUse {V} - [value] + * + * @param {*} value - The value to search for. + * + * @return {boolean} `true` if the value is found, otherwise `false`. + */ + contains: function (value) + { + var entries = this.entries; + + for (var key in entries) + { + if (entries[key] === value) + { + return true; + } + } + + return false; + }, + + /** + * Merges all new keys from the given Map into this one. + * If it encounters a key that already exists it will be skipped unless override is set to `true`. + * + * @method Phaser.Structs.Map#merge + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Map.} - [map,$return] + * + * @param {Phaser.Structs.Map} map - The Map to merge in to this Map. + * @param {boolean} [override=false] - Set to `true` to replace values in this Map with those from the source map, or `false` to skip them. + * + * @return {Phaser.Structs.Map} This Map object. + */ + merge: function (map, override) + { + if (override === undefined) { override = false; } + + var local = this.entries; + var source = map.entries; + + for (var key in source) + { + if (local.hasOwnProperty(key) && override) + { + local[key] = source[key]; + } + else + { + this.set(key, source[key]); + } + } + + return this; + } + +}); + +module.exports = Map; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -18299,7 +18672,7 @@ var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(42); var Rectangle = __webpack_require__(9); var TransformMatrix = __webpack_require__(31); -var ValueToColor = __webpack_require__(172); +var ValueToColor = __webpack_require__(174); var Vector2 = __webpack_require__(3); /** @@ -20204,7 +20577,7 @@ module.exports = BaseCamera; /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20219,18 +20592,18 @@ module.exports = BaseCamera; module.exports = { - ENTER_FULLSCREEN: __webpack_require__(723), - FULLSCREEN_FAILED: __webpack_require__(724), - FULLSCREEN_UNSUPPORTED: __webpack_require__(725), - LEAVE_FULLSCREEN: __webpack_require__(726), - ORIENTATION_CHANGE: __webpack_require__(727), - RESIZE: __webpack_require__(728) + ENTER_FULLSCREEN: __webpack_require__(727), + FULLSCREEN_FAILED: __webpack_require__(728), + FULLSCREEN_UNSUPPORTED: __webpack_require__(729), + LEAVE_FULLSCREEN: __webpack_require__(730), + ORIENTATION_CHANGE: __webpack_require__(731), + RESIZE: __webpack_require__(732) }; /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, exports) { /** @@ -20274,7 +20647,7 @@ module.exports = SnapFloor; /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20365,7 +20738,7 @@ module.exports = Remove; /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21222,7 +21595,7 @@ module.exports = Frame; /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21232,11 +21605,11 @@ module.exports = Frame; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(98); -var GetPoint = __webpack_require__(411); -var GetPoints = __webpack_require__(412); +var Contains = __webpack_require__(99); +var GetPoint = __webpack_require__(412); +var GetPoints = __webpack_require__(413); var GEOM_CONST = __webpack_require__(49); -var Random = __webpack_require__(165); +var Random = __webpack_require__(167); /** * @classdesc @@ -21604,7 +21977,7 @@ module.exports = Ellipse; /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -21646,7 +22019,7 @@ module.exports = Contains; /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21655,15 +22028,15 @@ module.exports = Contains; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Actions = __webpack_require__(251); +var Actions = __webpack_require__(252); var Class = __webpack_require__(0); var Events = __webpack_require__(29); -var GetAll = __webpack_require__(191); +var GetAll = __webpack_require__(193); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var Range = __webpack_require__(403); -var Set = __webpack_require__(140); +var Range = __webpack_require__(404); +var Set = __webpack_require__(141); var Sprite = __webpack_require__(76); /** @@ -23356,7 +23729,7 @@ module.exports = Group; /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23420,7 +23793,7 @@ module.exports = FillPathWebGL; /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, exports) { /** @@ -23664,7 +24037,7 @@ module.exports = Vector; })(); /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, exports) { /** @@ -23790,7 +24163,7 @@ module.exports = Bounds; /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, exports) { /** @@ -23820,7 +24193,7 @@ module.exports = IsInLayerBounds; /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24040,7 +24413,7 @@ module.exports = LayerData; /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24265,7 +24638,7 @@ module.exports = MapData; /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24669,7 +25042,7 @@ module.exports = Tileset; /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports) { /** @@ -24803,7 +25176,7 @@ module.exports = ALIGN_CONST; /***/ }), -/* 108 */ +/* 109 */ /***/ (function(module, exports) { /** @@ -24837,7 +25210,74 @@ module.exports = Equal; /***/ }), -/* 109 */ +/* 110 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var PIPELINE_CONST = { + + /** + * The Bitmap Mask Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + BITMAPMASK_PIPELINE: 'BitmapMaskPipeline', + + /** + * The Light 2D Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + LIGHT_PIPELINE: 'Light2D', + + /** + * The Single Texture Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + SINGLE_PIPELINE: 'SinglePipeline', + + /** + * The Multi Texture Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + MULTI_PIPELINE: 'MultiPipeline', + + /** + * The Rope Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + ROPE_PIPELINE: 'RopePipeline' + +}; + +module.exports = PIPELINE_CONST; + + +/***/ }), +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25713,7 +26153,7 @@ module.exports = WebGLPipeline; /***/ }), -/* 110 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25726,13 +26166,13 @@ module.exports = WebGLPipeline; var Class = __webpack_require__(0); var Earcut = __webpack_require__(60); var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(111); -var ProjectOrtho = __webpack_require__(183); -var ShaderSourceFS = __webpack_require__(811); -var ShaderSourceVS = __webpack_require__(812); +var ModelViewProjection = __webpack_require__(113); +var ProjectOrtho = __webpack_require__(185); +var ShaderSourceFS = __webpack_require__(810); +var ShaderSourceVS = __webpack_require__(811); var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); -var WebGLPipeline = __webpack_require__(109); +var WebGLPipeline = __webpack_require__(111); /** * @classdesc @@ -26134,7 +26574,7 @@ var MultiPipeline = new Class({ batchSprite: function (sprite, camera, parentTransformMatrix) { // Will cause a flush if this isn't the current pipeline, vertexbuffer or program - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var camMatrix = this._tempMatrix1; var spriteMatrix = this._tempMatrix2; @@ -26541,7 +26981,7 @@ var MultiPipeline = new Class({ { var renderer = this.renderer; - renderer.setPipeline(this, gameObject); + renderer.pipelines.set(this, gameObject); var camMatrix = this._tempMatrix1; var spriteMatrix = this._tempMatrix2; @@ -26693,7 +27133,7 @@ var MultiPipeline = new Class({ parentTransformMatrix ) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var spriteMatrix = this._tempMatrix1.copyFrom(transformMatrix); var calcMatrix = this._tempMatrix2; @@ -26782,7 +27222,7 @@ var MultiPipeline = new Class({ */ batchFillRect: function (x, y, width, height, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; @@ -26837,7 +27277,7 @@ var MultiPipeline = new Class({ */ batchFillTriangle: function (x0, y0, x1, y1, x2, y2, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; @@ -26924,7 +27364,7 @@ var MultiPipeline = new Class({ */ batchFillPath: function (path, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; @@ -27007,7 +27447,7 @@ var MultiPipeline = new Class({ */ batchStrokePath: function (path, lineWidth, pathOpen, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); // Reset the closePath booleans this.prevQuad[4] = 0; @@ -27053,7 +27493,7 @@ var MultiPipeline = new Class({ */ batchLine: function (ax, ay, bx, by, aLineWidth, bLineWidth, lineWidth, index, closePath, currentMatrix, parentMatrix) { - this.renderer.setPipeline(this); + this.renderer.pipelines.set(this); var calcMatrix = this._tempMatrix3; @@ -27160,7 +27600,7 @@ module.exports = MultiPipeline; /***/ }), -/* 111 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -27304,7 +27744,7 @@ module.exports = ModelViewProjection; /***/ }), -/* 112 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27316,7 +27756,7 @@ module.exports = ModelViewProjection; var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var ImageRender = __webpack_require__(990); +var ImageRender = __webpack_require__(994); /** * @classdesc @@ -27405,7 +27845,7 @@ module.exports = Image; /***/ }), -/* 113 */ +/* 115 */ /***/ (function(module, exports) { /** @@ -27434,7 +27874,7 @@ module.exports = HasValue; /***/ }), -/* 114 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27455,9 +27895,9 @@ module.exports = Bodies; var Vertices = __webpack_require__(88); var Common = __webpack_require__(44); var Body = __webpack_require__(64); -var Bounds = __webpack_require__(102); -var Vector = __webpack_require__(101); -var decomp = __webpack_require__(1400); +var Bounds = __webpack_require__(103); +var Vector = __webpack_require__(102); +var decomp = __webpack_require__(1404); (function() { @@ -27792,7 +28232,7 @@ var decomp = __webpack_require__(1400); /***/ }), -/* 115 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28105,7 +28545,7 @@ module.exports = Zone; /***/ }), -/* 116 */ +/* 118 */ /***/ (function(module, exports) { /** @@ -28133,7 +28573,7 @@ module.exports = Perimeter; /***/ }), -/* 117 */ +/* 119 */ /***/ (function(module, exports) { /** @@ -28162,7 +28602,7 @@ module.exports = GetColorFromValue; /***/ }), -/* 118 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28172,7 +28612,7 @@ module.exports = GetColorFromValue; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(292); +var Events = __webpack_require__(293); /** * @callback DataEachCallback @@ -28869,7 +29309,7 @@ module.exports = DataManager; /***/ }), -/* 119 */ +/* 121 */ /***/ (function(module, exports) { /** @@ -28910,7 +29350,7 @@ module.exports = Shuffle; /***/ }), -/* 120 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28925,22 +29365,23 @@ module.exports = Shuffle; module.exports = { - ADD_ANIMATION: __webpack_require__(649), - ANIMATION_COMPLETE: __webpack_require__(650), - ANIMATION_REPEAT: __webpack_require__(651), - ANIMATION_RESTART: __webpack_require__(652), - ANIMATION_START: __webpack_require__(653), - ANIMATION_STOP: __webpack_require__(654), - ANIMATION_UPDATE: __webpack_require__(655), - PAUSE_ALL: __webpack_require__(656), - REMOVE_ANIMATION: __webpack_require__(657), - RESUME_ALL: __webpack_require__(658) + ADD_ANIMATION: __webpack_require__(652), + ANIMATION_COMPLETE: __webpack_require__(653), + ANIMATION_COMPLETE_KEY: __webpack_require__(654), + ANIMATION_REPEAT: __webpack_require__(655), + ANIMATION_RESTART: __webpack_require__(656), + ANIMATION_START: __webpack_require__(657), + ANIMATION_STOP: __webpack_require__(658), + ANIMATION_UPDATE: __webpack_require__(659), + PAUSE_ALL: __webpack_require__(660), + REMOVE_ANIMATION: __webpack_require__(661), + RESUME_ALL: __webpack_require__(662) }; /***/ }), -/* 121 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28949,391 +29390,18 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(0); - -/** - * @callback EachMapCallback - * - * @param {string} key - The key of the Map entry. - * @param {E} entry - The value of the Map entry. - * - * @return {?boolean} The callback result. - */ - -/** - * @classdesc - * The keys of a Map can be arbitrary values. - * - * ```javascript - * var map = new Map([ - * [ 1, 'one' ], - * [ 2, 'two' ], - * [ 3, 'three' ] - * ]); - * ``` - * - * @class Map - * @memberof Phaser.Structs - * @constructor - * @since 3.0.0 - * - * @generic K - * @generic V - * @genericUse {V[]} - [elements] - * - * @param {Array.<*>} elements - An optional array of key-value pairs to populate this Map with. - */ -var Map = new Class({ - - initialize: - - function Map (elements) - { - /** - * The entries in this Map. - * - * @genericUse {Object.} - [$type] - * - * @name Phaser.Structs.Map#entries - * @type {Object.} - * @default {} - * @since 3.0.0 - */ - this.entries = {}; - - /** - * The number of key / value pairs in this Map. - * - * @name Phaser.Structs.Map#size - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.size = 0; - - if (Array.isArray(elements)) - { - for (var i = 0; i < elements.length; i++) - { - this.set(elements[i][0], elements[i][1]); - } - } - }, - - /** - * Adds an element with a specified `key` and `value` to this Map. - * If the `key` already exists, the value will be replaced. - * - * @method Phaser.Structs.Map#set - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {V} - [value] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {string} key - The key of the element to be added to this Map. - * @param {*} value - The value of the element to be added to this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - set: function (key, value) - { - if (!this.has(key)) - { - this.size++; - } - - this.entries[key] = value; - - return this; - }, - - /** - * Returns the value associated to the `key`, or `undefined` if there is none. - * - * @method Phaser.Structs.Map#get - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {V} - [$return] - * - * @param {string} key - The key of the element to return from the `Map` object. - * - * @return {*} The element associated with the specified key or `undefined` if the key can't be found in this Map object. - */ - get: function (key) - { - if (this.has(key)) - { - return this.entries[key]; - } - }, - - /** - * Returns an `Array` of all the values stored in this Map. - * - * @method Phaser.Structs.Map#getArray - * @since 3.0.0 - * - * @genericUse {V[]} - [$return] - * - * @return {Array.<*>} An array of the values stored in this Map. - */ - getArray: function () - { - var output = []; - var entries = this.entries; - - for (var key in entries) - { - output.push(entries[key]); - } - - return output; - }, - - /** - * Returns a boolean indicating whether an element with the specified key exists or not. - * - * @method Phaser.Structs.Map#has - * @since 3.0.0 - * - * @genericUse {K} - [key] - * - * @param {string} key - The key of the element to test for presence of in this Map. - * - * @return {boolean} Returns `true` if an element with the specified key exists in this Map, otherwise `false`. - */ - has: function (key) - { - return (this.entries.hasOwnProperty(key)); - }, - - /** - * Delete the specified element from this Map. - * - * @method Phaser.Structs.Map#delete - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {string} key - The key of the element to delete from this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - delete: function (key) - { - if (this.has(key)) - { - delete this.entries[key]; - this.size--; - } - - return this; - }, - - /** - * Delete all entries from this Map. - * - * @method Phaser.Structs.Map#clear - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @return {Phaser.Structs.Map} This Map object. - */ - clear: function () - { - Object.keys(this.entries).forEach(function (prop) - { - delete this.entries[prop]; - - }, this); - - this.size = 0; - - return this; - }, - - /** - * Returns all entries keys in this Map. - * - * @method Phaser.Structs.Map#keys - * @since 3.0.0 - * - * @genericUse {K[]} - [$return] - * - * @return {string[]} Array containing entries' keys. - */ - keys: function () - { - return Object.keys(this.entries); - }, - - /** - * Returns an `Array` of all entries. - * - * @method Phaser.Structs.Map#values - * @since 3.0.0 - * - * @genericUse {V[]} - [$return] - * - * @return {Array.<*>} An `Array` of entries. - */ - values: function () - { - var output = []; - var entries = this.entries; - - for (var key in entries) - { - output.push(entries[key]); - } - - return output; - }, - - /** - * Dumps the contents of this Map to the console via `console.group`. - * - * @method Phaser.Structs.Map#dump - * @since 3.0.0 - */ - dump: function () - { - var entries = this.entries; - - // eslint-disable-next-line no-console - console.group('Map'); - - for (var key in entries) - { - console.log(key, entries[key]); - } - - // eslint-disable-next-line no-console - console.groupEnd(); - }, - - /** - * Passes all entries in this Map to the given callback. - * - * @method Phaser.Structs.Map#each - * @since 3.0.0 - * - * @genericUse {EachMapCallback.} - [callback] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {EachMapCallback} callback - The callback which will receive the keys and entries held in this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - each: function (callback) - { - var entries = this.entries; - - for (var key in entries) - { - if (callback(key, entries[key]) === false) - { - break; - } - } - - return this; - }, - - /** - * Returns `true` if the value exists within this Map. Otherwise, returns `false`. - * - * @method Phaser.Structs.Map#contains - * @since 3.0.0 - * - * @genericUse {V} - [value] - * - * @param {*} value - The value to search for. - * - * @return {boolean} `true` if the value is found, otherwise `false`. - */ - contains: function (value) - { - var entries = this.entries; - - for (var key in entries) - { - if (entries[key] === value) - { - return true; - } - } - - return false; - }, - - /** - * Merges all new keys from the given Map into this one. - * If it encounters a key that already exists it will be skipped unless override is set to `true`. - * - * @method Phaser.Structs.Map#merge - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Map.} - [map,$return] - * - * @param {Phaser.Structs.Map} map - The Map to merge in to this Map. - * @param {boolean} [override=false] - Set to `true` to replace values in this Map with those from the source map, or `false` to skip them. - * - * @return {Phaser.Structs.Map} This Map object. - */ - merge: function (map, override) - { - if (override === undefined) { override = false; } - - var local = this.entries; - var source = map.entries; - - for (var key in source) - { - if (local.hasOwnProperty(key) && override) - { - local[key] = source[key]; - } - else - { - this.set(key, source[key]); - } - } - - return this; - } - -}); - -module.exports = Map; - - -/***/ }), -/* 122 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Back = __webpack_require__(314); -var Bounce = __webpack_require__(315); -var Circular = __webpack_require__(316); -var Cubic = __webpack_require__(317); -var Elastic = __webpack_require__(318); -var Expo = __webpack_require__(319); -var Linear = __webpack_require__(320); -var Quadratic = __webpack_require__(321); -var Quartic = __webpack_require__(322); -var Quintic = __webpack_require__(323); -var Sine = __webpack_require__(324); -var Stepped = __webpack_require__(325); +var Back = __webpack_require__(315); +var Bounce = __webpack_require__(316); +var Circular = __webpack_require__(317); +var Cubic = __webpack_require__(318); +var Elastic = __webpack_require__(319); +var Expo = __webpack_require__(320); +var Linear = __webpack_require__(321); +var Quadratic = __webpack_require__(322); +var Quartic = __webpack_require__(323); +var Quintic = __webpack_require__(324); +var Sine = __webpack_require__(325); +var Stepped = __webpack_require__(326); // EaseMap module.exports = { @@ -29394,7 +29462,7 @@ module.exports = { /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -29424,7 +29492,7 @@ module.exports = Linear; /***/ }), -/* 124 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -29593,10 +29661,10 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(751))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(755))) /***/ }), -/* 125 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29605,7 +29673,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(124); +var OS = __webpack_require__(125); /** * Determines the browser type and version running this Phaser Game instance. @@ -29706,7 +29774,7 @@ module.exports = init(); /***/ }), -/* 126 */ +/* 127 */ /***/ (function(module, exports) { /** @@ -29735,7 +29803,7 @@ module.exports = FloatBetween; /***/ }), -/* 127 */ +/* 128 */ /***/ (function(module, exports) { /** @@ -29765,7 +29833,7 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 128 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30310,7 +30378,7 @@ module.exports = Vector4; /***/ }), -/* 129 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30325,17 +30393,17 @@ module.exports = Vector4; module.exports = { - ADD: __webpack_require__(803), - ERROR: __webpack_require__(804), - LOAD: __webpack_require__(805), - READY: __webpack_require__(806), - REMOVE: __webpack_require__(807) + ADD: __webpack_require__(814), + ERROR: __webpack_require__(815), + LOAD: __webpack_require__(816), + READY: __webpack_require__(817), + REMOVE: __webpack_require__(818) }; /***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports) { /** @@ -30393,7 +30461,7 @@ module.exports = AddToDOM; /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, exports) { /** @@ -31299,7 +31367,7 @@ module.exports = KeyCodes; /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports) { /** @@ -31422,7 +31490,7 @@ module.exports = CONST; /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31467,7 +31535,7 @@ module.exports = Merge; /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31483,8 +31551,8 @@ var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(61); var GameEvents = __webpack_require__(21); var NOOP = __webpack_require__(1); -var GetAll = __webpack_require__(191); -var GetFirst = __webpack_require__(394); +var GetAll = __webpack_require__(193); +var GetFirst = __webpack_require__(395); /** * @classdesc @@ -32181,7 +32249,7 @@ module.exports = BaseSoundManager; /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32681,7 +32749,7 @@ module.exports = BaseSound; /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32690,10 +32758,10 @@ module.exports = BaseSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(192); +var ArrayUtils = __webpack_require__(194); var Class = __webpack_require__(0); var NOOP = __webpack_require__(1); -var StableSort = __webpack_require__(138); +var StableSort = __webpack_require__(139); /** * @callback EachListCallback @@ -33497,7 +33565,7 @@ module.exports = List; /***/ }), -/* 137 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33506,8 +33574,8 @@ module.exports = List; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CheckMatrix = __webpack_require__(193); -var TransposeMatrix = __webpack_require__(401); +var CheckMatrix = __webpack_require__(195); +var TransposeMatrix = __webpack_require__(402); /** * Rotates the array matrix based on the given rotation value. @@ -33569,7 +33637,7 @@ module.exports = RotateMatrix; /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports) { /** @@ -33745,7 +33813,7 @@ module.exports = StableSort; /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33758,12 +33826,12 @@ var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var GetColorFromValue = __webpack_require__(117); -var GetBitmapTextSize = __webpack_require__(965); -var ParseFromAtlas = __webpack_require__(966); -var ParseXMLBitmapFont = __webpack_require__(196); +var GetColorFromValue = __webpack_require__(119); +var GetBitmapTextSize = __webpack_require__(969); +var ParseFromAtlas = __webpack_require__(970); +var ParseXMLBitmapFont = __webpack_require__(198); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(967); +var Render = __webpack_require__(971); /** * @classdesc @@ -34873,7 +34941,7 @@ module.exports = BitmapText; /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35322,7 +35390,7 @@ module.exports = Set; /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35334,7 +35402,7 @@ module.exports = Set; var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1093); +var MeshRender = __webpack_require__(1097); var NOOP = __webpack_require__(1); /** @@ -35493,7 +35561,7 @@ module.exports = Mesh; /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports) { /** @@ -35531,7 +35599,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35639,7 +35707,7 @@ module.exports = InputPluginCache; /***/ }), -/* 144 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35654,19 +35722,19 @@ module.exports = InputPluginCache; module.exports = { - ANY_KEY_DOWN: __webpack_require__(1235), - ANY_KEY_UP: __webpack_require__(1236), - COMBO_MATCH: __webpack_require__(1237), - DOWN: __webpack_require__(1238), - KEY_DOWN: __webpack_require__(1239), - KEY_UP: __webpack_require__(1240), - UP: __webpack_require__(1241) + ANY_KEY_DOWN: __webpack_require__(1239), + ANY_KEY_UP: __webpack_require__(1240), + COMBO_MATCH: __webpack_require__(1241), + DOWN: __webpack_require__(1242), + KEY_DOWN: __webpack_require__(1243), + KEY_UP: __webpack_require__(1244), + UP: __webpack_require__(1245) }; /***/ }), -/* 145 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -35707,7 +35775,7 @@ module.exports = GetURL; /***/ }), -/* 146 */ +/* 147 */ /***/ (function(module, exports) { /** @@ -35777,7 +35845,7 @@ module.exports = XHRSettings; /***/ }), -/* 147 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35787,7 +35855,7 @@ module.exports = XHRSettings; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(226); +var Components = __webpack_require__(228); var Sprite = __webpack_require__(76); /** @@ -35878,7 +35946,7 @@ module.exports = ArcadeSprite; /***/ }), -/* 148 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35893,56 +35961,56 @@ module.exports = ArcadeSprite; module.exports = { - CalculateFacesAt: __webpack_require__(233), + CalculateFacesAt: __webpack_require__(235), CalculateFacesWithin: __webpack_require__(53), - Copy: __webpack_require__(1322), - CreateFromTiles: __webpack_require__(1323), - CullTiles: __webpack_require__(1324), - Fill: __webpack_require__(1325), - FilterTiles: __webpack_require__(1326), - FindByIndex: __webpack_require__(1327), - FindTile: __webpack_require__(1328), - ForEachTile: __webpack_require__(1329), - GetTileAt: __webpack_require__(149), - GetTileAtWorldXY: __webpack_require__(1330), + Copy: __webpack_require__(1326), + CreateFromTiles: __webpack_require__(1327), + CullTiles: __webpack_require__(1328), + Fill: __webpack_require__(1329), + FilterTiles: __webpack_require__(1330), + FindByIndex: __webpack_require__(1331), + FindTile: __webpack_require__(1332), + ForEachTile: __webpack_require__(1333), + GetTileAt: __webpack_require__(150), + GetTileAtWorldXY: __webpack_require__(1334), GetTilesWithin: __webpack_require__(24), - GetTilesWithinShape: __webpack_require__(1331), - GetTilesWithinWorldXY: __webpack_require__(1332), - HasTileAt: __webpack_require__(503), - HasTileAtWorldXY: __webpack_require__(1333), - IsInLayerBounds: __webpack_require__(103), - PutTileAt: __webpack_require__(234), - PutTileAtWorldXY: __webpack_require__(1334), - PutTilesAt: __webpack_require__(1335), - Randomize: __webpack_require__(1336), - RemoveTileAt: __webpack_require__(504), - RemoveTileAtWorldXY: __webpack_require__(1337), - RenderDebug: __webpack_require__(1338), - ReplaceByIndex: __webpack_require__(502), - SetCollision: __webpack_require__(1339), - SetCollisionBetween: __webpack_require__(1340), - SetCollisionByExclusion: __webpack_require__(1341), - SetCollisionByProperty: __webpack_require__(1342), - SetCollisionFromCollisionGroup: __webpack_require__(1343), - SetLayerCollisionIndex: __webpack_require__(152), + GetTilesWithinShape: __webpack_require__(1335), + GetTilesWithinWorldXY: __webpack_require__(1336), + HasTileAt: __webpack_require__(504), + HasTileAtWorldXY: __webpack_require__(1337), + IsInLayerBounds: __webpack_require__(104), + PutTileAt: __webpack_require__(236), + PutTileAtWorldXY: __webpack_require__(1338), + PutTilesAt: __webpack_require__(1339), + Randomize: __webpack_require__(1340), + RemoveTileAt: __webpack_require__(505), + RemoveTileAtWorldXY: __webpack_require__(1341), + RenderDebug: __webpack_require__(1342), + ReplaceByIndex: __webpack_require__(503), + SetCollision: __webpack_require__(1343), + SetCollisionBetween: __webpack_require__(1344), + SetCollisionByExclusion: __webpack_require__(1345), + SetCollisionByProperty: __webpack_require__(1346), + SetCollisionFromCollisionGroup: __webpack_require__(1347), + SetLayerCollisionIndex: __webpack_require__(153), SetTileCollision: __webpack_require__(65), - SetTileIndexCallback: __webpack_require__(1344), - SetTileLocationCallback: __webpack_require__(1345), - Shuffle: __webpack_require__(1346), - SwapByIndex: __webpack_require__(1347), - TileToWorldX: __webpack_require__(150), - TileToWorldXY: __webpack_require__(1348), - TileToWorldY: __webpack_require__(151), - WeightedRandomize: __webpack_require__(1349), + SetTileIndexCallback: __webpack_require__(1348), + SetTileLocationCallback: __webpack_require__(1349), + Shuffle: __webpack_require__(1350), + SwapByIndex: __webpack_require__(1351), + TileToWorldX: __webpack_require__(151), + TileToWorldXY: __webpack_require__(1352), + TileToWorldY: __webpack_require__(152), + WeightedRandomize: __webpack_require__(1353), WorldToTileX: __webpack_require__(66), - WorldToTileXY: __webpack_require__(1350), + WorldToTileXY: __webpack_require__(1354), WorldToTileY: __webpack_require__(67) }; /***/ }), -/* 149 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35951,7 +36019,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(103); +var IsInLayerBounds = __webpack_require__(104); /** * Gets a tile at the given tile coordinates from the given layer. @@ -35997,7 +36065,7 @@ module.exports = GetTileAt; /***/ }), -/* 150 */ +/* 151 */ /***/ (function(module, exports) { /** @@ -36041,7 +36109,7 @@ module.exports = TileToWorldX; /***/ }), -/* 151 */ +/* 152 */ /***/ (function(module, exports) { /** @@ -36085,7 +36153,7 @@ module.exports = TileToWorldY; /***/ }), -/* 152 */ +/* 153 */ /***/ (function(module, exports) { /** @@ -36123,7 +36191,7 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 153 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36184,7 +36252,7 @@ module.exports = CreateGroupLayer; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, exports) { /** @@ -36248,7 +36316,7 @@ module.exports = GetNewValue; /***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36257,17 +36325,17 @@ module.exports = GetNewValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(241); +var Defaults = __webpack_require__(243); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(90); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(154); -var GetProps = __webpack_require__(525); -var GetTargets = __webpack_require__(239); +var GetNewValue = __webpack_require__(155); +var GetProps = __webpack_require__(526); +var GetTargets = __webpack_require__(241); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(240); -var Tween = __webpack_require__(242); -var TweenData = __webpack_require__(244); +var GetValueOp = __webpack_require__(242); +var Tween = __webpack_require__(244); +var TweenData = __webpack_require__(246); /** * Creates a new Tween. @@ -36381,7 +36449,1791 @@ module.exports = TweenBuilder; /***/ }), -/* 156 */ +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CustomMap = __webpack_require__(92); +var GetFastValue = __webpack_require__(2); +var Events = __webpack_require__(122); +var Animation = __webpack_require__(172); + +/** + * @classdesc + * The Animation State Component. + * + * This component provides features to apply animations to Game Objects. It is responsible for + * loading, queuing animations for later playback, mixing between animations and setting + * the current animation frame to the Game Object that owns this component. + * + * This component lives as an instance within any Game Object that has it defined, such as Sprites. + * + * You can access its properties and methods via the `anims` property, i.e. `Sprite.anims`. + * + * As well as playing animations stored in the global Animation Manager, this component + * can also create animations that are stored locally within it. See the `create` method + * for more details. + * + * Prior to Phaser 3.50 this component was called just `Animation` and lived in the + * `Phaser.GameObjects.Components` namespace. It was renamed to `AnimationState` + * in 3.50 to help better identify its true purpose when browsing the documentation. + * + * @class AnimationState + * @memberof Phaser.Animations + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation component belongs. + */ +var AnimationState = new Class({ + + initialize: + + function AnimationState (parent) + { + /** + * The Game Object to which this animation component belongs. + * + * You can typically access this component from the Game Object + * via the `this.anims` property. + * + * @name Phaser.Animations.AnimationState#parent + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.Animations.AnimationState#animationManager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.animationManager = parent.scene.sys.anims; + + this.animationManager.on(Events.REMOVE_ANIMATION, this.globalRemove, this); + + /** + * A reference to the Texture Manager. + * + * @name Phaser.Animations.AnimationState#textureManager + * @type {Phaser.Textures.TextureManager} + * @protected + * @since 3.50.0 + */ + this.textureManager = this.animationManager.textureManager; + + /** + * The Animations stored locally in this Animation component. + * + * Do not modify the contents of this Map directly, instead use the + * `add`, `create` and `remove` methods of this class instead. + * + * @name Phaser.Animations.AnimationState#anims + * @type {Phaser.Structs.Map.} + * @protected + * @since 3.50.0 + */ + this.anims = null; + + /** + * Is an animation currently playing or not? + * + * @name Phaser.Animations.AnimationState#isPlaying + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.isPlaying = false; + + /** + * Has the current animation started playing, or is it waiting for a delay to expire? + * + * @name Phaser.Animations.AnimationState#hasStarted + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.hasStarted = false; + + /** + * The current Animation loaded into this Animation component. + * + * Will by `null` if no animation is yet loaded. + * + * @name Phaser.Animations.AnimationState#currentAnim + * @type {?Phaser.Animations.Animation} + * @default null + * @since 3.0.0 + */ + this.currentAnim = null; + + /** + * The current AnimationFrame being displayed by this Animation component. + * + * Will by `null` if no animation is yet loaded. + * + * @name Phaser.Animations.AnimationState#currentFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @since 3.0.0 + */ + this.currentFrame = null; + + /** + * The key, instance, or config of the next Animation to be loaded into this Animation component + * when the current animation completes. + * + * Will by `null` if no animation has been queued. + * + * @name Phaser.Animations.AnimationState#nextAnim + * @type {?(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} + * @default null + * @since 3.16.0 + */ + this.nextAnim = null; + + /** + * A queue of Animations to be loaded into this Animation component when the current animation completes. + * + * Populate this queue via the `chain` method. + * + * @name Phaser.Animations.AnimationState#nextAnimsQueue + * @type {array} + * @since 3.24.0 + */ + this.nextAnimsQueue = []; + + /** + * The Time Scale factor. + * + * You can adjust this value to modify the passage of time for the animation that is currently + * playing. For example, setting it to 2 will make the animation play twice as fast. Or setting + * it to 0.5 will slow the animation down. + * + * You can change this value at run-time, or set it via the `PlayAnimationConfig`. + * + * Prior to Phaser 3.50 this property was private and called `_timeScale`. + * + * @name Phaser.Animations.AnimationState#timeScale + * @type {number} + * @default 1 + * @since 3.50.0 + */ + this.timeScale = 1; + + /** + * The frame rate of playback, of the current animation, in frames per second. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the frame rate, provide a new value in the `PlayAnimationConfig` object. + * + * @name Phaser.Animations.AnimationState#frameRate + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.frameRate = 0; + + /** + * The duration of the current animation, in milliseconds. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the duration, provide a new value in the `PlayAnimationConfig` object. + * + * @name Phaser.Animations.AnimationState#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * The number of milliseconds per frame, not including frame specific modifiers that may be present in the + * Animation data. + * + * This value is calculated when a new animation is loaded into this component and should + * be treated as read-only. Changing it will not alter playback speed. + * + * @name Phaser.Animations.AnimationState#msPerFrame + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.msPerFrame = 0; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.Animations.AnimationState#skipMissedFrames + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.skipMissedFrames = true; + + /** + * The delay before starting playback of the current animation, in milliseconds. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the delay, provide a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_delay`. + * + * @name Phaser.Animations.AnimationState#delay + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.delay = 0; + + /** + * The number of times to repeat playback of the current animation. + * + * If -1, it means the animation will repeat forever. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the number of repeats, provide a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_repeat`. + * + * @name Phaser.Animations.AnimationState#repeat + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.repeat = 0; + + /** + * The number of milliseconds to wait before starting the repeat playback of the current animation. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * You can change the repeat delay by providing a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_repeatDelay`. + * + * @name Phaser.Animations.AnimationState#repeatDelay + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatDelay = 0; + + /** + * Should the current animation yoyo? An animation that yoyos will play in reverse, from the end + * to the start, before then repeating or completing. An animation that does not yoyo will just + * play from the start to the end. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * You can change the yoyo by providing a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_yoyo`. + * + * @name Phaser.Animations.AnimationState#yoyo + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.yoyo = false; + + /** + * Should the GameObject's `visible` property be set to `true` when the animation starts to play? + * + * This will happen _after_ any delay that may have been set. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is currently delayed. + * + * @name Phaser.Animations.AnimationState#showOnStart + * @type {boolean} + * @since 3.50.0 + */ + this.showOnStart = false; + + /** + * Should the GameObject's `visible` property be set to `false` when the animation completes? + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is still actively playing. + * + * @name Phaser.Animations.AnimationState#hideOnComplete + * @type {boolean} + * @since 3.50.0 + */ + this.hideOnComplete = false; + + /** + * Is the playhead moving forwards (`true`) or in reverse (`false`) ? + * + * @name Phaser.Animations.AnimationState#forward + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.forward = true; + + /** + * An internal trigger that tells the component if it should plays the animation + * in reverse mode ('true') or not ('false'). This is used because `forward` can + * be changed by the `yoyo` feature. + * + * Prior to Phaser 3.50 this property was private and called `_reverse`. + * + * @name Phaser.Animations.AnimationState#inReverse + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.inReverse = false; + + /** + * Internal time overflow accumulator. + * + * This has the `delta` time added to it as part of the `update` step. + * + * @name Phaser.Animations.AnimationState#accumulator + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.accumulator = 0; + + /** + * The time point at which the next animation frame will change. + * + * This value is compared against the `accumulator` as part of the `update` step. + * + * @name Phaser.Animations.AnimationState#nextTick + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.nextTick = 0; + + /** + * A counter keeping track of how much delay time, in milliseconds, is left before playback begins. + * + * This is set via the `playAfterDelay` method, although it can be modified at run-time + * if required, as long as the animation has not already started playing. + * + * @name Phaser.Animations.AnimationState#delayCounter + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.delayCounter = 0; + + /** + * A counter that keeps track of how many repeats are left to run. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * @name Phaser.Animations.AnimationState#repeatCounter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatCounter = 0; + + /** + * An internal flag keeping track of pending repeats. + * + * @name Phaser.Animations.AnimationState#pendingRepeat + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.pendingRepeat = false; + + /** + * Is the Animation paused? + * + * @name Phaser.Animations.AnimationState#_paused + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._paused = false; + + /** + * Was the animation previously playing before being paused? + * + * @name Phaser.Animations.AnimationState#_wasPlaying + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._wasPlaying = false; + + /** + * Internal property tracking if this Animation is waiting to stop. + * + * 0 = No + * 1 = Waiting for ms to pass + * 2 = Waiting for repeat + * 3 = Waiting for specific frame + * + * @name Phaser.Animations.AnimationState#_pendingStop + * @type {integer} + * @private + * @since 3.4.0 + */ + this._pendingStop = 0; + + /** + * Internal property used by _pendingStop. + * + * @name Phaser.Animations.AnimationState#_pendingStopValue + * @type {any} + * @private + * @since 3.4.0 + */ + this._pendingStopValue; + }, + + /** + * Sets an animation, or an array of animations, to be played in the future, after the current one completes or stops. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, + * or have one of the `stop` methods called. + * + * An animation set to repeat forever will never enter a completed state unless stopped. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event). + * + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. + * + * Call this method with no arguments to reset all currently chained animations. + * + * @method Phaser.Animations.AnimationState#chain + * @since 3.16.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + chain: function (key) + { + var parent = this.parent; + + if (key === undefined) + { + this.nextAnimsQueue.length = 0; + this.nextAnim = null; + + return parent; + } + + if (!Array.isArray(key)) + { + key = [ key ]; + } + + for (var i = 0; i < key.length; i++) + { + var anim = key[i]; + + if (this.nextAnim === null) + { + this.nextAnim = anim; + } + else + { + this.nextAnimsQueue.push(anim); + } + } + + return this.parent; + }, + + /** + * Returns the key of the animation currently loaded into this component. + * + * Prior to Phaser 3.50 this method was called `getCurrentKey`. + * + * @method Phaser.Animations.AnimationState#getName + * @since 3.50.0 + * + * @return {string} The key of the Animation currently loaded into this component, or an empty string if none loaded. + */ + getName: function () + { + return (this.currentAnim) ? this.currentAnim.key : ''; + }, + + /** + * Returns the key of the animation frame currently displayed by this component. + * + * @method Phaser.Animations.AnimationState#getFrameName + * @since 3.50.0 + * + * @return {string} The key of the Animation Frame currently displayed by this component, or an empty string if no animation has been loaded. + */ + getFrameName: function () + { + return (this.currentFrame) ? this.currentFrame.textureFrame : ''; + }, + + /** + * Internal method used to load an animation into this component. + * + * @method Phaser.Animations.AnimationState#load + * @protected + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + load: function (key) + { + if (this.isPlaying) + { + this.stop(); + } + + var manager = this.animationManager; + var animKey = (typeof key === 'string') ? key : GetFastValue(key, 'key', null); + + // Get the animation, first from the local map and, if not found, from the Animation Manager + var anim = (this.exists(animKey)) ? this.get(animKey) : manager.get(animKey); + + if (!anim) + { + console.warn('Missing animation: ' + animKey); + } + else + { + this.currentAnim = anim; + + // And now override the animation values, if set in the config. + + var totalFrames = anim.getTotalFrames(); + var frameRate = GetFastValue(key, 'frameRate', anim.frameRate); + var duration = GetFastValue(key, 'duration', anim.duration); + + anim.calculateDuration(this, totalFrames, duration, frameRate); + + this.delay = GetFastValue(key, 'delay', anim.delay); + this.repeat = GetFastValue(key, 'repeat', anim.repeat); + this.repeatDelay = GetFastValue(key, 'repeatDelay', anim.repeatDelay); + this.yoyo = GetFastValue(key, 'yoyo', anim.yoyo); + this.showOnStart = GetFastValue(key, 'showOnStart', anim.showOnStart); + this.hideOnComplete = GetFastValue(key, 'hideOnComplete', anim.hideOnComplete); + this.skipMissedFrames = GetFastValue(key, 'skipMissedFrames', anim.skipMissedFrames); + + this.timeScale = GetFastValue(key, 'timeScale', this.timeScale); + + var startFrame = GetFastValue(key, 'startFrame', 0); + + if (startFrame > anim.getTotalFrames()) + { + startFrame = 0; + } + + var frame = anim.frames[startFrame]; + + if (startFrame === 0 && !this.forward) + { + frame = anim.getLastFrame(); + } + + this.currentFrame = frame; + } + + return this.parent; + }, + + /** + * Pause the current animation and set the `isPlaying` property to `false`. + * You can optionally pause it at a specific frame. + * + * @method Phaser.Animations.AnimationState#pause + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + pause: function (atFrame) + { + if (!this._paused) + { + this._paused = true; + this._wasPlaying = this.isPlaying; + this.isPlaying = false; + } + + if (atFrame !== undefined) + { + this.setCurrentFrame(atFrame); + } + + return this.parent; + }, + + /** + * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. + * You can optionally tell it to start playback from a specific frame. + * + * @method Phaser.Animations.AnimationState#resume + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + resume: function (fromFrame) + { + if (this._paused) + { + this._paused = false; + this.isPlaying = this._wasPlaying; + } + + if (fromFrame !== undefined) + { + this.setCurrentFrame(fromFrame); + } + + return this.parent; + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the given animation. + * + * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here. + * + * If an animation is already running and a new animation is given to this method, it will wait for + * the given delay before starting the new animation. + * + * If no animation is currently running, the given one begins after the delay. + * + * Prior to Phaser 3.50 this method was called 'delayedPlay' and the parameters were in the reverse order. + * + * @method Phaser.Animations.AnimationState#playAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playAfterDelay: function (key, delay) + { + if (!this.isPlaying) + { + this.delayCounter = delay; + + this.play(key, true); + } + else + { + // If we've got a nextAnim, move it to the queue + var nextAnim = this.nextAnim; + var queue = this.nextAnimsQueue; + + if (nextAnim) + { + queue.unshift(nextAnim); + } + + this.nextAnim = key; + + this._pendingStop = 1; + this._pendingStopValue = delay; + } + + return this.parent; + }, + + /** + * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback + * of the given animation. + * + * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an + * idle animation to a walking animation, by making them blend smoothly into each other. + * + * If no animation is currently running, the given one will start immediately. + * + * @method Phaser.Animations.AnimationState#playAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} [repeatCount=1] - How many times should the animation repeat before the next one starts? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playAfterRepeat: function (key, repeatCount) + { + if (repeatCount === undefined) { repeatCount = 1; } + + if (!this.isPlaying) + { + this.play(key); + } + else + { + // If we've got a nextAnim, move it to the queue + var nextAnim = this.nextAnim; + var queue = this.nextAnimsQueue; + + if (nextAnim) + { + queue.unshift(nextAnim); + } + + if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) + { + repeatCount = this.repeatCounter; + } + + this.nextAnim = key; + + this._pendingStop = 2; + this._pendingStopValue = repeatCount; + } + + return this.parent; + }, + + /** + * Start playing the given animation on this Sprite. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).play('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. + * + * @method Phaser.Animations.AnimationState#play + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.0.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + play: function (key, ignoreIfPlaying) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + + var currentAnim = this.currentAnim; + var parent = this.parent; + + // Must be either an Animation instance, or a PlayAnimationConfig object + var animKey = (typeof key === 'string') ? key : key.key; + + if (ignoreIfPlaying && this.isPlaying && currentAnim.key === animKey) + { + return parent; + } + + // Are we mixing? + if (currentAnim && this.isPlaying) + { + var mix = this.animationManager.getMix(currentAnim.key, key); + + if (mix > 0) + { + return this.playAfterDelay(key, mix); + } + } + + this.forward = true; + this.inReverse = false; + + this._paused = false; + this._wasPlaying = true; + + return this.startAnimation(key); + }, + + /** + * Start playing the given animation on this Sprite, in reverse. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).playReverse('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. + * + * @method Phaser.Animations.AnimationState#playReverse + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.12.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playReverse: function (key, ignoreIfPlaying) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + + // Must be either an Animation instance, or a PlayAnimationConfig object + var animKey = (typeof key === 'string') ? key : key.key; + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === animKey) + { + return this.parent; + } + + this.forward = false; + this.inReverse = true; + + this._paused = false; + this._wasPlaying = true; + + return this.startAnimation(key); + }, + + /** + * Load the animation based on the key and set-up all of the internal values + * needed for playback to start. If there is no delay, it will also fire the start events. + * + * @method Phaser.Animations.AnimationState#startAnimation + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + startAnimation: function (key) + { + this.load(key); + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + // Should give us 9,007,199,254,740,991 safe repeats + this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; + + anim.getFirstTick(this); + + this.isPlaying = true; + this.pendingRepeat = false; + this.hasStarted = false; + + this._pendingStop = 0; + this._pendingStopValue = 0; + this._paused = false; + + // Add any delay the animation itself may have had as well + this.delayCounter += this.delay; + + if (this.delayCounter === 0) + { + this.handleStart(); + } + + return gameObject; + }, + + /** + * Handles the start of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleStart + * @private + * @since 3.50.0 + */ + handleStart: function () + { + if (this.showOnStart) + { + this.parent.setVisible(true); + } + + this.setCurrentFrame(this.currentFrame); + + this.hasStarted = true; + + this.emitEvents(Events.ANIMATION_START); + }, + + /** + * Handles the repeat of an animation. + * + * @method Phaser.Animations.AnimationState#handleRepeat + * @private + * @since 3.50.0 + */ + handleRepeat: function () + { + this.pendingRepeat = false; + + this.emitEvents(Events.ANIMATION_REPEAT); + }, + + /** + * Handles the stop of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleStop + * @private + * @since 3.50.0 + */ + handleStop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + this.emitEvents(Events.ANIMATION_STOP); + }, + + /** + * Handles the completion of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleComplete + * @private + * @since 3.50.0 + */ + handleComplete: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.hideOnComplete) + { + this.parent.setVisible(false); + } + + this.emitEvents(Events.ANIMATION_COMPLETE, Events.ANIMATION_COMPLETE_KEY); + }, + + /** + * Fires the given animation event. + * + * @method Phaser.Animations.AnimationState#emitEvents + * @private + * @since 3.50.0 + * + * @param {string} event - The Animation Event to dispatch. + */ + emitEvents: function (event, keyEvent) + { + var anim = this.currentAnim; + var frame = this.currentFrame; + var gameObject = this.parent; + + var frameKey = frame.textureFrame; + + gameObject.emit(event, anim, frame, gameObject, frameKey); + + if (keyEvent) + { + gameObject.emit(keyEvent + anim.key, anim, frame, gameObject, frameKey); + } + }, + + /** + * Reverse the Animation that is already playing on the Game Object. + * + * @method Phaser.Animations.AnimationState#reverse + * @since 3.12.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + reverse: function () + { + if (this.isPlaying) + { + this.inReverse = !this.inReverse; + + this.forward = !this.forward; + } + + return this.parent; + }, + + /** + * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. + * + * The value is based on the current frame and how far that is in the animation, it is not based on + * the duration of the animation. + * + * @method Phaser.Animations.AnimationState#getProgress + * @since 3.4.0 + * + * @return {number} The progress of the current animation in frames, between 0 and 1. + */ + getProgress: function () + { + var frame = this.currentFrame; + + if (!frame) + { + return 0; + } + + var p = frame.progress; + + if (this.inReverse) + { + p *= -1; + } + + return p; + }, + + /** + * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. + * + * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. + * + * The value is based on the current frame and how far that is in the animation, it is not based on + * the duration of the animation. + * + * @method Phaser.Animations.AnimationState#setProgress + * @since 3.4.0 + * + * @param {number} [value=0] - The progress value, between 0 and 1. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setProgress: function (value) + { + if (!this.forward) + { + value = 1 - value; + } + + this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); + + return this.parent; + }, + + /** + * Sets the number of times that the animation should repeat after its first play through. + * For example, if repeat is 1, the animation will play a total of twice: the initial play plus 1 repeat. + * + * To repeat indefinitely, use -1. + * The value should always be an integer. + * + * Calling this method only works if the animation is already running. Otherwise, any + * value specified here will be overwritten when the next animation loads in. To avoid this, + * use the `repeat` property of the `PlayAnimationConfig` object instead. + * + * @method Phaser.Animations.AnimationState#setRepeat + * @since 3.4.0 + * + * @param {integer} value - The number of times that the animation should repeat. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeat: function (value) + { + this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; + + return this.parent; + }, + + /** + * Handle the removal of an animation from the Animation Manager. + * + * @method Phaser.Animations.AnimationState#globalRemove + * @since 3.50.0 + * + * @param {string} [key] - The key of the removed Animation. + * @param {Phaser.Animations.Animation} [animation] - The removed Animation. + */ + globalRemove: function (key, animation) + { + if (animation === undefined) { animation = this.currentAnim; } + + if (this.isPlaying && animation.key === this.currentAnim.key) + { + this.stop(); + + this.setCurrentFrame(this.currentAnim.frames[0]); + } + }, + + /** + * Restarts the current animation from its beginning. + * + * You can optionally reset the delay and repeat counters as well. + * + * Calling this will fire the `ANIMATION_RESTART` event immediately. + * + * If you `includeDelay` then it will also fire the `ANIMATION_START` event once + * the delay has expired, otherwise, playback will just begin immediately. + * + * @method Phaser.Animations.AnimationState#restart + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @since 3.0.0 + * + * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. + * @param {boolean} [resetRepeats=false] - Whether to reset the repeat counter or not? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + restart: function (includeDelay, resetRepeats) + { + if (includeDelay === undefined) { includeDelay = false; } + if (resetRepeats === undefined) { resetRepeats = false; } + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + if (resetRepeats) + { + this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; + } + + anim.getFirstTick(this); + + this.emitEvents(Events.ANIMATION_RESTART); + + this.isPlaying = true; + this.pendingRepeat = false; + + // Set this to `true` if there is no delay to include, so it skips the `hasStarted` check in `update`. + this.hasStarted = !includeDelay; + + this._pendingStop = 0; + this._pendingStopValue = 0; + this._paused = false; + + this.setCurrentFrame(anim.frames[0]); + + return this.parent; + }, + + /** + * The current animation has completed. This dispatches the `ANIMATION_COMPLETE` event. + * + * This method is called by the Animation instance and should not usually be invoked directly. + * + * If no animation is loaded, no events will be dispatched. + * + * If another animation has been queued for playback, it will be started after the events fire. + * + * @method Phaser.Animations.AnimationState#complete + * @fires Phaser.Animations.Events#ANIMATION_COMPLETE + * @since 3.50.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + complete: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.currentAnim) + { + this.handleComplete(); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; + + this.play(key); + } + + return this.parent; + }, + + /** + * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing. + * + * @method Phaser.Animations.AnimationState#stop + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.0.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.currentAnim) + { + this.handleStop(); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = this.nextAnimsQueue.shift(); + + this.play(key); + } + + return this.parent; + }, + + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.Animations.AnimationState#stopAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterDelay: function (delay) + { + this._pendingStop = 1; + this._pendingStopValue = delay; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next repeats. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * Prior to Phaser 3.50 this method was called `stopOnRepeat` and had no parameters. + * + * @method Phaser.Animations.AnimationState#stopAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterRepeat: function (repeatCount) + { + if (repeatCount === undefined) { repeatCount = 1; } + + if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) + { + repeatCount = this.repeatCounter; + } + + this._pendingStop = 2; + this._pendingStopValue = repeatCount; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.Animations.AnimationState#stopOnFrame + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnFrame: function (frame) + { + this._pendingStop = 3; + this._pendingStopValue = frame; + + return this.parent; + }, + + /** + * Returns the total number of frames in this animation, or returns zero if no + * animation has been loaded. + * + * @method Phaser.Animations.AnimationState#getTotalFrames + * @since 3.4.0 + * + * @return {integer} The total number of frames in the current animation, or zero if no animation has been loaded. + */ + getTotalFrames: function () + { + return (this.currentAnim) ? this.currentAnim.getTotalFrames() : 0; + }, + + /** + * The internal update loop for the AnimationState Component. + * + * This is called automatically by the `Sprite.preUpdate` method. + * + * @method Phaser.Animations.AnimationState#update + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + var anim = this.currentAnim; + + if (!this.isPlaying || !anim || anim.paused) + { + return; + } + + this.accumulator += delta * this.timeScale; + + if (this._pendingStop === 1) + { + this._pendingStopValue -= delta; + + if (this._pendingStopValue <= 0) + { + return this.stop(); + } + } + + if (!this.hasStarted) + { + if (this.accumulator >= this.delayCounter) + { + this.accumulator -= this.delayCounter; + + this.handleStart(); + } + } + else if (this.accumulator >= this.nextTick) + { + // Process one frame advance as standard + + if (this.forward) + { + anim.nextFrame(this); + } + else + { + anim.previousFrame(this); + } + + // And only do more if we're skipping frames and have time left + if (this.isPlaying && this._pendingStop === 0 && this.skipMissedFrames && this.accumulator > this.nextTick) + { + var safetyNet = 0; + + do + { + if (this.forward) + { + anim.nextFrame(this); + } + else + { + anim.previousFrame(this); + } + + safetyNet++; + + } while (this.accumulator > this.nextTick && safetyNet < 60); + } + } + }, + + /** + * Sets the given Animation Frame as being the current frame + * and applies it to the parent Game Object, adjusting size and origin as needed. + * + * @method Phaser.Animations.AnimationState#setCurrentFrame + * @fires Phaser.Animations.Events#ANIMATION_UPDATE + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setCurrentFrame: function (animationFrame) + { + var gameObject = this.parent; + + this.currentFrame = animationFrame; + + gameObject.texture = animationFrame.frame.texture; + gameObject.frame = animationFrame.frame; + + if (gameObject.isCropped) + { + gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); + } + + if (animationFrame.setAlpha) + { + gameObject.alpha = animationFrame.alpha; + } + + gameObject.setSizeToFrame(); + + if (gameObject._originComponent) + { + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } + } + + if (this.isPlaying && this.hasStarted) + { + this.emitEvents(Events.ANIMATION_UPDATE); + + if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) + { + this.stop(); + } + } + + return gameObject; + }, + + /** + * Advances the animation to the next frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in reverse, calling this method doesn't then change the direction to forwards. + * + * @method Phaser.Animations.AnimationState#nextFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + nextFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.nextFrame(this); + } + + return this.parent; + }, + + /** + * Advances the animation to the previous frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in forwards, calling this method doesn't then change the direction to backwards. + * + * @method Phaser.Animations.AnimationState#previousFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + previousFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.previousFrame(this); + } + + return this.parent; + }, + + /** + * Get an Animation instance that has been created locally on this Sprite. + * + * See the `create` method for more details. + * + * @method Phaser.Animations.AnimationState#get + * @since 3.50.0 + * + * @param {string} key - The key of the Animation to retrieve. + * + * @return {Phaser.Animations.Animation} The Animation, or `undefined` if the key is invalid. + */ + get: function (key) + { + return (this.anims && this.anims.get(key)); + }, + + /** + * Checks to see if the given key is already used locally within the animations stored on this Sprite. + * + * @method Phaser.Animations.AnimationState#exists + * @since 3.50.0 + * + * @param {string} key - The key of the Animation to check. + * + * @return {boolean} `true` if the Animation exists locally, or `false` if the key is available. + */ + exists: function (key) + { + return (this.anims && this.anims.has(key)); + }, + + /** + * Creates a new Animation that is local specifically to this Sprite. + * + * When a Sprite owns an animation, it is kept out of the global Animation Manager, which means + * you're free to use keys that may be already defined there. Unless you specifically need a Sprite + * to have a unique animation, you should favor using global animations instead, as they allow for + * the same animation to be used across multiple Sprites, saving on memory. However, if this Sprite + * is the only one to use this animation, it's sensible to create it here. + * + * If an invalid key is given this method will return `false`. + * + * If you pass the key of an animation that already exists locally, that animation will be returned. + * + * A brand new animation is only created if the key is valid and not already in use by this Sprite. + * + * If you wish to re-use an existing key, call the `remove` method first, then this method. + * + * @method Phaser.Animations.AnimationState#create + * @since 3.50.0 + * + * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. + * + * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` if the key is already in use. + */ + create: function (config) + { + var key = config.key; + + var anim = false; + + if (key) + { + anim = this.get(key); + + if (!anim) + { + anim = new Animation(this, key, config); + + if (!this.anims) + { + this.anims = new CustomMap(); + } + + this.anims.set(key, anim); + } + } + + return anim; + }, + + /** + * Removes a locally created Animation from this Sprite, based on the given key. + * + * Once an Animation has been removed, this Sprite cannot play it again without re-creating it. + * + * @method Phaser.Animations.AnimationState#remove + * @since 3.50.0 + * + * @param {string} key - The key of the animation to remove. + * + * @return {Phaser.Animations.Animation} The Animation instance that was removed from this Sprite, if the key was valid. + */ + remove: function (key) + { + var anim = this.get(key); + + if (anim) + { + if (this.currentAnim === anim) + { + this.stop(); + } + + this.anims.delete(key); + } + + return anim; + }, + + /** + * Destroy this Animation component. + * + * Unregisters event listeners and cleans up its references. + * + * @method Phaser.Animations.AnimationState#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.animationManager.off(Events.REMOVE_ANIMATION, this.globalRemove, this); + + if (this.anims) + { + this.anims.clear(); + } + + this.animationManager = null; + this.parent = null; + this.nextAnim = null; + this.nextAnimsQueue.length = 0; + + this.currentAnim = null; + this.currentFrame = null; + }, + + /** + * `true` if the current animation is paused, otherwise `false`. + * + * @name Phaser.Animations.AnimationState#isPaused + * @readonly + * @type {boolean} + * @since 3.4.0 + */ + isPaused: { + + get: function () + { + return this._paused; + } + + } + +}); + +module.exports = AnimationState; + + +/***/ }), +/* 158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36399,9 +38251,9 @@ var Composite = {}; module.exports = Composite; -var Events = __webpack_require__(250); +var Events = __webpack_require__(251); var Common = __webpack_require__(44); -var Bounds = __webpack_require__(102); +var Bounds = __webpack_require__(103); var Body = __webpack_require__(64); (function() { @@ -37075,7 +38927,7 @@ var Body = __webpack_require__(64); /***/ }), -/* 157 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37114,7 +38966,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 158 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37158,7 +39010,7 @@ module.exports = Random; /***/ }), -/* 159 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37167,7 +39019,7 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(116); +var Perimeter = __webpack_require__(118); var Point = __webpack_require__(4); /** @@ -37239,7 +39091,7 @@ module.exports = GetPoint; /***/ }), -/* 160 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37304,7 +39156,7 @@ module.exports = GetPoints; /***/ }), -/* 161 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37344,7 +39196,7 @@ module.exports = Random; /***/ }), -/* 162 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37382,8 +39234,8 @@ module.exports = Random; /***/ }), -/* 163 */ -/***/ (function(module, exports) { +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -37391,6 +39243,8 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var PIPELINE_CONST = __webpack_require__(110); + /** * Provides methods used for setting the WebGL rendering pipeline of a Game Object. * @@ -37432,19 +39286,20 @@ var Pipeline = { * @webglOnly * @since 3.0.0 * - * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. + * @param {string} [name=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. * * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. */ - initPipeline: function (pipelineName) + initPipeline: function (name) { - if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } + if (name === undefined) { name = PIPELINE_CONST.MULTI_PIPELINE; } var renderer = this.scene.sys.game.renderer; + var pipelines = renderer.pipelines; - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + if (pipelines && pipelines.has(name)) { - this.defaultPipeline = renderer.getPipeline(pipelineName); + this.defaultPipeline = pipelines.get(name); this.pipeline = this.defaultPipeline; return true; @@ -37460,17 +39315,18 @@ var Pipeline = { * @webglOnly * @since 3.0.0 * - * @param {string} pipelineName - The name of the pipeline to set on this Game Object. + * @param {string} name - The name of the pipeline to set on this Game Object. * * @return {this} This Game Object instance. */ - setPipeline: function (pipelineName) + setPipeline: function (name) { var renderer = this.scene.sys.game.renderer; + var pipelines = renderer.pipelines; - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + if (pipelines && pipelines.has(name)) { - this.pipeline = renderer.getPipeline(pipelineName); + this.pipeline = pipelines.get(name); } return this; @@ -37512,7 +39368,7 @@ module.exports = Pipeline; /***/ }), -/* 164 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37567,7 +39423,7 @@ module.exports = TransformXY; /***/ }), -/* 165 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37608,7 +39464,7 @@ module.exports = Random; /***/ }), -/* 166 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37664,7 +39520,7 @@ module.exports = Random; /***/ }), -/* 167 */ +/* 169 */ /***/ (function(module, exports) { /** @@ -37705,7 +39561,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 168 */ +/* 170 */ /***/ (function(module, exports) { /** @@ -37744,7 +39600,7 @@ module.exports = SmootherStep; /***/ }), -/* 169 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -37791,7 +39647,7 @@ module.exports = SmoothStep; /***/ }), -/* 170 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37802,11 +39658,11 @@ module.exports = SmoothStep; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(120); -var FindClosestInSorted = __webpack_require__(297); -var Frame = __webpack_require__(298); +var Events = __webpack_require__(122); +var FindClosestInSorted = __webpack_require__(298); +var Frame = __webpack_require__(299); var GetValue = __webpack_require__(6); -var SortByDigits = __webpack_require__(299); +var SortByDigits = __webpack_require__(300); /** * @classdesc @@ -38705,7 +40561,7 @@ module.exports = Animation; /***/ }), -/* 171 */ +/* 173 */ /***/ (function(module, exports) { /** @@ -38781,7 +40637,7 @@ module.exports = Pad; /***/ }), -/* 172 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38790,10 +40646,10 @@ module.exports = Pad; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HexStringToColor = __webpack_require__(306); -var IntegerToColor = __webpack_require__(309); -var ObjectToColor = __webpack_require__(311); -var RGBStringToColor = __webpack_require__(312); +var HexStringToColor = __webpack_require__(307); +var IntegerToColor = __webpack_require__(310); +var ObjectToColor = __webpack_require__(312); +var RGBStringToColor = __webpack_require__(313); /** * Converts the given source color value into an instance of a Color class. @@ -38837,7 +40693,7 @@ module.exports = ValueToColor; /***/ }), -/* 173 */ +/* 175 */ /***/ (function(module, exports) { /** @@ -38867,7 +40723,7 @@ module.exports = GetColor; /***/ }), -/* 174 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38876,7 +40732,7 @@ module.exports = GetColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(173); +var GetColor = __webpack_require__(175); /** * RGB space conversion. @@ -38948,7 +40804,7 @@ module.exports = HSVToRGB; /***/ }), -/* 175 */ +/* 177 */ /***/ (function(module, exports) { /** @@ -39080,7 +40936,7 @@ module.exports = Smoothing(); /***/ }), -/* 176 */ +/* 178 */ /***/ (function(module, exports) { /** @@ -39117,7 +40973,7 @@ module.exports = CenterOn; /***/ }), -/* 177 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39126,8 +40982,8 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(124); -var Browser = __webpack_require__(125); +var OS = __webpack_require__(125); +var Browser = __webpack_require__(126); var CanvasPool = __webpack_require__(26); /** @@ -39309,7 +41165,7 @@ module.exports = init(); /***/ }), -/* 178 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39328,63 +41184,63 @@ var Extend = __webpack_require__(19); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(756), - Distance: __webpack_require__(765), - Easing: __webpack_require__(770), - Fuzzy: __webpack_require__(771), - Interpolation: __webpack_require__(774), - Pow2: __webpack_require__(779), - Snap: __webpack_require__(781), + Angle: __webpack_require__(760), + Distance: __webpack_require__(769), + Easing: __webpack_require__(774), + Fuzzy: __webpack_require__(775), + Interpolation: __webpack_require__(778), + Pow2: __webpack_require__(783), + Snap: __webpack_require__(785), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(783), + RandomDataGenerator: __webpack_require__(787), // Single functions - Average: __webpack_require__(784), - Bernstein: __webpack_require__(336), - Between: __webpack_require__(180), - CatmullRom: __webpack_require__(179), - CeilTo: __webpack_require__(785), + Average: __webpack_require__(788), + Bernstein: __webpack_require__(337), + Between: __webpack_require__(182), + CatmullRom: __webpack_require__(181), + CeilTo: __webpack_require__(789), Clamp: __webpack_require__(17), DegToRad: __webpack_require__(41), - Difference: __webpack_require__(786), - Factorial: __webpack_require__(337), - FloatBetween: __webpack_require__(126), - FloorTo: __webpack_require__(787), + Difference: __webpack_require__(790), + Factorial: __webpack_require__(338), + FloatBetween: __webpack_require__(127), + FloorTo: __webpack_require__(791), FromPercent: __webpack_require__(89), - GetSpeed: __webpack_require__(788), - IsEven: __webpack_require__(789), - IsEvenStrict: __webpack_require__(790), - Linear: __webpack_require__(123), - MaxAdd: __webpack_require__(791), - MinSub: __webpack_require__(792), - Percent: __webpack_require__(793), - RadToDeg: __webpack_require__(181), - RandomXY: __webpack_require__(794), - RandomXYZ: __webpack_require__(795), - RandomXYZW: __webpack_require__(796), - Rotate: __webpack_require__(343), - RotateAround: __webpack_require__(284), - RotateAroundDistance: __webpack_require__(167), - RotateTo: __webpack_require__(797), - RoundAwayFromZero: __webpack_require__(344), - RoundTo: __webpack_require__(798), - SinCosTableGenerator: __webpack_require__(799), - SmootherStep: __webpack_require__(168), - SmoothStep: __webpack_require__(169), - ToXY: __webpack_require__(800), - TransformXY: __webpack_require__(164), - Within: __webpack_require__(801), + GetSpeed: __webpack_require__(792), + IsEven: __webpack_require__(793), + IsEvenStrict: __webpack_require__(794), + Linear: __webpack_require__(124), + MaxAdd: __webpack_require__(795), + MinSub: __webpack_require__(796), + Percent: __webpack_require__(797), + RadToDeg: __webpack_require__(183), + RandomXY: __webpack_require__(798), + RandomXYZ: __webpack_require__(799), + RandomXYZW: __webpack_require__(800), + Rotate: __webpack_require__(344), + RotateAround: __webpack_require__(285), + RotateAroundDistance: __webpack_require__(169), + RotateTo: __webpack_require__(801), + RoundAwayFromZero: __webpack_require__(345), + RoundTo: __webpack_require__(802), + SinCosTableGenerator: __webpack_require__(803), + SmootherStep: __webpack_require__(170), + SmoothStep: __webpack_require__(171), + ToXY: __webpack_require__(804), + TransformXY: __webpack_require__(166), + Within: __webpack_require__(805), Wrap: __webpack_require__(59), // Vector classes Vector2: __webpack_require__(3), Vector3: __webpack_require__(81), - Vector4: __webpack_require__(128), - Matrix3: __webpack_require__(345), - Matrix4: __webpack_require__(346), - Quaternion: __webpack_require__(347), - RotateVec3: __webpack_require__(802) + Vector4: __webpack_require__(129), + Matrix3: __webpack_require__(346), + Matrix4: __webpack_require__(347), + Quaternion: __webpack_require__(348), + RotateVec3: __webpack_require__(806) }; @@ -39398,7 +41254,7 @@ module.exports = PhaserMath; /***/ }), -/* 179 */ +/* 181 */ /***/ (function(module, exports) { /** @@ -39435,7 +41291,7 @@ module.exports = CatmullRom; /***/ }), -/* 180 */ +/* 182 */ /***/ (function(module, exports) { /** @@ -39464,7 +41320,7 @@ module.exports = Between; /***/ }), -/* 181 */ +/* 183 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39494,7 +41350,7 @@ module.exports = RadToDeg; /***/ }), -/* 182 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39595,7 +41451,7 @@ module.exports = DefaultPlugins; /***/ }), -/* 183 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -39653,7 +41509,7 @@ module.exports = ProjectOrtho; /***/ }), -/* 184 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39739,7 +41595,7 @@ module.exports = FromPoints; /***/ }), -/* 185 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39750,10 +41606,10 @@ module.exports = FromPoints; var CONST = { - CENTER: __webpack_require__(369), - ORIENTATION: __webpack_require__(370), - SCALE_MODE: __webpack_require__(371), - ZOOM: __webpack_require__(372) + CENTER: __webpack_require__(370), + ORIENTATION: __webpack_require__(371), + SCALE_MODE: __webpack_require__(372), + ZOOM: __webpack_require__(373) }; @@ -39761,7 +41617,7 @@ module.exports = CONST; /***/ }), -/* 186 */ +/* 188 */ /***/ (function(module, exports) { /** @@ -39790,7 +41646,7 @@ module.exports = RemoveFromDOM; /***/ }), -/* 187 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -39888,7 +41744,7 @@ module.exports = INPUT_CONST; /***/ }), -/* 188 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39898,13 +41754,13 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(132); -var DefaultPlugins = __webpack_require__(182); +var CONST = __webpack_require__(133); +var DefaultPlugins = __webpack_require__(184); var Events = __webpack_require__(20); -var GetPhysicsPlugins = __webpack_require__(385); -var GetScenePlugins = __webpack_require__(386); +var GetPhysicsPlugins = __webpack_require__(386); +var GetScenePlugins = __webpack_require__(387); var NOOP = __webpack_require__(1); -var Settings = __webpack_require__(387); +var Settings = __webpack_require__(388); /** * @classdesc @@ -40662,7 +42518,7 @@ module.exports = Systems; /***/ }), -/* 189 */ +/* 191 */ /***/ (function(module, exports) { /** @@ -40699,7 +42555,7 @@ module.exports = UppercaseFirst; /***/ }), -/* 190 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40709,8 +42565,8 @@ module.exports = UppercaseFirst; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(96); -var TextureSource = __webpack_require__(390); +var Frame = __webpack_require__(97); +var TextureSource = __webpack_require__(391); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -41219,7 +43075,7 @@ module.exports = Texture; /***/ }), -/* 191 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41281,7 +43137,7 @@ module.exports = GetAll; /***/ }), -/* 192 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41296,46 +43152,46 @@ module.exports = GetAll; module.exports = { - Matrix: __webpack_require__(938), + Matrix: __webpack_require__(942), - Add: __webpack_require__(945), - AddAt: __webpack_require__(946), - BringToTop: __webpack_require__(947), - CountAllMatching: __webpack_require__(948), - Each: __webpack_require__(949), - EachInRange: __webpack_require__(950), - FindClosestInSorted: __webpack_require__(297), - GetAll: __webpack_require__(191), - GetFirst: __webpack_require__(394), - GetRandom: __webpack_require__(194), - MoveDown: __webpack_require__(951), - MoveTo: __webpack_require__(952), - MoveUp: __webpack_require__(953), - NumberArray: __webpack_require__(301), - NumberArrayStep: __webpack_require__(954), - QuickSelect: __webpack_require__(402), - Range: __webpack_require__(403), - Remove: __webpack_require__(95), - RemoveAt: __webpack_require__(955), - RemoveBetween: __webpack_require__(956), - RemoveRandomElement: __webpack_require__(957), - Replace: __webpack_require__(958), - RotateLeft: __webpack_require__(294), - RotateRight: __webpack_require__(295), + Add: __webpack_require__(949), + AddAt: __webpack_require__(950), + BringToTop: __webpack_require__(951), + CountAllMatching: __webpack_require__(952), + Each: __webpack_require__(953), + EachInRange: __webpack_require__(954), + FindClosestInSorted: __webpack_require__(298), + GetAll: __webpack_require__(193), + GetFirst: __webpack_require__(395), + GetRandom: __webpack_require__(196), + MoveDown: __webpack_require__(955), + MoveTo: __webpack_require__(956), + MoveUp: __webpack_require__(957), + NumberArray: __webpack_require__(302), + NumberArrayStep: __webpack_require__(958), + QuickSelect: __webpack_require__(403), + Range: __webpack_require__(404), + Remove: __webpack_require__(96), + RemoveAt: __webpack_require__(959), + RemoveBetween: __webpack_require__(960), + RemoveRandomElement: __webpack_require__(961), + Replace: __webpack_require__(962), + RotateLeft: __webpack_require__(295), + RotateRight: __webpack_require__(296), SafeRange: __webpack_require__(70), - SendToBack: __webpack_require__(959), - SetAll: __webpack_require__(960), - Shuffle: __webpack_require__(119), - SortByDigits: __webpack_require__(299), + SendToBack: __webpack_require__(963), + SetAll: __webpack_require__(964), + Shuffle: __webpack_require__(121), + SortByDigits: __webpack_require__(300), SpliceOne: __webpack_require__(82), - StableSort: __webpack_require__(138), - Swap: __webpack_require__(961) + StableSort: __webpack_require__(139), + Swap: __webpack_require__(965) }; /***/ }), -/* 193 */ +/* 195 */ /***/ (function(module, exports) { /** @@ -41396,7 +43252,7 @@ module.exports = CheckMatrix; /***/ }), -/* 194 */ +/* 196 */ /***/ (function(module, exports) { /** @@ -41431,7 +43287,7 @@ module.exports = GetRandom; /***/ }), -/* 195 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41442,7 +43298,7 @@ module.exports = GetRandom; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(404); +var Events = __webpack_require__(405); /** * @classdesc @@ -41734,7 +43590,7 @@ module.exports = ProcessQueue; /***/ }), -/* 196 */ +/* 198 */ /***/ (function(module, exports) { /** @@ -41895,7 +43751,7 @@ module.exports = ParseXMLBitmapFont; /***/ }), -/* 197 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41904,13 +43760,13 @@ module.exports = ParseXMLBitmapFont; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(971); -var Bob = __webpack_require__(406); +var BlitterRender = __webpack_require__(975); +var Bob = __webpack_require__(407); var Class = __webpack_require__(0); var Components = __webpack_require__(11); -var Frame = __webpack_require__(96); +var Frame = __webpack_require__(97); var GameObject = __webpack_require__(14); -var List = __webpack_require__(136); +var List = __webpack_require__(137); /** * @callback CreateCallback @@ -42194,7 +44050,7 @@ module.exports = Blitter; /***/ }), -/* 198 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42204,7 +44060,7 @@ module.exports = Blitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(192); +var ArrayUtils = __webpack_require__(194); var BlendModes = __webpack_require__(54); var Class = __webpack_require__(0); var Components = __webpack_require__(11); @@ -42212,8 +44068,8 @@ var Events = __webpack_require__(29); var GameObject = __webpack_require__(14); var GameObjectEvents = __webpack_require__(29); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(974); -var Union = __webpack_require__(407); +var Render = __webpack_require__(978); +var Union = __webpack_require__(408); var Vector2 = __webpack_require__(3); /** @@ -43559,7 +45415,7 @@ module.exports = Container; /***/ }), -/* 199 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43568,9 +45424,9 @@ module.exports = Container; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(139); +var BitmapText = __webpack_require__(140); var Class = __webpack_require__(0); -var Render = __webpack_require__(979); +var Render = __webpack_require__(983); /** * @classdesc @@ -43792,7 +45648,7 @@ module.exports = DynamicBitmapText; /***/ }), -/* 200 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43801,26 +45657,26 @@ module.exports = DynamicBitmapText; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(92); +var BaseCamera = __webpack_require__(93); var Class = __webpack_require__(0); -var Commands = __webpack_require__(201); -var ComponentsAlpha = __webpack_require__(279); -var ComponentsBlendMode = __webpack_require__(280); -var ComponentsDepth = __webpack_require__(281); -var ComponentsMask = __webpack_require__(285); -var ComponentsPipeline = __webpack_require__(163); -var ComponentsTransform = __webpack_require__(290); -var ComponentsVisible = __webpack_require__(291); -var ComponentsScrollFactor = __webpack_require__(288); +var Commands = __webpack_require__(203); +var ComponentsAlpha = __webpack_require__(280); +var ComponentsBlendMode = __webpack_require__(281); +var ComponentsDepth = __webpack_require__(282); +var ComponentsMask = __webpack_require__(286); +var ComponentsPipeline = __webpack_require__(165); +var ComponentsTransform = __webpack_require__(291); +var ComponentsVisible = __webpack_require__(292); +var ComponentsScrollFactor = __webpack_require__(289); var TransformMatrix = __webpack_require__(31); -var Ellipse = __webpack_require__(97); +var Ellipse = __webpack_require__(98); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(985); +var Render = __webpack_require__(989); /** * @classdesc @@ -45346,7 +47202,7 @@ module.exports = Graphics; /***/ }), -/* 201 */ +/* 203 */ /***/ (function(module, exports) { /** @@ -45383,7 +47239,7 @@ module.exports = { /***/ }), -/* 202 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45425,7 +47281,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 203 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45438,10 +47294,10 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GameObjectEvents = __webpack_require__(29); -var GravityWell = __webpack_require__(416); -var List = __webpack_require__(136); -var ParticleEmitter = __webpack_require__(418); -var Render = __webpack_require__(994); +var GravityWell = __webpack_require__(417); +var List = __webpack_require__(137); +var ParticleEmitter = __webpack_require__(419); +var Render = __webpack_require__(998); /** * @classdesc @@ -45930,7 +47786,7 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 204 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45940,18 +47796,18 @@ module.exports = ParticleEmitterManager; */ var BlendModes = __webpack_require__(54); -var Camera = __webpack_require__(92); +var Camera = __webpack_require__(93); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(11); var CONST = __webpack_require__(34); -var Frame = __webpack_require__(96); +var Frame = __webpack_require__(97); var GameObject = __webpack_require__(14); var NOOP = __webpack_require__(1); -var ProjectOrtho = __webpack_require__(183); -var Render = __webpack_require__(998); +var ProjectOrtho = __webpack_require__(185); +var Render = __webpack_require__(1002); var Utils = __webpack_require__(10); -var UUID = __webpack_require__(205); +var UUID = __webpack_require__(207); /** * @classdesc @@ -47202,7 +49058,7 @@ module.exports = RenderTexture; /***/ }), -/* 205 */ +/* 207 */ /***/ (function(module, exports) { /** @@ -47237,7 +49093,7 @@ module.exports = UUID; /***/ }), -/* 206 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -47246,11 +49102,13 @@ module.exports = UUID; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var AnimationState = __webpack_require__(157); var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GameObjectEvents = __webpack_require__(29); -var RopeRender = __webpack_require__(1004); +var PIPELINE_CONST = __webpack_require__(110); +var RopeRender = __webpack_require__(1008); var Vector2 = __webpack_require__(3); /** @@ -47325,13 +49183,13 @@ var Rope = new Class({ GameObject.call(this, scene, 'Rope'); /** - * The Animation Controller of this Rope. + * The Animation State of this Rope. * * @name Phaser.GameObjects.Rope#anims - * @type {Phaser.GameObjects.Components.Animation} + * @type {Phaser.Animation.AnimationState} * @since 3.23.0 */ - this.anims = new Components.Animation(this); + this.anims = new AnimationState(this); /** * An array containing the points data for this Rope. @@ -47516,7 +49374,7 @@ var Rope = new Class({ this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); - this.initPipeline('RopePipeline'); + this.initPipeline(PIPELINE_CONST.ROPE_PIPELINE); if (Array.isArray(points)) { @@ -48366,7 +50224,7 @@ module.exports = Rope; /***/ }), -/* 207 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48375,17 +50233,17 @@ module.exports = Rope; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(130); +var AddToDOM = __webpack_require__(131); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var GetTextSize = __webpack_require__(424); +var GetTextSize = __webpack_require__(425); var GetValue = __webpack_require__(6); -var RemoveFromDOM = __webpack_require__(186); -var TextRender = __webpack_require__(1007); -var TextStyle = __webpack_require__(425); +var RemoveFromDOM = __webpack_require__(188); +var TextRender = __webpack_require__(1011); +var TextStyle = __webpack_require__(426); /** * @classdesc @@ -49778,7 +51636,7 @@ module.exports = Text; /***/ }), -/* 208 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49792,9 +51650,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var GetPowerOfTwo = __webpack_require__(341); -var Smoothing = __webpack_require__(175); -var TileSpriteRender = __webpack_require__(1010); +var GetPowerOfTwo = __webpack_require__(342); +var Smoothing = __webpack_require__(177); +var TileSpriteRender = __webpack_require__(1014); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -50430,7 +52288,7 @@ module.exports = TileSprite; /***/ }), -/* 209 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50446,8 +52304,8 @@ var Events = __webpack_require__(29); var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); var SoundEvents = __webpack_require__(61); -var UUID = __webpack_require__(205); -var VideoRender = __webpack_require__(1013); +var UUID = __webpack_require__(207); +var VideoRender = __webpack_require__(1017); var MATH_CONST = __webpack_require__(13); /** @@ -52199,7 +54057,7 @@ module.exports = Video; /***/ }), -/* 210 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52209,8 +54067,8 @@ module.exports = Video; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(211); -var GetPoints = __webpack_require__(436); +var Contains = __webpack_require__(213); +var GetPoints = __webpack_require__(437); var GEOM_CONST = __webpack_require__(49); /** @@ -52433,7 +54291,7 @@ module.exports = Polygon; /***/ }), -/* 211 */ +/* 213 */ /***/ (function(module, exports) { /** @@ -52482,7 +54340,7 @@ module.exports = Contains; /***/ }), -/* 212 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52492,7 +54350,7 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(141); +var Mesh = __webpack_require__(142); /** * @classdesc @@ -53143,7 +55001,7 @@ module.exports = Quad; /***/ }), -/* 213 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53157,51 +55015,51 @@ var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var Extend = __webpack_require__(19); -var SetValue = __webpack_require__(444); -var ShaderRender = __webpack_require__(1096); +var SetValue = __webpack_require__(445); +var ShaderRender = __webpack_require__(1100); var TransformMatrix = __webpack_require__(31); /** * @classdesc * A Shader Game Object. - * + * * This Game Object allows you to easily add a quad with its own shader into the display list, and manipulate it * as you would any other Game Object, including scaling, rotating, positioning and adding to Containers. Shaders * can be masked with either Bitmap or Geometry masks and can also be used as a Bitmap Mask for a Camera or other * Game Object. They can also be made interactive and used for input events. - * + * * It works by taking a reference to a `Phaser.Display.BaseShader` instance, as found in the Shader Cache. These can * be created dynamically at runtime, or loaded in via the GLSL File Loader: - * + * * ```javascript * function preload () * { * this.load.glsl('fire', 'shaders/fire.glsl.js'); * } - * + * * function create () * { * this.add.shader('fire', 400, 300, 512, 512); * } * ``` - * + * * Please see the Phaser 3 Examples GitHub repo for examples of loading and creating shaders dynamically. - * + * * Due to the way in which they work, you cannot directly change the alpha or blend mode of a Shader. This should * be handled via exposed uniforms in the shader code itself. - * + * * By default a Shader will be created with a standard set of uniforms. These were added to match those * found on sites such as ShaderToy or GLSLSandbox, and provide common functionality a shader may need, * such as the timestamp, resolution or pointer position. You can replace them by specifying your own uniforms * in the Base Shader. - * + * * These Shaders work by halting the current pipeline during rendering, creating a viewport matched to the * size of this Game Object and then renders a quad using the bound shader. At the end, the pipeline is restored. - * + * * Because it blocks the pipeline it means it will interrupt any batching that is currently going on, so you should * use these Game Objects sparingly. If you need to have a fully batched custom shader, then please look at using * a custom pipeline instead. However, for background or special masking effects, they are extremely effective. - * + * * @class Shader * @extends Phaser.GameObjects.GameObject * @memberof Phaser.GameObjects @@ -53256,7 +55114,7 @@ var Shader = new Class({ /** * This Game Object cannot have a blend mode, so skip all checks. - * + * * @name Phaser.GameObjects.Shader#blendMode * @type {integer} * @private @@ -53267,7 +55125,7 @@ var Shader = new Class({ /** * The underlying shader object being used. * Empty by default and set during a call to the `setShader` method. - * + * * @name Phaser.GameObjects.Shader#shader * @type {Phaser.Display.BaseShader} * @since 3.17.0 @@ -53279,7 +55137,7 @@ var Shader = new Class({ /** * A reference to the current renderer. * Shaders only work with the WebGL Renderer. - * + * * @name Phaser.GameObjects.Shader#renderer * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} * @since 3.17.0 @@ -53372,7 +55230,7 @@ var Shader = new Class({ /** * The view matrix the shader uses during rendering. - * + * * @name Phaser.GameObjects.Shader#viewMatrix * @type {Float32Array} * @readonly @@ -53382,7 +55240,7 @@ var Shader = new Class({ /** * The projection matrix the shader uses during rendering. - * + * * @name Phaser.GameObjects.Shader#projectionMatrix * @type {Float32Array} * @readonly @@ -53393,16 +55251,16 @@ var Shader = new Class({ /** * The default uniform mappings. These can be added to (or replaced) by specifying your own uniforms when * creating this shader game object. The uniforms are updated automatically during the render step. - * + * * The defaults are: - * + * * `resolution` (2f) - Set to the size of this shader. * `time` (1f) - The elapsed game time, in seconds. * `mouse` (2f) - If a pointer has been bound (with `setPointer`), this uniform contains its position each frame. * `date` (4fv) - A vec4 containing the year, month, day and time in seconds. * `sampleRate` (1f) - Sound sample rate. 44100 by default. * `iChannel0...3` (sampler2D) - Input channels 0 to 3. `null` by default. - * + * * @name Phaser.GameObjects.Shader#uniforms * @type {any} * @since 3.17.0 @@ -53412,7 +55270,7 @@ var Shader = new Class({ /** * The pointer bound to this shader, if any. * Set via the chainable `setPointer` method, or by modifying this property directly. - * + * * @name Phaser.GameObjects.Shader#pointer * @type {Phaser.Input.Pointer} * @since 3.17.0 @@ -53421,7 +55279,7 @@ var Shader = new Class({ /** * The cached width of the renderer. - * + * * @name Phaser.GameObjects.Shader#_rendererWidth * @type {number} * @private @@ -53431,7 +55289,7 @@ var Shader = new Class({ /** * The cached height of the renderer. - * + * * @name Phaser.GameObjects.Shader#_rendererHeight * @type {number} * @private @@ -53441,7 +55299,7 @@ var Shader = new Class({ /** * Internal texture count tracker. - * + * * @name Phaser.GameObjects.Shader#_textureCount * @type {number} * @private @@ -53471,9 +55329,9 @@ var Shader = new Class({ /** * A flag that indicates if this Shader has been set to render to a texture instead of the display list. - * + * * This property is `true` if you have called `Shader.setRenderToTexture`, otherwise it's `false`. - * + * * A Shader that is rendering to a texture _does not_ appear on the display list. * * @name Phaser.GameObjects.Shader#renderToTexture @@ -53485,7 +55343,7 @@ var Shader = new Class({ /** * A reference to the Phaser.Textures.Texture that has been stored in the Texture Manager for this Shader. - * + * * This property is only set if you have called `Shader.setRenderToTexture`, otherwise it is `null`. * * @name Phaser.GameObjects.Shader#texture @@ -53528,28 +55386,28 @@ var Shader = new Class({ * WebGL Framebuffer and WebGL Texture instead. This allows you to use the output * of this shader as an input for another shader, by mapping a sampler2D uniform * to it. - * + * * After calling this method the `Shader.framebuffer` and `Shader.glTexture` properties * are populated. - * + * * Additionally, you can provide a key to this method. Doing so will create a Phaser Texture * from this Shader and save it into the Texture Manager, allowing you to then use it for * any texture-based Game Object, such as a Sprite or Image: - * + * * ```javascript * var shader = this.add.shader('myShader', x, y, width, height); - * + * * shader.setRenderToTexture('doodle'); - * + * * this.add.image(400, 300, 'doodle'); * ``` - * + * * Note that it stores an active reference to this Shader. That means as this shader updates, * so does the texture and any object using it to render with. Also, if you destroy this * shader, be sure to clear any objects that may have been using it as a texture too. - * + * * You can access the Phaser Texture that is created via the `Shader.texture` property. - * + * * By default it will create a single base texture. You can add frames to the texture * by using the `Texture.add` method. After doing this, you can then allow Game Objects * to use a specific frame from a Render Texture. @@ -53595,16 +55453,14 @@ var Shader = new Class({ if (this.shader) { - var pipeline = renderer.currentPipeline; + renderer.pipelines.clear(); - renderer.clearPipeline(); - this.load(); this.flush(); - - renderer.rebindPipeline(pipeline); + + renderer.pipelines.rebind(); } - + return this; }, @@ -53615,11 +55471,11 @@ var Shader = new Class({ * * @method Phaser.GameObjects.Shader#setShader * @since 3.17.0 - * + * * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance. * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setShader: function (key, textures, textureData) @@ -53635,7 +55491,7 @@ var Shader = new Class({ console.warn('Shader missing: ' + key); return this; } - + this.shader = cache.get(key); } else @@ -53674,7 +55530,7 @@ var Shader = new Class({ iChannel2: { type: 'sampler2D', value: null, textureData: { repeat: true } }, iChannel3: { type: 'sampler2D', value: null, textureData: { repeat: true } } }; - + if (this.shader.uniforms) { this.uniforms = Extend(true, {}, this.shader.uniforms, defaultUniforms); @@ -53701,15 +55557,15 @@ var Shader = new Class({ /** * Binds a Phaser Pointer object to this Shader. - * + * * The screen position of the pointer will be set in to the shaders `mouse` uniform * automatically every frame. Call this method with no arguments to unbind the pointer. * * @method Phaser.GameObjects.Shader#setPointer * @since 3.17.0 - * + * * @param {Phaser.Input.Pointer} [pointer] - The Pointer to bind to this shader. - * + * * @return {this} This Shader instance. */ setPointer: function (pointer) @@ -53723,7 +55579,7 @@ var Shader = new Class({ * Sets this shader to use an orthographic projection matrix. * This matrix is stored locally in the `projectionMatrix` property, * as well as being bound to the `uProjectionMatrix` uniform. - * + * * @method Phaser.GameObjects.Shader#projOrtho * @since 3.17.0 * @@ -53763,7 +55619,7 @@ var Shader = new Class({ /** * Initializes all of the uniforms this shader uses. - * + * * @method Phaser.GameObjects.Shader#initUniforms * @private * @since 3.17.0 @@ -53796,33 +55652,33 @@ var Shader = new Class({ /** * Sets a sampler2D uniform on this shader where the source texture is a WebGLTexture. - * + * * This allows you to feed the output from one Shader into another: - * + * * ```javascript * let shader1 = this.add.shader(baseShader1, 0, 0, 512, 512).setRenderToTexture(); * let shader2 = this.add.shader(baseShader2, 0, 0, 512, 512).setRenderToTexture('output'); - * + * * shader1.setSampler2DBuffer('iChannel0', shader2.glTexture, 512, 512); * shader2.setSampler2DBuffer('iChannel0', shader1.glTexture, 512, 512); * ``` - * + * * In the above code, the result of baseShader1 is fed into Shader2 as the `iChannel0` sampler2D uniform. * The result of baseShader2 is then fed back into shader1 again, creating a feedback loop. - * + * * If you wish to use an image from the Texture Manager as a sampler2D input for this shader, * see the `Shader.setSampler2D` method. - * + * * @method Phaser.GameObjects.Shader#setSampler2DBuffer * @since 3.19.0 - * + * * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`. * @param {WebGLTexture} texture - A WebGLTexture reference. * @param {integer} width - The width of the texture. * @param {integer} height - The height of the texture. * @param {integer} [textureIndex=0] - The texture index. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setSampler2DBuffer: function (uniformKey, texture, width, height, textureIndex, textureData) @@ -53848,20 +55704,20 @@ var Shader = new Class({ /** * Sets a sampler2D uniform on this shader. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * If you wish to use another Shader as a sampler2D input for this shader, see the `Shader.setSampler2DBuffer` method. - * + * * @method Phaser.GameObjects.Shader#setSampler2D * @since 3.17.0 - * + * * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`. * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {integer} [textureIndex=0] - The texture index. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setSampler2D: function (uniformKey, textureKey, textureIndex, textureData) @@ -53906,27 +55762,27 @@ var Shader = new Class({ /** * Sets a property of a uniform already present on this shader. - * + * * To modify the value of a uniform such as a 1f or 1i use the `value` property directly: - * + * * ```javascript * shader.setUniform('size.value', 16); * ``` - * + * * You can use dot notation to access deeper values, for example: - * + * * ```javascript * shader.setUniform('resolution.value.x', 512); * ``` - * + * * The change to the uniform will take effect the next time the shader is rendered. - * + * * @method Phaser.GameObjects.Shader#setUniform * @since 3.17.0 - * + * * @param {string} key - The key of the uniform to modify. Use dots for deep properties, i.e. `resolution.value.x`. * @param {any} value - The value to set into the uniform. - * + * * @return {this} This Shader instance. */ setUniform: function (key, value) @@ -53938,12 +55794,12 @@ var Shader = new Class({ /** * Returns the uniform object for the given key, or `null` if the uniform couldn't be found. - * + * * @method Phaser.GameObjects.Shader#getUniform * @since 3.17.0 - * + * * @param {string} key - The key of the uniform to return the value for. - * + * * @return {any} A reference to the uniform object. This is not a copy, so modifying it will update the original object also. */ getUniform: function (key) @@ -53953,16 +55809,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel0` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel0 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel0: function (textureKey, textureData) @@ -53972,16 +55828,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel1` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel1 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel1: function (textureKey, textureData) @@ -53991,16 +55847,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel2` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel2 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel2: function (textureKey, textureData) @@ -54010,16 +55866,16 @@ var Shader = new Class({ /** * A short-cut method that will directly set the texture being used by the `iChannel3` sampler2D uniform. - * + * * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized. - * + * * @method Phaser.GameObjects.Shader#setChannel3 * @since 3.17.0 - * + * * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded. * @param {any} [textureData] - Additional texture data. - * + * * @return {this} This Shader instance. */ setChannel3: function (textureKey, textureData) @@ -54030,11 +55886,11 @@ var Shader = new Class({ /** * Internal method that takes a sampler2D uniform and prepares it for use by setting the * gl texture parameters. - * + * * @method Phaser.GameObjects.Shader#initSampler2D * @private * @since 3.17.0 - * + * * @param {any} uniform - The sampler2D uniform to process. */ initSampler2D: function (uniform) @@ -54048,7 +55904,7 @@ var Shader = new Class({ gl.activeTexture(gl.TEXTURE0 + this._textureCount); gl.bindTexture(gl.TEXTURE_2D, uniform.value); - + // Extended texture data var data = uniform.textureData; @@ -54056,11 +55912,11 @@ var Shader = new Class({ if (data) { // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D - + // mag / minFilter can be: gl.LINEAR, gl.LINEAR_MIPMAP_LINEAR or gl.NEAREST // wrapS/T can be: gl.CLAMP_TO_EDGE or gl.REPEAT // format can be: gl.LUMINANCE or gl.RGBA - + var magFilter = gl[GetFastValue(data, 'magFilter', 'linear').toUpperCase()]; var minFilter = gl[GetFastValue(data, 'minFilter', 'linear').toUpperCase()]; var wrapS = gl[GetFastValue(data, 'wrapS', 'repeat').toUpperCase()]; @@ -54080,7 +55936,7 @@ var Shader = new Class({ var width = GetFastValue(data, 'width', 512); var height = GetFastValue(data, 'height', 2); var border = GetFastValue(data, 'border', 0); - + // texImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, ArrayBufferView? pixels) gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, border, format, gl.UNSIGNED_BYTE, null); } @@ -54089,7 +55945,7 @@ var Shader = new Class({ // texImage2D(GLenum target, GLint level, GLenum internalformat, GLenum format, GLenum type, ImageData? pixels) gl.texImage2D(gl.TEXTURE_2D, 0, format, gl.RGBA, gl.UNSIGNED_BYTE, uniform.source); } - + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrapS); @@ -54097,16 +55953,16 @@ var Shader = new Class({ } this.renderer.setProgram(this.program); - + gl.uniform1i(uniform.uniformLocation, this._textureCount); - + this._textureCount++; }, /** * Synchronizes all of the uniforms this shader uses. * Each uniforms gl function is called in turn. - * + * * @method Phaser.GameObjects.Shader#syncUniforms * @private * @since 3.17.0 @@ -54122,7 +55978,7 @@ var Shader = new Class({ var location; var value; var textureCount = 0; - + for (var key in uniforms) { uniform = uniforms[key]; @@ -54175,14 +56031,14 @@ var Shader = new Class({ /** * Called automatically during render. - * + * * This method performs matrix ITRS and then stores the resulting value in the `uViewMatrix` uniform. * It then sets up the vertex buffer and shader, updates and syncs the uniforms ready * for flush to be called. - * + * * @method Phaser.GameObjects.Shader#load * @since 3.17.0 - * + * * @param {Phaser.GameObjects.Components.TransformMatrix} [matrix2D] - The transform matrix to use during rendering. */ load: function (matrix2D) @@ -54200,7 +56056,7 @@ var Shader = new Class({ { var x = -this._displayOriginX; var y = -this._displayOriginY; - + vm[0] = matrix2D[0]; vm[1] = matrix2D[1]; vm[4] = matrix2D[2]; @@ -54236,7 +56092,7 @@ var Shader = new Class({ var px = pointer.x / width; var py = 1 - pointer.y / height; - + mouse.value.x = px.toFixed(2); mouse.value.y = py.toFixed(2); } @@ -54246,9 +56102,9 @@ var Shader = new Class({ /** * Called automatically during render. - * + * * Sets the active shader, loads the vertex buffer and then draws. - * + * * @method Phaser.GameObjects.Shader#flush * @since 3.17.0 */ @@ -54321,7 +56177,7 @@ var Shader = new Class({ setAlpha: function () { }, - + /** * A NOOP method so you can pass a Shader to a Container. * Calling this method will do nothing. It is intentionally empty. @@ -54366,7 +56222,7 @@ module.exports = Shader; /***/ }), -/* 214 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54397,7 +56253,7 @@ module.exports = CircleToCircle; /***/ }), -/* 215 */ +/* 217 */ /***/ (function(module, exports) { /** @@ -54451,7 +56307,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 216 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54462,7 +56318,7 @@ module.exports = CircleToRectangle; */ var Point = __webpack_require__(4); -var LineToCircle = __webpack_require__(217); +var LineToCircle = __webpack_require__(219); /** * Checks for intersection between the line segment and circle, @@ -54543,7 +56399,7 @@ module.exports = GetLineToCircle; /***/ }), -/* 217 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54627,7 +56483,7 @@ module.exports = LineToCircle; /***/ }), -/* 218 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54639,7 +56495,7 @@ module.exports = LineToCircle; var Point = __webpack_require__(4); var LineToLine = __webpack_require__(86); -var LineToRectangle = __webpack_require__(452); +var LineToRectangle = __webpack_require__(453); /** * Checks for intersection between the Line and a Rectangle shape, @@ -54687,7 +56543,7 @@ module.exports = GetLineToRectangle; /***/ }), -/* 219 */ +/* 221 */ /***/ (function(module, exports) { /** @@ -54774,7 +56630,7 @@ module.exports = ContainsArray; /***/ }), -/* 220 */ +/* 222 */ /***/ (function(module, exports) { /** @@ -54822,7 +56678,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 221 */ +/* 223 */ /***/ (function(module, exports) { /** @@ -54850,7 +56706,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 222 */ +/* 224 */ /***/ (function(module, exports) { /** @@ -54904,7 +56760,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 223 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54919,18 +56775,18 @@ module.exports = RotateAroundXY; module.exports = { - BUTTON_DOWN: __webpack_require__(1222), - BUTTON_UP: __webpack_require__(1223), - CONNECTED: __webpack_require__(1224), - DISCONNECTED: __webpack_require__(1225), - GAMEPAD_BUTTON_DOWN: __webpack_require__(1226), - GAMEPAD_BUTTON_UP: __webpack_require__(1227) + BUTTON_DOWN: __webpack_require__(1226), + BUTTON_UP: __webpack_require__(1227), + CONNECTED: __webpack_require__(1228), + DISCONNECTED: __webpack_require__(1229), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1230), + GAMEPAD_BUTTON_UP: __webpack_require__(1231) }; /***/ }), -/* 224 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54940,7 +56796,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var XHRSettings = __webpack_require__(146); +var XHRSettings = __webpack_require__(147); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -54978,7 +56834,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 225 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54993,7 +56849,7 @@ var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(374); +var ParseXML = __webpack_require__(375); /** * @classdesc @@ -55163,7 +57019,7 @@ module.exports = XMLFile; /***/ }), -/* 226 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55178,26 +57034,26 @@ module.exports = XMLFile; module.exports = { - Acceleration: __webpack_require__(1281), - Angular: __webpack_require__(1282), - Bounce: __webpack_require__(1283), - Debug: __webpack_require__(1284), - Drag: __webpack_require__(1285), - Enable: __webpack_require__(1286), - Friction: __webpack_require__(1287), - Gravity: __webpack_require__(1288), - Immovable: __webpack_require__(1289), - Mass: __webpack_require__(1290), - OverlapCirc: __webpack_require__(483), - OverlapRect: __webpack_require__(227), - Size: __webpack_require__(1291), - Velocity: __webpack_require__(1292) + Acceleration: __webpack_require__(1285), + Angular: __webpack_require__(1286), + Bounce: __webpack_require__(1287), + Debug: __webpack_require__(1288), + Drag: __webpack_require__(1289), + Enable: __webpack_require__(1290), + Friction: __webpack_require__(1291), + Gravity: __webpack_require__(1292), + Immovable: __webpack_require__(1293), + Mass: __webpack_require__(1294), + OverlapCirc: __webpack_require__(484), + OverlapRect: __webpack_require__(229), + Size: __webpack_require__(1295), + Velocity: __webpack_require__(1296) }; /***/ }), -/* 227 */ +/* 229 */ /***/ (function(module, exports) { /** @@ -55282,7 +57138,7 @@ module.exports = OverlapRect; /***/ }), -/* 228 */ +/* 230 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55297,20 +57153,20 @@ module.exports = OverlapRect; module.exports = { - COLLIDE: __webpack_require__(1293), - OVERLAP: __webpack_require__(1294), - PAUSE: __webpack_require__(1295), - RESUME: __webpack_require__(1296), - TILE_COLLIDE: __webpack_require__(1297), - TILE_OVERLAP: __webpack_require__(1298), - WORLD_BOUNDS: __webpack_require__(1299), - WORLD_STEP: __webpack_require__(1300) + COLLIDE: __webpack_require__(1297), + OVERLAP: __webpack_require__(1298), + PAUSE: __webpack_require__(1299), + RESUME: __webpack_require__(1300), + TILE_COLLIDE: __webpack_require__(1301), + TILE_OVERLAP: __webpack_require__(1302), + WORLD_BOUNDS: __webpack_require__(1303), + WORLD_STEP: __webpack_require__(1304) }; /***/ }), -/* 229 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55418,7 +57274,7 @@ module.exports = GetOverlapX; /***/ }), -/* 230 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55526,7 +57382,7 @@ module.exports = GetOverlapY; /***/ }), -/* 231 */ +/* 233 */ /***/ (function(module, exports) { /** @@ -55562,7 +57418,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 232 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55580,10 +57436,10 @@ var Constraint = {}; module.exports = Constraint; var Vertices = __webpack_require__(88); -var Vector = __webpack_require__(101); -var Sleeping = __webpack_require__(249); -var Bounds = __webpack_require__(102); -var Axes = __webpack_require__(540); +var Vector = __webpack_require__(102); +var Sleeping = __webpack_require__(250); +var Bounds = __webpack_require__(103); +var Axes = __webpack_require__(542); var Common = __webpack_require__(44); (function() { @@ -56051,7 +57907,7 @@ var Common = __webpack_require__(44); /***/ }), -/* 233 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56060,7 +57916,7 @@ var Common = __webpack_require__(44); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(149); +var GetTileAt = __webpack_require__(150); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -56145,7 +58001,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 234 */ +/* 236 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56155,8 +58011,8 @@ module.exports = CalculateFacesAt; */ var Tile = __webpack_require__(75); -var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(233); +var IsInLayerBounds = __webpack_require__(104); +var CalculateFacesAt = __webpack_require__(235); var SetTileCollision = __webpack_require__(65); /** @@ -56226,7 +58082,7 @@ module.exports = PutTileAt; /***/ }), -/* 235 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56236,8 +58092,8 @@ module.exports = PutTileAt; */ var Formats = __webpack_require__(33); -var LayerData = __webpack_require__(104); -var MapData = __webpack_require__(105); +var LayerData = __webpack_require__(105); +var MapData = __webpack_require__(106); var Tile = __webpack_require__(75); /** @@ -56318,7 +58174,7 @@ module.exports = Parse2DArray; /***/ }), -/* 236 */ +/* 238 */ /***/ (function(module, exports) { /** @@ -56408,7 +58264,7 @@ module.exports = ParseGID; /***/ }), -/* 237 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56417,8 +58273,8 @@ module.exports = ParseGID; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(513); -var ParseGID = __webpack_require__(236); +var Pick = __webpack_require__(514); +var ParseGID = __webpack_require__(238); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -56488,7 +58344,7 @@ module.exports = ParseObject; /***/ }), -/* 238 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56498,9 +58354,9 @@ module.exports = ParseObject; */ var Formats = __webpack_require__(33); -var MapData = __webpack_require__(105); -var Parse = __webpack_require__(505); -var Tilemap = __webpack_require__(521); +var MapData = __webpack_require__(106); +var Parse = __webpack_require__(506); +var Tilemap = __webpack_require__(522); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -56574,7 +58430,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 239 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56623,7 +58479,7 @@ module.exports = GetTargets; /***/ }), -/* 240 */ +/* 242 */ /***/ (function(module, exports) { /** @@ -56891,7 +58747,7 @@ module.exports = GetValueOp; /***/ }), -/* 241 */ +/* 243 */ /***/ (function(module, exports) { /** @@ -56935,7 +58791,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 242 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56946,7 +58802,7 @@ module.exports = TWEEN_DEFAULTS; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(243); +var Events = __webpack_require__(245); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var TWEEN_CONST = __webpack_require__(91); @@ -58578,7 +60434,7 @@ module.exports = Tween; /***/ }), -/* 243 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58593,26 +60449,26 @@ module.exports = Tween; module.exports = { - TIMELINE_COMPLETE: __webpack_require__(1372), - TIMELINE_LOOP: __webpack_require__(1373), - TIMELINE_PAUSE: __webpack_require__(1374), - TIMELINE_RESUME: __webpack_require__(1375), - TIMELINE_START: __webpack_require__(1376), - TIMELINE_UPDATE: __webpack_require__(1377), - TWEEN_ACTIVE: __webpack_require__(1378), - TWEEN_COMPLETE: __webpack_require__(1379), - TWEEN_LOOP: __webpack_require__(1380), - TWEEN_REPEAT: __webpack_require__(1381), - TWEEN_START: __webpack_require__(1382), - TWEEN_STOP: __webpack_require__(1383), - TWEEN_UPDATE: __webpack_require__(1384), - TWEEN_YOYO: __webpack_require__(1385) + TIMELINE_COMPLETE: __webpack_require__(1376), + TIMELINE_LOOP: __webpack_require__(1377), + TIMELINE_PAUSE: __webpack_require__(1378), + TIMELINE_RESUME: __webpack_require__(1379), + TIMELINE_START: __webpack_require__(1380), + TIMELINE_UPDATE: __webpack_require__(1381), + TWEEN_ACTIVE: __webpack_require__(1382), + TWEEN_COMPLETE: __webpack_require__(1383), + TWEEN_LOOP: __webpack_require__(1384), + TWEEN_REPEAT: __webpack_require__(1385), + TWEEN_START: __webpack_require__(1386), + TWEEN_STOP: __webpack_require__(1387), + TWEEN_UPDATE: __webpack_require__(1388), + TWEEN_YOYO: __webpack_require__(1389) }; /***/ }), -/* 244 */ +/* 246 */ /***/ (function(module, exports) { /** @@ -58739,7 +60595,7 @@ module.exports = TweenData; /***/ }), -/* 245 */ +/* 247 */ /***/ (function(module, exports) { /** @@ -58793,7 +60649,7 @@ module.exports = ScaleModes; /***/ }), -/* 246 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58825,7 +60681,7 @@ module.exports = Wrap; /***/ }), -/* 247 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58857,1784 +60713,7 @@ module.exports = WrapDegrees; /***/ }), -/* 248 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(121); -var GetFastValue = __webpack_require__(2); -var Events = __webpack_require__(120); -var Animation = __webpack_require__(170); - -/** - * @classdesc - * The Animation State Component. - * - * This component provides features to apply animations to Game Objects. It is responsible for - * loading, queuing animations for later playback, mixing between animations and setting - * the current animation frame to the Game Object that owns this component. - * - * This component lives as an instance within any Game Object that has it defined, such as Sprites. - * - * You can access its properties and methods via the `anims` property, i.e. `Sprite.anims`. - * - * As well as playing animations stored in the global Animation Manager, this component - * can also create animations that are stored locally within it. See the `create` method - * for more details. - * - * Prior to Phaser 3.50 this component was called just `Animation` and lived in the - * `Phaser.GameObjects.Components` namespace. It was renamed to `AnimationState` - * in 3.50 to help better identify its true purpose when browsing the documentation. - * - * @class AnimationState - * @memberof Phaser.Animations - * @constructor - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation component belongs. - */ -var AnimationState = new Class({ - - initialize: - - function AnimationState (parent) - { - /** - * The Game Object to which this animation component belongs. - * - * You can typically access this component from the Game Object - * via the `this.anims` property. - * - * @name Phaser.Animations.AnimationState#parent - * @type {Phaser.GameObjects.GameObject} - * @since 3.0.0 - */ - this.parent = parent; - - /** - * A reference to the global Animation Manager. - * - * @name Phaser.Animations.AnimationState#animationManager - * @type {Phaser.Animations.AnimationManager} - * @since 3.0.0 - */ - this.animationManager = parent.scene.sys.anims; - - this.animationManager.on(Events.REMOVE_ANIMATION, this.globalRemove, this); - - /** - * A reference to the Texture Manager. - * - * @name Phaser.Animations.AnimationState#textureManager - * @type {Phaser.Textures.TextureManager} - * @protected - * @since 3.50.0 - */ - this.textureManager = this.animationManager.textureManager; - - /** - * The Animations stored locally in this Animation component. - * - * Do not modify the contents of this Map directly, instead use the - * `add`, `create` and `remove` methods of this class instead. - * - * @name Phaser.Animations.AnimationState#anims - * @type {Phaser.Structs.Map.} - * @protected - * @since 3.50.0 - */ - this.anims = null; - - /** - * Is an animation currently playing or not? - * - * @name Phaser.Animations.AnimationState#isPlaying - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.isPlaying = false; - - /** - * Has the current animation started playing, or is it waiting for a delay to expire? - * - * @name Phaser.Animations.AnimationState#hasStarted - * @type {boolean} - * @default false - * @since 3.50.0 - */ - this.hasStarted = false; - - /** - * The current Animation loaded into this Animation component. - * - * Will by `null` if no animation is yet loaded. - * - * @name Phaser.Animations.AnimationState#currentAnim - * @type {?Phaser.Animations.Animation} - * @default null - * @since 3.0.0 - */ - this.currentAnim = null; - - /** - * The current AnimationFrame being displayed by this Animation component. - * - * Will by `null` if no animation is yet loaded. - * - * @name Phaser.Animations.AnimationState#currentFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @since 3.0.0 - */ - this.currentFrame = null; - - /** - * The key, instance, or config of the next Animation to be loaded into this Animation component - * when the current animation completes. - * - * Will by `null` if no animation has been queued. - * - * @name Phaser.Animations.AnimationState#nextAnim - * @type {?(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} - * @default null - * @since 3.16.0 - */ - this.nextAnim = null; - - /** - * A queue of Animations to be loaded into this Animation component when the current animation completes. - * - * Populate this queue via the `chain` method. - * - * @name Phaser.Animations.AnimationState#nextAnimsQueue - * @type {array} - * @since 3.24.0 - */ - this.nextAnimsQueue = []; - - /** - * The Time Scale factor. - * - * You can adjust this value to modify the passage of time for the animation that is currently - * playing. For example, setting it to 2 will make the animation play twice as fast. Or setting - * it to 0.5 will slow the animation down. - * - * You can change this value at run-time, or set it via the `PlayAnimationConfig`. - * - * Prior to Phaser 3.50 this property was private and called `_timeScale`. - * - * @name Phaser.Animations.AnimationState#timeScale - * @type {number} - * @default 1 - * @since 3.50.0 - */ - this.timeScale = 1; - - /** - * The frame rate of playback, of the current animation, in frames per second. - * - * This value is set when a new animation is loaded into this component and should - * be treated as read-only, as changing it once playback has started will not alter - * the animation. To change the frame rate, provide a new value in the `PlayAnimationConfig` object. - * - * @name Phaser.Animations.AnimationState#frameRate - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.frameRate = 0; - - /** - * The duration of the current animation, in milliseconds. - * - * This value is set when a new animation is loaded into this component and should - * be treated as read-only, as changing it once playback has started will not alter - * the animation. To change the duration, provide a new value in the `PlayAnimationConfig` object. - * - * @name Phaser.Animations.AnimationState#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.duration = 0; - - /** - * The number of milliseconds per frame, not including frame specific modifiers that may be present in the - * Animation data. - * - * This value is calculated when a new animation is loaded into this component and should - * be treated as read-only. Changing it will not alter playback speed. - * - * @name Phaser.Animations.AnimationState#msPerFrame - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.msPerFrame = 0; - - /** - * Skip frames if the time lags, or always advanced anyway? - * - * @name Phaser.Animations.AnimationState#skipMissedFrames - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.skipMissedFrames = true; - - /** - * The delay before starting playback of the current animation, in milliseconds. - * - * This value is set when a new animation is loaded into this component and should - * be treated as read-only, as changing it once playback has started will not alter - * the animation. To change the delay, provide a new value in the `PlayAnimationConfig` object. - * - * Prior to Phaser 3.50 this property was private and called `_delay`. - * - * @name Phaser.Animations.AnimationState#delay - * @type {number} - * @default 0 - * @since 3.50.0 - */ - this.delay = 0; - - /** - * The number of times to repeat playback of the current animation. - * - * If -1, it means the animation will repeat forever. - * - * This value is set when a new animation is loaded into this component and should - * be treated as read-only, as changing it once playback has started will not alter - * the animation. To change the number of repeats, provide a new value in the `PlayAnimationConfig` object. - * - * Prior to Phaser 3.50 this property was private and called `_repeat`. - * - * @name Phaser.Animations.AnimationState#repeat - * @type {number} - * @default 0 - * @since 3.50.0 - */ - this.repeat = 0; - - /** - * The number of milliseconds to wait before starting the repeat playback of the current animation. - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time. - * - * You can change the repeat delay by providing a new value in the `PlayAnimationConfig` object. - * - * Prior to Phaser 3.50 this property was private and called `_repeatDelay`. - * - * @name Phaser.Animations.AnimationState#repeatDelay - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.repeatDelay = 0; - - /** - * Should the current animation yoyo? An animation that yoyos will play in reverse, from the end - * to the start, before then repeating or completing. An animation that does not yoyo will just - * play from the start to the end. - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time. - * - * You can change the yoyo by providing a new value in the `PlayAnimationConfig` object. - * - * Prior to Phaser 3.50 this property was private and called `_yoyo`. - * - * @name Phaser.Animations.AnimationState#yoyo - * @type {boolean} - * @default false - * @since 3.50.0 - */ - this.yoyo = false; - - /** - * Should the GameObject's `visible` property be set to `true` when the animation starts to play? - * - * This will happen _after_ any delay that may have been set. - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time, assuming the animation is currently delayed. - * - * @name Phaser.Animations.AnimationState#showOnStart - * @type {boolean} - * @since 3.50.0 - */ - this.showOnStart = false; - - /** - * Should the GameObject's `visible` property be set to `false` when the animation completes? - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time, assuming the animation is still actively playing. - * - * @name Phaser.Animations.AnimationState#hideOnComplete - * @type {boolean} - * @since 3.50.0 - */ - this.hideOnComplete = false; - - /** - * Is the playhead moving forwards (`true`) or in reverse (`false`) ? - * - * @name Phaser.Animations.AnimationState#forward - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.forward = true; - - /** - * An internal trigger that tells the component if it should plays the animation - * in reverse mode ('true') or not ('false'). This is used because `forward` can - * be changed by the `yoyo` feature. - * - * Prior to Phaser 3.50 this property was private and called `_reverse`. - * - * @name Phaser.Animations.AnimationState#inReverse - * @type {boolean} - * @default false - * @since 3.50.0 - */ - this.inReverse = false; - - /** - * Internal time overflow accumulator. - * - * This has the `delta` time added to it as part of the `update` step. - * - * @name Phaser.Animations.AnimationState#accumulator - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.accumulator = 0; - - /** - * The time point at which the next animation frame will change. - * - * This value is compared against the `accumulator` as part of the `update` step. - * - * @name Phaser.Animations.AnimationState#nextTick - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.nextTick = 0; - - /** - * A counter keeping track of how much delay time, in milliseconds, is left before playback begins. - * - * This is set via the `playAfterDelay` method, although it can be modified at run-time - * if required, as long as the animation has not already started playing. - * - * @name Phaser.Animations.AnimationState#delayCounter - * @type {number} - * @default 0 - * @since 3.50.0 - */ - this.delayCounter = 0; - - /** - * A counter that keeps track of how many repeats are left to run. - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time. - * - * @name Phaser.Animations.AnimationState#repeatCounter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.repeatCounter = 0; - - /** - * An internal flag keeping track of pending repeats. - * - * @name Phaser.Animations.AnimationState#pendingRepeat - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.pendingRepeat = false; - - /** - * Is the Animation paused? - * - * @name Phaser.Animations.AnimationState#_paused - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._paused = false; - - /** - * Was the animation previously playing before being paused? - * - * @name Phaser.Animations.AnimationState#_wasPlaying - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._wasPlaying = false; - - /** - * Internal property tracking if this Animation is waiting to stop. - * - * 0 = No - * 1 = Waiting for ms to pass - * 2 = Waiting for repeat - * 3 = Waiting for specific frame - * - * @name Phaser.Animations.AnimationState#_pendingStop - * @type {integer} - * @private - * @since 3.4.0 - */ - this._pendingStop = 0; - - /** - * Internal property used by _pendingStop. - * - * @name Phaser.Animations.AnimationState#_pendingStopValue - * @type {any} - * @private - * @since 3.4.0 - */ - this._pendingStopValue; - }, - - /** - * Sets an animation, or an array of animations, to be played in the future, after the current one completes or stops. - * - * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, - * or have one of the `stop` methods called. - * - * An animation set to repeat forever will never enter a completed state unless stopped. - * - * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event). - * - * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. - * - * Call this method with no arguments to reset all currently chained animations. - * - * @method Phaser.Animations.AnimationState#chain - * @since 3.16.0 - * - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - chain: function (key) - { - var parent = this.parent; - - if (key === undefined) - { - this.nextAnimsQueue.length = 0; - this.nextAnim = null; - - return parent; - } - - if (!Array.isArray(key)) - { - key = [ key ]; - } - - for (var i = 0; i < key.length; i++) - { - var anim = key[i]; - - if (this.nextAnim === null) - { - this.nextAnim = anim; - } - else - { - this.nextAnimsQueue.push(anim); - } - } - - return this.parent; - }, - - /** - * Returns the key of the animation currently loaded into this component. - * - * Prior to Phaser 3.50 this method was called `getCurrentKey`. - * - * @method Phaser.Animations.AnimationState#getName - * @since 3.50.0 - * - * @return {string} The key of the Animation currently loaded into this component, or an empty string if none loaded. - */ - getName: function () - { - return (this.currentAnim) ? this.currentAnim.key : ''; - }, - - /** - * Returns the key of the animation frame currently displayed by this component. - * - * @method Phaser.Animations.AnimationState#getFrameName - * @since 3.50.0 - * - * @return {string} The key of the Animation Frame currently displayed by this component, or an empty string if no animation has been loaded. - */ - getFrameName: function () - { - return (this.currentFrame) ? this.currentFrame.textureFrame : ''; - }, - - /** - * Internal method used to load an animation into this component. - * - * @method Phaser.Animations.AnimationState#load - * @protected - * @since 3.0.0 - * - * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - load: function (key) - { - if (this.isPlaying) - { - this.stop(); - } - - var manager = this.animationManager; - var animKey = (typeof key === 'string') ? key : GetFastValue(key, 'key', null); - - // Get the animation, first from the local map and, if not found, from the Animation Manager - var anim = (this.exists(animKey)) ? this.get(animKey) : manager.get(animKey); - - if (!anim) - { - console.warn('Missing animation: ' + animKey); - } - else - { - this.currentAnim = anim; - - // And now override the animation values, if set in the config. - - var totalFrames = anim.getTotalFrames(); - var frameRate = GetFastValue(key, 'frameRate', anim.frameRate); - var duration = GetFastValue(key, 'duration', anim.duration); - - anim.calculateDuration(this, totalFrames, duration, frameRate); - - this.delay = GetFastValue(key, 'delay', anim.delay); - this.repeat = GetFastValue(key, 'repeat', anim.repeat); - this.repeatDelay = GetFastValue(key, 'repeatDelay', anim.repeatDelay); - this.yoyo = GetFastValue(key, 'yoyo', anim.yoyo); - this.showOnStart = GetFastValue(key, 'showOnStart', anim.showOnStart); - this.hideOnComplete = GetFastValue(key, 'hideOnComplete', anim.hideOnComplete); - this.skipMissedFrames = GetFastValue(key, 'skipMissedFrames', anim.skipMissedFrames); - - this.timeScale = GetFastValue(key, 'timeScale', this.timeScale); - - var startFrame = GetFastValue(key, 'startFrame', 0); - - if (startFrame > anim.getTotalFrames()) - { - startFrame = 0; - } - - var frame = anim.frames[startFrame]; - - if (startFrame === 0 && !this.forward) - { - frame = anim.getLastFrame(); - } - - this.currentFrame = frame; - } - - return this.parent; - }, - - /** - * Pause the current animation and set the `isPlaying` property to `false`. - * You can optionally pause it at a specific frame. - * - * @method Phaser.Animations.AnimationState#pause - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - pause: function (atFrame) - { - if (!this._paused) - { - this._paused = true; - this._wasPlaying = this.isPlaying; - this.isPlaying = false; - } - - if (atFrame !== undefined) - { - this.setCurrentFrame(atFrame); - } - - return this.parent; - }, - - /** - * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. - * You can optionally tell it to start playback from a specific frame. - * - * @method Phaser.Animations.AnimationState#resume - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - resume: function (fromFrame) - { - if (this._paused) - { - this._paused = false; - this.isPlaying = this._wasPlaying; - } - - if (fromFrame !== undefined) - { - this.setCurrentFrame(fromFrame); - } - - return this.parent; - }, - - /** - * Waits for the specified delay, in milliseconds, then starts playback of the given animation. - * - * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here. - * - * If an animation is already running and a new animation is given to this method, it will wait for - * the given delay before starting the new animation. - * - * If no animation is currently running, the given one begins after the delay. - * - * Prior to Phaser 3.50 this method was called 'delayedPlay' and the parameters were in the reverse order. - * - * @method Phaser.Animations.AnimationState#playAfterDelay - * @fires Phaser.Animations.Events#ANIMATION_START - * @since 3.50.0 - * - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. - * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - playAfterDelay: function (key, delay) - { - if (!this.isPlaying) - { - this.delayCounter = delay; - - this.play(key, true); - } - else - { - // If we've got a nextAnim, move it to the queue - var nextAnim = this.nextAnim; - var queue = this.nextAnimsQueue; - - if (nextAnim) - { - queue.unshift(nextAnim); - } - - this.nextAnim = key; - - this._pendingStop = 1; - this._pendingStopValue = delay; - } - - return this.parent; - }, - - /** - * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback - * of the given animation. - * - * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an - * idle animation to a walking animation, by making them blend smoothly into each other. - * - * If no animation is currently running, the given one will start immediately. - * - * @method Phaser.Animations.AnimationState#playAfterRepeat - * @fires Phaser.Animations.Events#ANIMATION_START - * @since 3.50.0 - * - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. - * @param {integer} [repeatCount=1] - How many times should the animation repeat before the next one starts? - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - playAfterRepeat: function (key, repeatCount) - { - if (repeatCount === undefined) { repeatCount = 1; } - - if (!this.isPlaying) - { - this.play(key); - } - else - { - // If we've got a nextAnim, move it to the queue - var nextAnim = this.nextAnim; - var queue = this.nextAnimsQueue; - - if (nextAnim) - { - queue.unshift(nextAnim); - } - - if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) - { - repeatCount = this.repeatCounter; - } - - this.nextAnim = key; - - this._pendingStop = 2; - this._pendingStopValue = repeatCount; - } - - return this.parent; - }, - - /** - * Start playing the given animation on this Sprite. - * - * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. - * - * The benefit of a global animation is that multiple Sprites can all play the same animation, without - * having to duplicate the data. You can just create it once and then play it on any Sprite. - * - * The following code shows how to create a global repeating animation. The animation will be created - * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': - * - * ```javascript - * var config = { - * key: 'run', - * frames: 'muybridge', - * frameRate: 15, - * repeat: -1 - * }; - * - * // This code should be run from within a Scene: - * this.anims.create(config); - * ``` - * - * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, - * you can call the `Animation.create` method instead. It accepts the exact same parameters as when - * creating a global animation, however the resulting data is kept locally in this Sprite. - * - * With the animation created, either globally or locally, you can now play it on this Sprite: - * - * ```javascript - * this.add.sprite(x, y).play('run'); - * ``` - * - * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config - * object instead: - * - * ```javascript - * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 }); - * ``` - * - * When playing an animation on a Sprite it will first check to see if it can find a matching key - * locally within the Sprite. If it can, it will play the local animation. If not, it will then - * search the global Animation Manager and look for it there. - * - * If you need a Sprite to be able to play both local and global animations, make sure they don't - * have conflicting keys. - * - * See the documentation for the `PlayAnimationConfig` config object for more details about this. - * - * Also, see the documentation in the Animation Manager for further details on creating animations. - * - * @method Phaser.Animations.AnimationState#play - * @fires Phaser.Animations.Events#ANIMATION_START - * @since 3.0.0 - * - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. - * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - play: function (key, ignoreIfPlaying) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - - var currentAnim = this.currentAnim; - var parent = this.parent; - - // Must be either an Animation instance, or a PlayAnimationConfig object - var animKey = (typeof key === 'string') ? key : key.key; - - if (ignoreIfPlaying && this.isPlaying && currentAnim.key === animKey) - { - return parent; - } - - // Are we mixing? - if (currentAnim && this.isPlaying) - { - var mix = this.animationManager.getMix(currentAnim.key, key); - - if (mix > 0) - { - return this.playAfterDelay(key, mix); - } - } - - this.forward = true; - this.inReverse = false; - - this._paused = false; - this._wasPlaying = true; - - return this.startAnimation(key); - }, - - /** - * Start playing the given animation on this Sprite, in reverse. - * - * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. - * - * The benefit of a global animation is that multiple Sprites can all play the same animation, without - * having to duplicate the data. You can just create it once and then play it on any Sprite. - * - * The following code shows how to create a global repeating animation. The animation will be created - * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': - * - * ```javascript - * var config = { - * key: 'run', - * frames: 'muybridge', - * frameRate: 15, - * repeat: -1 - * }; - * - * // This code should be run from within a Scene: - * this.anims.create(config); - * ``` - * - * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, - * you can call the `Animation.create` method instead. It accepts the exact same parameters as when - * creating a global animation, however the resulting data is kept locally in this Sprite. - * - * With the animation created, either globally or locally, you can now play it on this Sprite: - * - * ```javascript - * this.add.sprite(x, y).playReverse('run'); - * ``` - * - * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config - * object instead: - * - * ```javascript - * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 }); - * ``` - * - * When playing an animation on a Sprite it will first check to see if it can find a matching key - * locally within the Sprite. If it can, it will play the local animation. If not, it will then - * search the global Animation Manager and look for it there. - * - * If you need a Sprite to be able to play both local and global animations, make sure they don't - * have conflicting keys. - * - * See the documentation for the `PlayAnimationConfig` config object for more details about this. - * - * Also, see the documentation in the Animation Manager for further details on creating animations. - * - * @method Phaser.Animations.AnimationState#playReverse - * @fires Phaser.Animations.Events#ANIMATION_START - * @since 3.12.0 - * - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. - * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - playReverse: function (key, ignoreIfPlaying) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - - // Must be either an Animation instance, or a PlayAnimationConfig object - var animKey = (typeof key === 'string') ? key : key.key; - - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === animKey) - { - return this.parent; - } - - this.forward = false; - this.inReverse = true; - - this._paused = false; - this._wasPlaying = true; - - return this.startAnimation(key); - }, - - /** - * Load the animation based on the key and set-up all of the internal values - * needed for playback to start. If there is no delay, it will also fire the start events. - * - * @method Phaser.Animations.AnimationState#startAnimation - * @fires Phaser.Animations.Events#ANIMATION_START - * @since 3.50.0 - * - * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - startAnimation: function (key) - { - this.load(key); - - var anim = this.currentAnim; - var gameObject = this.parent; - - if (!anim) - { - return gameObject; - } - - // Should give us 9,007,199,254,740,991 safe repeats - this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; - - anim.getFirstTick(this); - - this.isPlaying = true; - this.pendingRepeat = false; - this.hasStarted = false; - - this._pendingStop = 0; - this._pendingStopValue = 0; - this._paused = false; - - // Add any delay the animation itself may have had as well - this.delayCounter += this.delay; - - if (this.delayCounter === 0) - { - this.handleStart(); - } - - return gameObject; - }, - - /** - * Handles the start of an animation playback. - * - * @method Phaser.Animations.AnimationState#handleStart - * @private - * @since 3.50.0 - */ - handleStart: function () - { - if (this.showOnStart) - { - this.parent.setVisible(true); - } - - this.setCurrentFrame(this.currentFrame); - - this.hasStarted = true; - - this.emitEvents(Events.ANIMATION_START); - }, - - /** - * Handles the repeat of an animation. - * - * @method Phaser.Animations.AnimationState#handleRepeat - * @private - * @since 3.50.0 - */ - handleRepeat: function () - { - this.pendingRepeat = false; - - this.emitEvents(Events.ANIMATION_REPEAT); - }, - - /** - * Handles the stop of an animation playback. - * - * @method Phaser.Animations.AnimationState#handleStop - * @private - * @since 3.50.0 - */ - handleStop: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - this.emitEvents(Events.ANIMATION_STOP); - }, - - /** - * Handles the completion of an animation playback. - * - * @method Phaser.Animations.AnimationState#handleComplete - * @private - * @since 3.50.0 - */ - handleComplete: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - if (this.hideOnComplete) - { - this.parent.setVisible(false); - } - - this.emitEvents(Events.ANIMATION_COMPLETE); - }, - - /** - * Fires the given animation event. - * - * @method Phaser.Animations.AnimationState#emitEvents - * @private - * @since 3.50.0 - * - * @param {string} event - The Animation Event to dispatch. - */ - emitEvents: function (event) - { - var anim = this.currentAnim; - var frame = this.currentFrame; - var gameObject = this.parent; - - gameObject.emit(event, anim, frame, gameObject, frame.textureFrame); - }, - - /** - * Reverse the Animation that is already playing on the Game Object. - * - * @method Phaser.Animations.AnimationState#reverse - * @since 3.12.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - reverse: function () - { - if (this.isPlaying) - { - this.inReverse = !this.inReverse; - - this.forward = !this.forward; - } - - return this.parent; - }, - - /** - * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. - * - * The value is based on the current frame and how far that is in the animation, it is not based on - * the duration of the animation. - * - * @method Phaser.Animations.AnimationState#getProgress - * @since 3.4.0 - * - * @return {number} The progress of the current animation in frames, between 0 and 1. - */ - getProgress: function () - { - var frame = this.currentFrame; - - if (!frame) - { - return 0; - } - - var p = frame.progress; - - if (this.inReverse) - { - p *= -1; - } - - return p; - }, - - /** - * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. - * - * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. - * - * The value is based on the current frame and how far that is in the animation, it is not based on - * the duration of the animation. - * - * @method Phaser.Animations.AnimationState#setProgress - * @since 3.4.0 - * - * @param {number} [value=0] - The progress value, between 0 and 1. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setProgress: function (value) - { - if (!this.forward) - { - value = 1 - value; - } - - this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); - - return this.parent; - }, - - /** - * Sets the number of times that the animation should repeat after its first play through. - * For example, if repeat is 1, the animation will play a total of twice: the initial play plus 1 repeat. - * - * To repeat indefinitely, use -1. - * The value should always be an integer. - * - * Calling this method only works if the animation is already running. Otherwise, any - * value specified here will be overwritten when the next animation loads in. To avoid this, - * use the `repeat` property of the `PlayAnimationConfig` object instead. - * - * @method Phaser.Animations.AnimationState#setRepeat - * @since 3.4.0 - * - * @param {integer} value - The number of times that the animation should repeat. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeat: function (value) - { - this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; - - return this.parent; - }, - - /** - * Handle the removal of an animation from the Animation Manager. - * - * @method Phaser.Animations.AnimationState#globalRemove - * @since 3.50.0 - * - * @param {string} [key] - The key of the removed Animation. - * @param {Phaser.Animations.Animation} [animation] - The removed Animation. - */ - globalRemove: function (key, animation) - { - if (animation === undefined) { animation = this.currentAnim; } - - if (this.isPlaying && animation.key === this.currentAnim.key) - { - this.stop(); - - this.setCurrentFrame(this.currentAnim.frames[0]); - } - }, - - /** - * Restarts the current animation from its beginning. - * - * You can optionally reset the delay and repeat counters as well. - * - * Calling this will fire the `ANIMATION_RESTART` event immediately. - * - * If you `includeDelay` then it will also fire the `ANIMATION_START` event once - * the delay has expired, otherwise, playback will just begin immediately. - * - * @method Phaser.Animations.AnimationState#restart - * @fires Phaser.Animations.Events#ANIMATION_RESTART - * @since 3.0.0 - * - * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. - * @param {boolean} [resetRepeats=false] - Whether to reset the repeat counter or not? - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - restart: function (includeDelay, resetRepeats) - { - if (includeDelay === undefined) { includeDelay = false; } - if (resetRepeats === undefined) { resetRepeats = false; } - - var anim = this.currentAnim; - var gameObject = this.parent; - - if (!anim) - { - return gameObject; - } - - if (resetRepeats) - { - this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; - } - - anim.getFirstTick(this); - - this.emitEvents(Events.ANIMATION_RESTART); - - this.isPlaying = true; - this.pendingRepeat = false; - - // Set this to `true` if there is no delay to include, so it skips the `hasStarted` check in `update`. - this.hasStarted = !includeDelay; - - this._pendingStop = 0; - this._pendingStopValue = 0; - this._paused = false; - - this.setCurrentFrame(anim.frames[0]); - - return this.parent; - }, - - /** - * The current animation has completed. This dispatches the `ANIMATION_COMPLETE` event. - * - * This method is called by the Animation instance and should not usually be invoked directly. - * - * If no animation is loaded, no events will be dispatched. - * - * If another animation has been queued for playback, it will be started after the events fire. - * - * @method Phaser.Animations.AnimationState#complete - * @fires Phaser.Animations.Events#ANIMATION_COMPLETE - * @since 3.50.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - complete: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - if (this.currentAnim) - { - this.handleComplete(); - } - - if (this.nextAnim) - { - var key = this.nextAnim; - - this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; - - this.play(key); - } - - return this.parent; - }, - - /** - * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` event. - * - * If no animation is running, no events will be dispatched. - * - * If there is another animation in the queue (set via the `chain` method) then it will start playing. - * - * @method Phaser.Animations.AnimationState#stop - * @fires Phaser.Animations.Events#ANIMATION_STOP - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stop: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - if (this.currentAnim) - { - this.handleStop(); - } - - if (this.nextAnim) - { - var key = this.nextAnim; - - this.nextAnim = this.nextAnimsQueue.shift(); - - this.play(key); - } - - return this.parent; - }, - - /** - * Stops the current animation from playing after the specified time delay, given in milliseconds. - * - * It then dispatches the `ANIMATION_STOP` event. - * - * If no animation is running, no events will be dispatched. - * - * If there is another animation in the queue (set via the `chain` method) then it will start playing, - * when the current one stops. - * - * @method Phaser.Animations.AnimationState#stopAfterDelay - * @fires Phaser.Animations.Events#ANIMATION_STOP - * @since 3.4.0 - * - * @param {integer} delay - The number of milliseconds to wait before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopAfterDelay: function (delay) - { - this._pendingStop = 1; - this._pendingStopValue = delay; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next repeats. - * - * It then dispatches the `ANIMATION_STOP` event. - * - * If no animation is running, no events will be dispatched. - * - * If there is another animation in the queue (set via the `chain` method) then it will start playing, - * when the current one stops. - * - * Prior to Phaser 3.50 this method was called `stopOnRepeat` and had no parameters. - * - * @method Phaser.Animations.AnimationState#stopAfterRepeat - * @fires Phaser.Animations.Events#ANIMATION_STOP - * @since 3.50.0 - * - * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopAfterRepeat: function (repeatCount) - { - if (repeatCount === undefined) { repeatCount = 1; } - - if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) - { - repeatCount = this.repeatCounter; - } - - this._pendingStop = 2; - this._pendingStopValue = repeatCount; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next sets the given frame. - * If this frame doesn't exist within the animation it will not stop it from playing. - * - * It then dispatches the `ANIMATION_STOP` event. - * - * If no animation is running, no events will be dispatched. - * - * If there is another animation in the queue (set via the `chain` method) then it will start playing, - * when the current one stops. - * - * @method Phaser.Animations.AnimationState#stopOnFrame - * @fires Phaser.Animations.Events#ANIMATION_STOP - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopOnFrame: function (frame) - { - this._pendingStop = 3; - this._pendingStopValue = frame; - - return this.parent; - }, - - /** - * Returns the total number of frames in this animation, or returns zero if no - * animation has been loaded. - * - * @method Phaser.Animations.AnimationState#getTotalFrames - * @since 3.4.0 - * - * @return {integer} The total number of frames in the current animation, or zero if no animation has been loaded. - */ - getTotalFrames: function () - { - return (this.currentAnim) ? this.currentAnim.getTotalFrames() : 0; - }, - - /** - * The internal update loop for the AnimationState Component. - * - * This is called automatically by the `Sprite.preUpdate` method. - * - * @method Phaser.Animations.AnimationState#update - * @since 3.0.0 - * - * @param {number} time - The current timestamp. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. - */ - update: function (time, delta) - { - var anim = this.currentAnim; - - if (!this.isPlaying || !anim || anim.paused) - { - return; - } - - this.accumulator += delta * this.timeScale; - - if (this._pendingStop === 1) - { - this._pendingStopValue -= delta; - - if (this._pendingStopValue <= 0) - { - return this.stop(); - } - } - - if (!this.hasStarted) - { - if (this.accumulator >= this.delayCounter) - { - this.accumulator -= this.delayCounter; - - this.handleStart(); - } - } - else if (this.accumulator >= this.nextTick) - { - // Process one frame advance as standard - - if (this.forward) - { - anim.nextFrame(this); - } - else - { - anim.previousFrame(this); - } - - // And only do more if we're skipping frames and have time left - if (this.isPlaying && this._pendingStop === 0 && this.skipMissedFrames && this.accumulator > this.nextTick) - { - var safetyNet = 0; - - do - { - if (this.forward) - { - anim.nextFrame(this); - } - else - { - anim.previousFrame(this); - } - - safetyNet++; - - } while (this.accumulator > this.nextTick && safetyNet < 60); - } - } - }, - - /** - * Sets the given Animation Frame as being the current frame - * and applies it to the parent Game Object, adjusting size and origin as needed. - * - * @method Phaser.Animations.AnimationState#setCurrentFrame - * @fires Phaser.Animations.Events#ANIMATION_UPDATE - * @fires Phaser.Animations.Events#ANIMATION_STOP - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - setCurrentFrame: function (animationFrame) - { - var gameObject = this.parent; - - this.currentFrame = animationFrame; - - gameObject.texture = animationFrame.frame.texture; - gameObject.frame = animationFrame.frame; - - if (gameObject.isCropped) - { - gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); - } - - if (animationFrame.setAlpha) - { - gameObject.alpha = animationFrame.alpha; - } - - gameObject.setSizeToFrame(); - - if (gameObject._originComponent) - { - if (animationFrame.frame.customPivot) - { - gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); - } - else - { - gameObject.updateDisplayOrigin(); - } - } - - if (this.isPlaying && this.hasStarted) - { - this.emitEvents(Events.ANIMATION_UPDATE); - - if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) - { - this.stop(); - } - } - - return gameObject; - }, - - /** - * Advances the animation to the next frame, regardless of the time or animation state. - * If the animation is set to repeat, or yoyo, this will still take effect. - * - * Calling this does not change the direction of the animation. I.e. if it was currently - * playing in reverse, calling this method doesn't then change the direction to forwards. - * - * @method Phaser.Animations.AnimationState#nextFrame - * @since 3.16.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - nextFrame: function () - { - if (this.currentAnim) - { - this.currentAnim.nextFrame(this); - } - - return this.parent; - }, - - /** - * Advances the animation to the previous frame, regardless of the time or animation state. - * If the animation is set to repeat, or yoyo, this will still take effect. - * - * Calling this does not change the direction of the animation. I.e. if it was currently - * playing in forwards, calling this method doesn't then change the direction to backwards. - * - * @method Phaser.Animations.AnimationState#previousFrame - * @since 3.16.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - previousFrame: function () - { - if (this.currentAnim) - { - this.currentAnim.previousFrame(this); - } - - return this.parent; - }, - - /** - * Get an Animation instance that has been created locally on this Sprite. - * - * See the `create` method for more details. - * - * @method Phaser.Animations.AnimationState#get - * @since 3.50.0 - * - * @param {string} key - The key of the Animation to retrieve. - * - * @return {Phaser.Animations.Animation} The Animation, or `undefined` if the key is invalid. - */ - get: function (key) - { - return (this.anims && this.anims.get(key)); - }, - - /** - * Checks to see if the given key is already used locally within the animations stored on this Sprite. - * - * @method Phaser.Animations.AnimationState#exists - * @since 3.50.0 - * - * @param {string} key - The key of the Animation to check. - * - * @return {boolean} `true` if the Animation exists locally, or `false` if the key is available. - */ - exists: function (key) - { - return (this.anims && this.anims.has(key)); - }, - - /** - * Creates a new Animation that is local specifically to this Sprite. - * - * When a Sprite owns an animation, it is kept out of the global Animation Manager, which means - * you're free to use keys that may be already defined there. Unless you specifically need a Sprite - * to have a unique animation, you should favor using global animations instead, as they allow for - * the same animation to be used across multiple Sprites, saving on memory. However, if this Sprite - * is the only one to use this animation, it's sensible to create it here. - * - * If an invalid key is given this method will return `false`. - * - * If you pass the key of an animation that already exists locally, that animation will be returned. - * - * A brand new animation is only created if the key is valid and not already in use by this Sprite. - * - * If you wish to re-use an existing key, call the `remove` method first, then this method. - * - * @method Phaser.Animations.AnimationState#create - * @since 3.50.0 - * - * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. - * - * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` if the key is already in use. - */ - create: function (config) - { - var key = config.key; - - var anim = false; - - if (key) - { - anim = this.get(key); - - if (!anim) - { - anim = new Animation(this, key, config); - - if (!this.anims) - { - this.anims = new CustomMap(); - } - - this.anims.set(key, anim); - } - } - - return anim; - }, - - /** - * Removes a locally created Animation from this Sprite, based on the given key. - * - * Once an Animation has been removed, this Sprite cannot play it again without re-creating it. - * - * @method Phaser.Animations.AnimationState#remove - * @since 3.50.0 - * - * @param {string} key - The key of the animation to remove. - * - * @return {Phaser.Animations.Animation} The Animation instance that was removed from this Sprite, if the key was valid. - */ - remove: function (key) - { - var anim = this.get(key); - - if (anim) - { - if (this.currentAnim === anim) - { - this.stop(); - } - - this.anims.delete(key); - } - - return anim; - }, - - /** - * Destroy this Animation component. - * - * Unregisters event listeners and cleans up its references. - * - * @method Phaser.Animations.AnimationState#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.animationManager.off(Events.REMOVE_ANIMATION, this.globalRemove, this); - - if (this.anims) - { - this.anims.clear(); - } - - this.animationManager = null; - this.parent = null; - this.nextAnim = null; - this.nextAnimsQueue.length = 0; - - this.currentAnim = null; - this.currentFrame = null; - }, - - /** - * `true` if the current animation is paused, otherwise `false`. - * - * @name Phaser.Animations.AnimationState#isPaused - * @readonly - * @type {boolean} - * @since 3.4.0 - */ - isPaused: { - - get: function () - { - return this._paused; - } - - } - -}); - -module.exports = AnimationState; - - -/***/ }), -/* 249 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60647,7 +60726,7 @@ var Sleeping = {}; module.exports = Sleeping; -var Events = __webpack_require__(250); +var Events = __webpack_require__(251); (function() { @@ -60769,7 +60848,7 @@ var Events = __webpack_require__(250); /***/ }), -/* 250 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60887,7 +60966,7 @@ var Common = __webpack_require__(44); /***/ }), -/* 251 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60902,65 +60981,65 @@ var Common = __webpack_require__(44); module.exports = { - AlignTo: __webpack_require__(553), - Angle: __webpack_require__(554), - Call: __webpack_require__(555), - GetFirst: __webpack_require__(556), - GetLast: __webpack_require__(557), - GridAlign: __webpack_require__(558), - IncAlpha: __webpack_require__(603), - IncX: __webpack_require__(604), - IncXY: __webpack_require__(605), - IncY: __webpack_require__(606), - PlaceOnCircle: __webpack_require__(607), - PlaceOnEllipse: __webpack_require__(608), - PlaceOnLine: __webpack_require__(609), - PlaceOnRectangle: __webpack_require__(610), - PlaceOnTriangle: __webpack_require__(611), - PlayAnimation: __webpack_require__(612), + AlignTo: __webpack_require__(556), + Angle: __webpack_require__(557), + Call: __webpack_require__(558), + GetFirst: __webpack_require__(559), + GetLast: __webpack_require__(560), + GridAlign: __webpack_require__(561), + IncAlpha: __webpack_require__(606), + IncX: __webpack_require__(607), + IncXY: __webpack_require__(608), + IncY: __webpack_require__(609), + PlaceOnCircle: __webpack_require__(610), + PlaceOnEllipse: __webpack_require__(611), + PlaceOnLine: __webpack_require__(612), + PlaceOnRectangle: __webpack_require__(613), + PlaceOnTriangle: __webpack_require__(614), + PlayAnimation: __webpack_require__(615), PropertyValueInc: __webpack_require__(39), PropertyValueSet: __webpack_require__(25), - RandomCircle: __webpack_require__(613), - RandomEllipse: __webpack_require__(614), - RandomLine: __webpack_require__(615), - RandomRectangle: __webpack_require__(616), - RandomTriangle: __webpack_require__(617), - Rotate: __webpack_require__(618), - RotateAround: __webpack_require__(619), - RotateAroundDistance: __webpack_require__(620), - ScaleX: __webpack_require__(621), - ScaleXY: __webpack_require__(622), - ScaleY: __webpack_require__(623), - SetAlpha: __webpack_require__(624), - SetBlendMode: __webpack_require__(625), - SetDepth: __webpack_require__(626), - SetHitArea: __webpack_require__(627), - SetOrigin: __webpack_require__(628), - SetRotation: __webpack_require__(629), - SetScale: __webpack_require__(630), - SetScaleX: __webpack_require__(631), - SetScaleY: __webpack_require__(632), - SetScrollFactor: __webpack_require__(633), - SetScrollFactorX: __webpack_require__(634), - SetScrollFactorY: __webpack_require__(635), - SetTint: __webpack_require__(636), - SetVisible: __webpack_require__(637), - SetX: __webpack_require__(638), - SetXY: __webpack_require__(639), - SetY: __webpack_require__(640), - ShiftPosition: __webpack_require__(641), - Shuffle: __webpack_require__(642), - SmootherStep: __webpack_require__(643), - SmoothStep: __webpack_require__(644), - Spread: __webpack_require__(645), - ToggleVisible: __webpack_require__(646), - WrapInRectangle: __webpack_require__(647) + RandomCircle: __webpack_require__(616), + RandomEllipse: __webpack_require__(617), + RandomLine: __webpack_require__(618), + RandomRectangle: __webpack_require__(619), + RandomTriangle: __webpack_require__(620), + Rotate: __webpack_require__(621), + RotateAround: __webpack_require__(622), + RotateAroundDistance: __webpack_require__(623), + ScaleX: __webpack_require__(624), + ScaleXY: __webpack_require__(625), + ScaleY: __webpack_require__(626), + SetAlpha: __webpack_require__(627), + SetBlendMode: __webpack_require__(628), + SetDepth: __webpack_require__(629), + SetHitArea: __webpack_require__(630), + SetOrigin: __webpack_require__(631), + SetRotation: __webpack_require__(632), + SetScale: __webpack_require__(633), + SetScaleX: __webpack_require__(634), + SetScaleY: __webpack_require__(635), + SetScrollFactor: __webpack_require__(636), + SetScrollFactorX: __webpack_require__(637), + SetScrollFactorY: __webpack_require__(638), + SetTint: __webpack_require__(639), + SetVisible: __webpack_require__(640), + SetX: __webpack_require__(641), + SetXY: __webpack_require__(642), + SetY: __webpack_require__(643), + ShiftPosition: __webpack_require__(644), + Shuffle: __webpack_require__(645), + SmootherStep: __webpack_require__(646), + SmoothStep: __webpack_require__(647), + Spread: __webpack_require__(648), + ToggleVisible: __webpack_require__(649), + WrapInRectangle: __webpack_require__(650) }; /***/ }), -/* 252 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60969,22 +61048,22 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(107); +var ALIGN_CONST = __webpack_require__(108); var AlignToMap = []; -AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(253); -AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(254); -AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(255); -AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(256); -AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(257); -AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(258); -AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(259); -AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(260); -AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(261); -AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(262); -AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(263); -AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(264); +AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(254); +AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(255); +AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(256); +AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(257); +AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(258); +AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(259); +AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(260); +AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(261); +AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(262); +AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(263); +AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(264); +AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(265); /** * Takes a Game Object and aligns it next to another, at the given position. @@ -61012,7 +61091,7 @@ module.exports = QuickSet; /***/ }), -/* 253 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61056,7 +61135,7 @@ module.exports = BottomCenter; /***/ }), -/* 254 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61100,7 +61179,7 @@ module.exports = BottomLeft; /***/ }), -/* 255 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61144,7 +61223,7 @@ module.exports = BottomRight; /***/ }), -/* 256 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61188,7 +61267,7 @@ module.exports = LeftBottom; /***/ }), -/* 257 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61232,7 +61311,7 @@ module.exports = LeftCenter; /***/ }), -/* 258 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61276,7 +61355,7 @@ module.exports = LeftTop; /***/ }), -/* 259 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61320,7 +61399,7 @@ module.exports = RightBottom; /***/ }), -/* 260 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61364,7 +61443,7 @@ module.exports = RightCenter; /***/ }), -/* 261 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61408,7 +61487,7 @@ module.exports = RightTop; /***/ }), -/* 262 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61452,7 +61531,7 @@ module.exports = TopCenter; /***/ }), -/* 263 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61496,7 +61575,7 @@ module.exports = TopLeft; /***/ }), -/* 264 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61540,7 +61619,7 @@ module.exports = TopRight; /***/ }), -/* 265 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61549,19 +61628,19 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(107); +var ALIGN_CONST = __webpack_require__(108); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(266); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(267); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(268); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(269); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(271); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(272); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(273); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(274); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(275); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(267); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(268); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(269); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(270); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(272); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(273); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(274); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(275); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(276); AlignInMap[ALIGN_CONST.LEFT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_LEFT]; AlignInMap[ALIGN_CONST.LEFT_TOP] = AlignInMap[ALIGN_CONST.TOP_LEFT]; AlignInMap[ALIGN_CONST.RIGHT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_RIGHT]; @@ -61593,7 +61672,7 @@ module.exports = QuickSet; /***/ }), -/* 266 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61637,7 +61716,7 @@ module.exports = BottomCenter; /***/ }), -/* 267 */ +/* 268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61681,7 +61760,7 @@ module.exports = BottomLeft; /***/ }), -/* 268 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61725,7 +61804,7 @@ module.exports = BottomRight; /***/ }), -/* 269 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61734,7 +61813,7 @@ module.exports = BottomRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(270); +var CenterOn = __webpack_require__(271); var GetCenterX = __webpack_require__(77); var GetCenterY = __webpack_require__(79); @@ -61767,7 +61846,7 @@ module.exports = Center; /***/ }), -/* 270 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61804,7 +61883,7 @@ module.exports = CenterOn; /***/ }), -/* 271 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61848,7 +61927,7 @@ module.exports = LeftCenter; /***/ }), -/* 272 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61892,7 +61971,7 @@ module.exports = RightCenter; /***/ }), -/* 273 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61936,7 +62015,7 @@ module.exports = TopCenter; /***/ }), -/* 274 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61980,7 +62059,7 @@ module.exports = TopLeft; /***/ }), -/* 275 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62024,7 +62103,7 @@ module.exports = TopRight; /***/ }), -/* 276 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62033,7 +62112,7 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(157); +var CircumferencePoint = __webpack_require__(159); var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -62067,7 +62146,7 @@ module.exports = GetPoint; /***/ }), -/* 277 */ +/* 278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62076,8 +62155,8 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(278); -var CircumferencePoint = __webpack_require__(157); +var Circumference = __webpack_require__(279); +var CircumferencePoint = __webpack_require__(159); var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); @@ -62119,7 +62198,7 @@ module.exports = GetPoints; /***/ }), -/* 278 */ +/* 279 */ /***/ (function(module, exports) { /** @@ -62147,7 +62226,7 @@ module.exports = Circumference; /***/ }), -/* 279 */ +/* 280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62257,7 +62336,7 @@ module.exports = AlphaSingle; /***/ }), -/* 280 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62379,7 +62458,7 @@ module.exports = BlendMode; /***/ }), -/* 281 */ +/* 282 */ /***/ (function(module, exports) { /** @@ -62472,7 +62551,7 @@ module.exports = Depth; /***/ }), -/* 282 */ +/* 283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62481,8 +62560,8 @@ module.exports = Depth; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(159); -var Perimeter = __webpack_require__(116); +var GetPoint = __webpack_require__(161); +var Perimeter = __webpack_require__(118); // Return an array of points from the perimeter of the rectangle // each spaced out based on the quantity or step required @@ -62526,7 +62605,7 @@ module.exports = GetPoints; /***/ }), -/* 283 */ +/* 284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62565,7 +62644,7 @@ module.exports = GetPoint; /***/ }), -/* 284 */ +/* 285 */ /***/ (function(module, exports) { /** @@ -62609,7 +62688,7 @@ module.exports = RotateAround; /***/ }), -/* 285 */ +/* 286 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62618,8 +62697,8 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapMask = __webpack_require__(286); -var GeometryMask = __webpack_require__(287); +var BitmapMask = __webpack_require__(287); +var GeometryMask = __webpack_require__(288); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -62756,7 +62835,7 @@ module.exports = Mask; /***/ }), -/* 286 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62966,7 +63045,7 @@ var BitmapMask = new Class({ */ preRenderWebGL: function (renderer, maskedObject, camera) { - renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera); + renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera); }, /** @@ -62981,7 +63060,7 @@ var BitmapMask = new Class({ */ postRenderWebGL: function (renderer, camera) { - renderer.pipelines.BitmapMaskPipeline.endMask(this, camera); + renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera); }, /** @@ -63014,7 +63093,7 @@ var BitmapMask = new Class({ /** * Destroys this BitmapMask and nulls any references it holds. - * + * * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, * so be sure to call `clearMask` on any Game Object using it, before destroying it. * @@ -63049,7 +63128,7 @@ module.exports = BitmapMask; /***/ }), -/* 287 */ +/* 288 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63364,7 +63443,7 @@ module.exports = GeometryMask; /***/ }), -/* 288 */ +/* 289 */ /***/ (function(module, exports) { /** @@ -63471,7 +63550,7 @@ module.exports = ScrollFactor; /***/ }), -/* 289 */ +/* 290 */ /***/ (function(module, exports) { /** @@ -63532,7 +63611,7 @@ module.exports = ToJSON; /***/ }), -/* 290 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63543,9 +63622,9 @@ module.exports = ToJSON; var MATH_CONST = __webpack_require__(13); var TransformMatrix = __webpack_require__(31); -var TransformXY = __webpack_require__(164); -var WrapAngle = __webpack_require__(246); -var WrapAngleDegrees = __webpack_require__(247); +var TransformXY = __webpack_require__(166); +var WrapAngle = __webpack_require__(248); +var WrapAngleDegrees = __webpack_require__(249); var Vector2 = __webpack_require__(3); // global bitmask flag for GameObject.renderMask (used by Scale) @@ -64123,7 +64202,7 @@ module.exports = Transform; /***/ }), -/* 291 */ +/* 292 */ /***/ (function(module, exports) { /** @@ -64212,7 +64291,7 @@ module.exports = Visible; /***/ }), -/* 292 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64227,16 +64306,16 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(586), - CHANGE_DATA_KEY: __webpack_require__(587), - REMOVE_DATA: __webpack_require__(588), - SET_DATA: __webpack_require__(589) + CHANGE_DATA: __webpack_require__(589), + CHANGE_DATA_KEY: __webpack_require__(590), + REMOVE_DATA: __webpack_require__(591), + SET_DATA: __webpack_require__(592) }; /***/ }), -/* 293 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64245,7 +64324,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(116); +var Perimeter = __webpack_require__(118); var Point = __webpack_require__(4); @@ -64355,7 +64434,7 @@ module.exports = MarchingAnts; /***/ }), -/* 294 */ +/* 295 */ /***/ (function(module, exports) { /** @@ -64395,7 +64474,7 @@ module.exports = RotateLeft; /***/ }), -/* 295 */ +/* 296 */ /***/ (function(module, exports) { /** @@ -64435,7 +64514,7 @@ module.exports = RotateRight; /***/ }), -/* 296 */ +/* 297 */ /***/ (function(module, exports) { /** @@ -64509,7 +64588,7 @@ module.exports = BresenhamPoints; /***/ }), -/* 297 */ +/* 298 */ /***/ (function(module, exports) { /** @@ -64593,7 +64672,7 @@ module.exports = FindClosestInSorted; /***/ }), -/* 298 */ +/* 299 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64767,7 +64846,7 @@ module.exports = AnimationFrame; /***/ }), -/* 299 */ +/* 300 */ /***/ (function(module, exports) { /** @@ -64805,7 +64884,7 @@ module.exports = SortByDigits; /***/ }), -/* 300 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64814,16 +64893,16 @@ module.exports = SortByDigits; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(170); +var Animation = __webpack_require__(172); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(121); +var CustomMap = __webpack_require__(92); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(120); +var Events = __webpack_require__(122); var GameEvents = __webpack_require__(21); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -var Pad = __webpack_require__(171); -var NumberArray = __webpack_require__(301); +var Pad = __webpack_require__(173); +var NumberArray = __webpack_require__(302); /** * @classdesc @@ -65784,7 +65863,7 @@ module.exports = AnimationManager; /***/ }), -/* 301 */ +/* 302 */ /***/ (function(module, exports) { /** @@ -65877,7 +65956,7 @@ module.exports = NumberArray; /***/ }), -/* 302 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65887,9 +65966,9 @@ module.exports = NumberArray; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(121); +var CustomMap = __webpack_require__(92); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(303); +var Events = __webpack_require__(304); /** * @classdesc @@ -66063,7 +66142,7 @@ module.exports = BaseCache; /***/ }), -/* 303 */ +/* 304 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66078,14 +66157,14 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(660), - REMOVE: __webpack_require__(661) + ADD: __webpack_require__(664), + REMOVE: __webpack_require__(665) }; /***/ }), -/* 304 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66094,7 +66173,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCache = __webpack_require__(302); +var BaseCache = __webpack_require__(303); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(21); @@ -66319,7 +66398,7 @@ module.exports = CacheManager; /***/ }), -/* 305 */ +/* 306 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66328,14 +66407,14 @@ module.exports = CacheManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(92); +var BaseCamera = __webpack_require__(93); var CanvasPool = __webpack_require__(26); -var CenterOn = __webpack_require__(176); +var CenterOn = __webpack_require__(178); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); var Components = __webpack_require__(11); -var Effects = __webpack_require__(313); -var Linear = __webpack_require__(123); +var Effects = __webpack_require__(314); +var Linear = __webpack_require__(124); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -66545,12 +66624,12 @@ var Camera = new Class({ /** * If this Camera is rendering to a texture (via `setRenderToTexture`) then you * have the option to control if it should also render to the Game canvas as well. - * + * * By default, a Camera will render both to its texture and to the Game canvas. - * + * * However, if you set ths property to `false` it will only render to the texture * and skip rendering to the Game canvas. - * + * * Setting this property if the Camera isn't rendering to a texture has no effect. * * @name Phaser.Cameras.Scene2D.Camera#renderToGame @@ -66625,7 +66704,7 @@ var Camera = new Class({ * This is only set if Phaser is running with the WebGL Renderer. * * @name Phaser.Cameras.Scene2D.Camera#pipeline - * @type {any} + * @type {?Phaser.Renderer.WebGL.WebGLPipeline} * @since 3.13.0 */ this.pipeline = null; @@ -66656,7 +66735,7 @@ var Camera = new Class({ * * You should not enable this unless you plan on actually using the texture it creates * somehow, otherwise you're just doubling the work required to render your game. - * + * * If you only require the Camera to render to a texture, and not also to the Game, * them set the `renderToGame` parameter to `false`. * @@ -66721,9 +66800,9 @@ var Camera = new Class({ { var renderer = this.scene.sys.game.renderer; - if (renderer.gl && renderer.hasPipeline(pipeline)) + if (renderer.gl && renderer.pipelines.has(pipeline)) { - this.pipeline = renderer.getPipeline(pipeline); + this.pipeline = renderer.pipelines.get(pipeline); } } else @@ -67373,7 +67452,7 @@ module.exports = Camera; /***/ }), -/* 306 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67426,7 +67505,7 @@ module.exports = HexStringToColor; /***/ }), -/* 307 */ +/* 308 */ /***/ (function(module, exports) { /** @@ -67457,7 +67536,7 @@ module.exports = GetColor32; /***/ }), -/* 308 */ +/* 309 */ /***/ (function(module, exports) { /** @@ -67537,7 +67616,7 @@ module.exports = RGBToHSV; /***/ }), -/* 309 */ +/* 310 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67547,7 +67626,7 @@ module.exports = RGBToHSV; */ var Color = __webpack_require__(32); -var IntegerToRGB = __webpack_require__(310); +var IntegerToRGB = __webpack_require__(311); /** * Converts the given color value into an instance of a Color object. @@ -67570,7 +67649,7 @@ module.exports = IntegerToColor; /***/ }), -/* 310 */ +/* 311 */ /***/ (function(module, exports) { /** @@ -67618,7 +67697,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 311 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67648,7 +67727,7 @@ module.exports = ObjectToColor; /***/ }), -/* 312 */ +/* 313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67694,7 +67773,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 313 */ +/* 314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67709,35 +67788,12 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(684), - Flash: __webpack_require__(685), - Pan: __webpack_require__(686), - Shake: __webpack_require__(719), - RotateTo: __webpack_require__(720), - Zoom: __webpack_require__(721) - -}; - - -/***/ }), -/* 314 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Back - */ - -module.exports = { - - In: __webpack_require__(687), - Out: __webpack_require__(688), - InOut: __webpack_require__(689) + Fade: __webpack_require__(688), + Flash: __webpack_require__(689), + Pan: __webpack_require__(690), + Shake: __webpack_require__(723), + RotateTo: __webpack_require__(724), + Zoom: __webpack_require__(725) }; @@ -67753,14 +67809,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Bounce + * @namespace Phaser.Math.Easing.Back */ module.exports = { - In: __webpack_require__(690), - Out: __webpack_require__(691), - InOut: __webpack_require__(692) + In: __webpack_require__(691), + Out: __webpack_require__(692), + InOut: __webpack_require__(693) }; @@ -67776,14 +67832,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Circular + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { - In: __webpack_require__(693), - Out: __webpack_require__(694), - InOut: __webpack_require__(695) + In: __webpack_require__(694), + Out: __webpack_require__(695), + InOut: __webpack_require__(696) }; @@ -67799,14 +67855,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Cubic + * @namespace Phaser.Math.Easing.Circular */ module.exports = { - In: __webpack_require__(696), - Out: __webpack_require__(697), - InOut: __webpack_require__(698) + In: __webpack_require__(697), + Out: __webpack_require__(698), + InOut: __webpack_require__(699) }; @@ -67822,14 +67878,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Elastic + * @namespace Phaser.Math.Easing.Cubic */ module.exports = { - In: __webpack_require__(699), - Out: __webpack_require__(700), - InOut: __webpack_require__(701) + In: __webpack_require__(700), + Out: __webpack_require__(701), + InOut: __webpack_require__(702) }; @@ -67845,14 +67901,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Expo + * @namespace Phaser.Math.Easing.Elastic */ module.exports = { - In: __webpack_require__(702), - Out: __webpack_require__(703), - InOut: __webpack_require__(704) + In: __webpack_require__(703), + Out: __webpack_require__(704), + InOut: __webpack_require__(705) }; @@ -67867,13 +67923,36 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -module.exports = __webpack_require__(705); +/** + * @namespace Phaser.Math.Easing.Expo + */ + +module.exports = { + + In: __webpack_require__(706), + Out: __webpack_require__(707), + InOut: __webpack_require__(708) + +}; /***/ }), /* 321 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +module.exports = __webpack_require__(709); + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -67886,32 +67965,9 @@ module.exports = __webpack_require__(705); module.exports = { - In: __webpack_require__(706), - Out: __webpack_require__(707), - InOut: __webpack_require__(708) - -}; - - -/***/ }), -/* 322 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Quartic - */ - -module.exports = { - - In: __webpack_require__(709), - Out: __webpack_require__(710), - InOut: __webpack_require__(711) + In: __webpack_require__(710), + Out: __webpack_require__(711), + InOut: __webpack_require__(712) }; @@ -67927,14 +67983,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quintic + * @namespace Phaser.Math.Easing.Quartic */ module.exports = { - In: __webpack_require__(712), - Out: __webpack_require__(713), - InOut: __webpack_require__(714) + In: __webpack_require__(713), + Out: __webpack_require__(714), + InOut: __webpack_require__(715) }; @@ -67950,14 +68006,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Sine + * @namespace Phaser.Math.Easing.Quintic */ module.exports = { - In: __webpack_require__(715), - Out: __webpack_require__(716), - InOut: __webpack_require__(717) + In: __webpack_require__(716), + Out: __webpack_require__(717), + InOut: __webpack_require__(718) }; @@ -67973,16 +68029,39 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Stepped + * @namespace Phaser.Math.Easing.Sine */ -module.exports = __webpack_require__(718); +module.exports = { + + In: __webpack_require__(719), + Out: __webpack_require__(720), + InOut: __webpack_require__(721) + +}; /***/ }), /* 326 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Stepped + */ + +module.exports = __webpack_require__(722); + + +/***/ }), +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -67991,14 +68070,14 @@ module.exports = __webpack_require__(718); var Class = __webpack_require__(0); var CONST = __webpack_require__(34); -var Device = __webpack_require__(327); +var Device = __webpack_require__(328); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var PhaserMath = __webpack_require__(178); +var PhaserMath = __webpack_require__(180); var NOOP = __webpack_require__(1); -var DefaultPlugins = __webpack_require__(182); -var ValueToColor = __webpack_require__(172); +var DefaultPlugins = __webpack_require__(184); +var ValueToColor = __webpack_require__(174); /** * @classdesc @@ -68566,7 +68645,7 @@ module.exports = Config; /***/ }), -/* 327 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68600,20 +68679,20 @@ module.exports = Config; module.exports = { - os: __webpack_require__(124), - browser: __webpack_require__(125), - features: __webpack_require__(177), - input: __webpack_require__(752), - audio: __webpack_require__(753), - video: __webpack_require__(754), - fullscreen: __webpack_require__(755), - canvasFeatures: __webpack_require__(328) + os: __webpack_require__(125), + browser: __webpack_require__(126), + features: __webpack_require__(179), + input: __webpack_require__(756), + audio: __webpack_require__(757), + video: __webpack_require__(758), + fullscreen: __webpack_require__(759), + canvasFeatures: __webpack_require__(329) }; /***/ }), -/* 328 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68727,7 +68806,7 @@ module.exports = init(); /***/ }), -/* 329 */ +/* 330 */ /***/ (function(module, exports) { /** @@ -68758,7 +68837,7 @@ module.exports = Between; /***/ }), -/* 330 */ +/* 331 */ /***/ (function(module, exports) { /** @@ -68789,7 +68868,7 @@ module.exports = BetweenPoints; /***/ }), -/* 331 */ +/* 332 */ /***/ (function(module, exports) { /** @@ -68826,7 +68905,7 @@ module.exports = Normalize; /***/ }), -/* 332 */ +/* 333 */ /***/ (function(module, exports) { /** @@ -68858,7 +68937,7 @@ module.exports = DistanceBetweenPoints; /***/ }), -/* 333 */ +/* 334 */ /***/ (function(module, exports) { /** @@ -68892,7 +68971,7 @@ module.exports = DistanceSquared; /***/ }), -/* 334 */ +/* 335 */ /***/ (function(module, exports) { /** @@ -68926,7 +69005,7 @@ module.exports = GreaterThan; /***/ }), -/* 335 */ +/* 336 */ /***/ (function(module, exports) { /** @@ -68960,7 +69039,7 @@ module.exports = LessThan; /***/ }), -/* 336 */ +/* 337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68969,7 +69048,7 @@ module.exports = LessThan; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(337); +var Factorial = __webpack_require__(338); /** * Calculates the Bernstein basis from the three factorial coefficients. @@ -68991,7 +69070,7 @@ module.exports = Bernstein; /***/ }), -/* 337 */ +/* 338 */ /***/ (function(module, exports) { /** @@ -69031,7 +69110,7 @@ module.exports = Factorial; /***/ }), -/* 338 */ +/* 339 */ /***/ (function(module, exports) { /** @@ -69101,7 +69180,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 339 */ +/* 340 */ /***/ (function(module, exports) { /** @@ -69160,7 +69239,7 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 340 */ +/* 341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69169,7 +69248,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(169); +var SmoothStep = __webpack_require__(171); /** * A Smooth Step interpolation method. @@ -69193,7 +69272,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 341 */ +/* 342 */ /***/ (function(module, exports) { /** @@ -69223,7 +69302,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 342 */ +/* 343 */ /***/ (function(module, exports) { /** @@ -69267,7 +69346,7 @@ module.exports = SnapCeil; /***/ }), -/* 343 */ +/* 344 */ /***/ (function(module, exports) { /** @@ -69302,7 +69381,7 @@ module.exports = Rotate; /***/ }), -/* 344 */ +/* 345 */ /***/ (function(module, exports) { /** @@ -69331,7 +69410,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 345 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69924,7 +70003,7 @@ module.exports = Matrix3; /***/ }), -/* 346 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71386,7 +71465,7 @@ module.exports = Matrix4; /***/ }), -/* 347 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71400,7 +71479,7 @@ module.exports = Matrix4; var Class = __webpack_require__(0); var Vector3 = __webpack_require__(81); -var Matrix3 = __webpack_require__(345); +var Matrix3 = __webpack_require__(346); var EPSILON = 0.000001; @@ -72158,7 +72237,7 @@ module.exports = Quaternion; /***/ }), -/* 348 */ +/* 349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72167,10 +72246,10 @@ module.exports = Quaternion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasInterpolation = __webpack_require__(349); +var CanvasInterpolation = __webpack_require__(350); var CanvasPool = __webpack_require__(26); var CONST = __webpack_require__(34); -var Features = __webpack_require__(177); +var Features = __webpack_require__(179); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -72260,8 +72339,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(531); - WebGLRenderer = __webpack_require__(534); + CanvasRenderer = __webpack_require__(532); + WebGLRenderer = __webpack_require__(535); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -72286,7 +72365,7 @@ module.exports = CreateRenderer; /***/ }), -/* 349 */ +/* 350 */ /***/ (function(module, exports) { /** @@ -72349,7 +72428,7 @@ module.exports = CanvasInterpolation; /***/ }), -/* 350 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72479,7 +72558,7 @@ module.exports = DebugHeader; /***/ }), -/* 351 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72491,7 +72570,7 @@ module.exports = DebugHeader; var Class = __webpack_require__(0); var GetValue = __webpack_require__(6); var NOOP = __webpack_require__(1); -var RequestAnimationFrame = __webpack_require__(352); +var RequestAnimationFrame = __webpack_require__(353); // http://www.testufo.com/#test=animation-time-graph @@ -73209,7 +73288,7 @@ module.exports = TimeStep; /***/ }), -/* 352 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73423,7 +73502,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 353 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73514,7 +73593,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 354 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73523,7 +73602,7 @@ module.exports = VisibilityHandler; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arne16 = __webpack_require__(355); +var Arne16 = __webpack_require__(356); var CanvasPool = __webpack_require__(26); var GetValue = __webpack_require__(6); @@ -73636,7 +73715,7 @@ module.exports = GenerateTexture; /***/ }), -/* 355 */ +/* 356 */ /***/ (function(module, exports) { /** @@ -73674,7 +73753,7 @@ module.exports = { /***/ }), -/* 356 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73686,7 +73765,7 @@ module.exports = { // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezier = __webpack_require__(338); +var CubicBezier = __webpack_require__(339); var Curve = __webpack_require__(83); var Vector2 = __webpack_require__(3); @@ -73901,7 +73980,7 @@ module.exports = CubicBezierCurve; /***/ }), -/* 357 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73916,7 +73995,7 @@ var Class = __webpack_require__(0); var Curve = __webpack_require__(83); var DegToRad = __webpack_require__(41); var GetValue = __webpack_require__(6); -var RadToDeg = __webpack_require__(181); +var RadToDeg = __webpack_require__(183); var Vector2 = __webpack_require__(3); /** @@ -74525,7 +74604,7 @@ module.exports = EllipseCurve; /***/ }), -/* 358 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74538,7 +74617,7 @@ module.exports = EllipseCurve; var Class = __webpack_require__(0); var Curve = __webpack_require__(83); -var FromPoints = __webpack_require__(184); +var FromPoints = __webpack_require__(186); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -74828,7 +74907,7 @@ module.exports = LineCurve; /***/ }), -/* 359 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74967,7 +75046,7 @@ module.exports = MoveTo; /***/ }), -/* 360 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74978,7 +75057,7 @@ module.exports = MoveTo; var Class = __webpack_require__(0); var Curve = __webpack_require__(83); -var QuadraticBezierInterpolation = __webpack_require__(339); +var QuadraticBezierInterpolation = __webpack_require__(340); var Vector2 = __webpack_require__(3); /** @@ -75184,7 +75263,7 @@ module.exports = QuadraticBezier; /***/ }), -/* 361 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75195,7 +75274,7 @@ module.exports = QuadraticBezier; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(179); +var CatmullRom = __webpack_require__(181); var Class = __webpack_require__(0); var Curve = __webpack_require__(83); var Vector2 = __webpack_require__(3); @@ -75409,7 +75488,7 @@ module.exports = SplineCurve; /***/ }), -/* 362 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75535,7 +75614,7 @@ module.exports = BaseShader; /***/ }), -/* 363 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75546,31 +75625,31 @@ module.exports = BaseShader; var Color = __webpack_require__(32); -Color.ColorToRGBA = __webpack_require__(836); -Color.ComponentToHex = __webpack_require__(364); -Color.GetColor = __webpack_require__(173); -Color.GetColor32 = __webpack_require__(307); -Color.GetColorFromValue = __webpack_require__(117); -Color.HexStringToColor = __webpack_require__(306); -Color.HSLToColor = __webpack_require__(837); -Color.HSVColorWheel = __webpack_require__(838); -Color.HSVToRGB = __webpack_require__(174); -Color.HueToComponent = __webpack_require__(365); -Color.IntegerToColor = __webpack_require__(309); -Color.IntegerToRGB = __webpack_require__(310); -Color.Interpolate = __webpack_require__(839); -Color.ObjectToColor = __webpack_require__(311); -Color.RandomRGB = __webpack_require__(840); -Color.RGBStringToColor = __webpack_require__(312); -Color.RGBToHSV = __webpack_require__(308); -Color.RGBToString = __webpack_require__(841); -Color.ValueToColor = __webpack_require__(172); +Color.ColorToRGBA = __webpack_require__(840); +Color.ComponentToHex = __webpack_require__(365); +Color.GetColor = __webpack_require__(175); +Color.GetColor32 = __webpack_require__(308); +Color.GetColorFromValue = __webpack_require__(119); +Color.HexStringToColor = __webpack_require__(307); +Color.HSLToColor = __webpack_require__(841); +Color.HSVColorWheel = __webpack_require__(842); +Color.HSVToRGB = __webpack_require__(176); +Color.HueToComponent = __webpack_require__(366); +Color.IntegerToColor = __webpack_require__(310); +Color.IntegerToRGB = __webpack_require__(311); +Color.Interpolate = __webpack_require__(843); +Color.ObjectToColor = __webpack_require__(312); +Color.RandomRGB = __webpack_require__(844); +Color.RGBStringToColor = __webpack_require__(313); +Color.RGBToHSV = __webpack_require__(309); +Color.RGBToString = __webpack_require__(845); +Color.ValueToColor = __webpack_require__(174); module.exports = Color; /***/ }), -/* 364 */ +/* 365 */ /***/ (function(module, exports) { /** @@ -75600,7 +75679,7 @@ module.exports = ComponentToHex; /***/ }), -/* 365 */ +/* 366 */ /***/ (function(module, exports) { /** @@ -75656,7 +75735,7 @@ module.exports = HueToComponent; /***/ }), -/* 366 */ +/* 367 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75665,7 +75744,7 @@ module.exports = HueToComponent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(124); +var OS = __webpack_require__(125); /** * @callback ContentLoadedCallback @@ -75719,7 +75798,7 @@ module.exports = DOMContentLoaded; /***/ }), -/* 367 */ +/* 368 */ /***/ (function(module, exports) { /** @@ -75778,7 +75857,7 @@ module.exports = GetInnerHeight; /***/ }), -/* 368 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75787,7 +75866,7 @@ module.exports = GetInnerHeight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(185); +var CONST = __webpack_require__(187); /** * Attempts to determine the screen orientation using the Orientation API. @@ -75844,7 +75923,7 @@ module.exports = GetScreenOrientation; /***/ }), -/* 369 */ +/* 370 */ /***/ (function(module, exports) { /** @@ -75930,7 +76009,7 @@ module.exports = { /***/ }), -/* 370 */ +/* 371 */ /***/ (function(module, exports) { /** @@ -75983,7 +76062,7 @@ module.exports = { /***/ }), -/* 371 */ +/* 372 */ /***/ (function(module, exports) { /** @@ -76081,7 +76160,7 @@ module.exports = { /***/ }), -/* 372 */ +/* 373 */ /***/ (function(module, exports) { /** @@ -76155,7 +76234,7 @@ module.exports = { /***/ }), -/* 373 */ +/* 374 */ /***/ (function(module, exports) { /** @@ -76206,7 +76285,7 @@ module.exports = GetTarget; /***/ }), -/* 374 */ +/* 375 */ /***/ (function(module, exports) { /** @@ -76263,7 +76342,7 @@ module.exports = ParseXML; /***/ }), -/* 375 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76273,16 +76352,16 @@ module.exports = ParseXML; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(187); +var CONST = __webpack_require__(189); var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(56); var GameEvents = __webpack_require__(21); -var Keyboard = __webpack_require__(376); -var Mouse = __webpack_require__(377); -var Pointer = __webpack_require__(378); -var Touch = __webpack_require__(379); +var Keyboard = __webpack_require__(377); +var Mouse = __webpack_require__(378); +var Pointer = __webpack_require__(379); +var Touch = __webpack_require__(380); var TransformMatrix = __webpack_require__(31); -var TransformXY = __webpack_require__(164); +var TransformXY = __webpack_require__(166); /** * @classdesc @@ -77345,7 +77424,7 @@ module.exports = InputManager; /***/ }), -/* 376 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77354,11 +77433,11 @@ module.exports = InputManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(95); +var ArrayRemove = __webpack_require__(96); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(21); var InputEvents = __webpack_require__(56); -var KeyCodes = __webpack_require__(131); +var KeyCodes = __webpack_require__(132); var NOOP = __webpack_require__(1); /** @@ -77789,7 +77868,7 @@ module.exports = KeyboardManager; /***/ }), -/* 377 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77799,7 +77878,7 @@ module.exports = KeyboardManager; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(177); +var Features = __webpack_require__(179); var InputEvents = __webpack_require__(56); var NOOP = __webpack_require__(1); @@ -78275,7 +78354,7 @@ module.exports = MouseManager; /***/ }), -/* 378 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78284,11 +78363,11 @@ module.exports = MouseManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(329); +var Angle = __webpack_require__(330); var Class = __webpack_require__(0); var Distance = __webpack_require__(55); -var FuzzyEqual = __webpack_require__(108); -var SmoothStepInterpolation = __webpack_require__(340); +var FuzzyEqual = __webpack_require__(109); +var SmoothStepInterpolation = __webpack_require__(341); var Vector2 = __webpack_require__(3); /** @@ -79562,7 +79641,7 @@ module.exports = Pointer; /***/ }), -/* 379 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79975,7 +80054,7 @@ module.exports = TouchManager; /***/ }), -/* 380 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79992,7 +80071,7 @@ var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var Remove = __webpack_require__(95); +var Remove = __webpack_require__(96); /** * @classdesc @@ -80877,7 +80956,7 @@ module.exports = PluginManager; /***/ }), -/* 381 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80886,18 +80965,18 @@ module.exports = PluginManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(185); +var CONST = __webpack_require__(187); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(93); +var Events = __webpack_require__(94); var GameEvents = __webpack_require__(21); -var GetInnerHeight = __webpack_require__(367); -var GetTarget = __webpack_require__(373); -var GetScreenOrientation = __webpack_require__(368); +var GetInnerHeight = __webpack_require__(368); +var GetTarget = __webpack_require__(374); +var GetScreenOrientation = __webpack_require__(369); var NOOP = __webpack_require__(1); var Rectangle = __webpack_require__(9); -var Size = __webpack_require__(382); -var SnapFloor = __webpack_require__(94); +var Size = __webpack_require__(383); +var SnapFloor = __webpack_require__(95); var Vector2 = __webpack_require__(3); /** @@ -82588,7 +82667,7 @@ module.exports = ScaleManager; /***/ }), -/* 382 */ +/* 383 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82599,7 +82678,7 @@ module.exports = ScaleManager; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var SnapFloor = __webpack_require__(94); +var SnapFloor = __webpack_require__(95); var Vector2 = __webpack_require__(3); /** @@ -83366,7 +83445,7 @@ module.exports = Size; /***/ }), -/* 383 */ +/* 384 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83376,14 +83455,14 @@ module.exports = Size; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(132); +var CONST = __webpack_require__(133); var Events = __webpack_require__(20); var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(6); var LoaderEvents = __webpack_require__(84); var NOOP = __webpack_require__(1); -var Scene = __webpack_require__(384); -var Systems = __webpack_require__(188); +var Scene = __webpack_require__(385); +var Systems = __webpack_require__(190); /** * @classdesc @@ -85004,7 +85083,7 @@ module.exports = SceneManager; /***/ }), -/* 384 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85014,7 +85093,7 @@ module.exports = SceneManager; */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(188); +var Systems = __webpack_require__(190); /** * @classdesc @@ -85290,7 +85369,7 @@ module.exports = Scene; /***/ }), -/* 385 */ +/* 386 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85300,7 +85379,7 @@ module.exports = Scene; */ var GetFastValue = __webpack_require__(2); -var UppercaseFirst = __webpack_require__(189); +var UppercaseFirst = __webpack_require__(191); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -85352,7 +85431,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 386 */ +/* 387 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85399,7 +85478,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 387 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85408,10 +85487,10 @@ module.exports = GetScenePlugins; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(132); +var CONST = __webpack_require__(133); var GetValue = __webpack_require__(6); -var Merge = __webpack_require__(133); -var InjectionMap = __webpack_require__(904); +var Merge = __webpack_require__(134); +var InjectionMap = __webpack_require__(908); /** * @namespace Phaser.Scenes.Settings @@ -85495,7 +85574,7 @@ module.exports = Settings; /***/ }), -/* 388 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85505,17 +85584,17 @@ module.exports = Settings; */ var CanvasPool = __webpack_require__(26); -var CanvasTexture = __webpack_require__(389); +var CanvasTexture = __webpack_require__(390); var Class = __webpack_require__(0); var Color = __webpack_require__(32); var CONST = __webpack_require__(34); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(129); +var Events = __webpack_require__(130); var GameEvents = __webpack_require__(21); -var GenerateTexture = __webpack_require__(354); +var GenerateTexture = __webpack_require__(355); var GetValue = __webpack_require__(6); -var Parser = __webpack_require__(391); -var Texture = __webpack_require__(190); +var Parser = __webpack_require__(392); +var Texture = __webpack_require__(192); /** * @callback EachTextureCallback @@ -86697,7 +86776,7 @@ module.exports = TextureManager; /***/ }), -/* 389 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86710,8 +86789,8 @@ var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); var Color = __webpack_require__(32); var CONST = __webpack_require__(34); -var IsSizePowerOfTwo = __webpack_require__(127); -var Texture = __webpack_require__(190); +var IsSizePowerOfTwo = __webpack_require__(128); +var Texture = __webpack_require__(192); /** * @classdesc @@ -87332,7 +87411,7 @@ module.exports = CanvasTexture; /***/ }), -/* 390 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87343,8 +87422,8 @@ module.exports = CanvasTexture; var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var IsSizePowerOfTwo = __webpack_require__(127); -var ScaleModes = __webpack_require__(245); +var IsSizePowerOfTwo = __webpack_require__(128); +var ScaleModes = __webpack_require__(247); /** * @classdesc @@ -87697,7 +87776,7 @@ module.exports = TextureSource; /***/ }), -/* 391 */ +/* 392 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87712,20 +87791,20 @@ module.exports = TextureSource; module.exports = { - AtlasXML: __webpack_require__(905), - Canvas: __webpack_require__(906), - Image: __webpack_require__(907), - JSONArray: __webpack_require__(908), - JSONHash: __webpack_require__(909), - SpriteSheet: __webpack_require__(910), - SpriteSheetFromAtlas: __webpack_require__(911), - UnityYAML: __webpack_require__(912) + AtlasXML: __webpack_require__(909), + Canvas: __webpack_require__(910), + Image: __webpack_require__(911), + JSONArray: __webpack_require__(912), + JSONHash: __webpack_require__(913), + SpriteSheet: __webpack_require__(914), + SpriteSheetFromAtlas: __webpack_require__(915), + UnityYAML: __webpack_require__(916) }; /***/ }), -/* 392 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87735,9 +87814,9 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(393); -var NoAudioSoundManager = __webpack_require__(396); -var WebAudioSoundManager = __webpack_require__(398); +var HTML5AudioSoundManager = __webpack_require__(394); +var NoAudioSoundManager = __webpack_require__(397); +var WebAudioSoundManager = __webpack_require__(399); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -87777,7 +87856,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 393 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87787,10 +87866,10 @@ module.exports = SoundManagerCreator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(134); +var BaseSoundManager = __webpack_require__(135); var Class = __webpack_require__(0); var Events = __webpack_require__(61); -var HTML5AudioSound = __webpack_require__(395); +var HTML5AudioSound = __webpack_require__(396); /** * HTML5 Audio implementation of the Sound Manager. @@ -88246,7 +88325,7 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 394 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88305,7 +88384,7 @@ module.exports = GetFirst; /***/ }), -/* 395 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88315,7 +88394,7 @@ module.exports = GetFirst; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(135); +var BaseSound = __webpack_require__(136); var Class = __webpack_require__(0); var Events = __webpack_require__(61); var Clamp = __webpack_require__(17); @@ -89235,7 +89314,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 396 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89245,10 +89324,10 @@ module.exports = HTML5AudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(134); +var BaseSoundManager = __webpack_require__(135); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var NoAudioSound = __webpack_require__(397); +var NoAudioSound = __webpack_require__(398); var NOOP = __webpack_require__(1); /** @@ -89353,7 +89432,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 397 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89363,7 +89442,7 @@ module.exports = NoAudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(135); +var BaseSound = __webpack_require__(136); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); var Extend = __webpack_require__(19); @@ -89544,7 +89623,7 @@ module.exports = NoAudioSound; /***/ }), -/* 398 */ +/* 399 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89554,11 +89633,11 @@ module.exports = NoAudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64ToArrayBuffer = __webpack_require__(399); -var BaseSoundManager = __webpack_require__(134); +var Base64ToArrayBuffer = __webpack_require__(400); +var BaseSoundManager = __webpack_require__(135); var Class = __webpack_require__(0); var Events = __webpack_require__(61); -var WebAudioSound = __webpack_require__(400); +var WebAudioSound = __webpack_require__(401); /** * @classdesc @@ -90007,7 +90086,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 399 */ +/* 400 */ /***/ (function(module, exports) { /** @@ -90082,7 +90161,7 @@ module.exports = Base64ToArrayBuffer; /***/ }), -/* 400 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90092,7 +90171,7 @@ module.exports = Base64ToArrayBuffer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(135); +var BaseSound = __webpack_require__(136); var Class = __webpack_require__(0); var Events = __webpack_require__(61); @@ -90988,7 +91067,7 @@ module.exports = WebAudioSound; /***/ }), -/* 401 */ +/* 402 */ /***/ (function(module, exports) { /** @@ -91036,7 +91115,7 @@ module.exports = TransposeMatrix; /***/ }), -/* 402 */ +/* 403 */ /***/ (function(module, exports) { /** @@ -91158,7 +91237,7 @@ module.exports = QuickSelect; /***/ }), -/* 403 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91168,7 +91247,7 @@ module.exports = QuickSelect; */ var GetValue = __webpack_require__(6); -var Shuffle = __webpack_require__(119); +var Shuffle = __webpack_require__(121); var BuildChunk = function (a, b, qty) { @@ -91296,7 +91375,7 @@ module.exports = Range; /***/ }), -/* 404 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91311,14 +91390,14 @@ module.exports = Range; module.exports = { - PROCESS_QUEUE_ADD: __webpack_require__(963), - PROCESS_QUEUE_REMOVE: __webpack_require__(964) + PROCESS_QUEUE_ADD: __webpack_require__(967), + PROCESS_QUEUE_REMOVE: __webpack_require__(968) }; /***/ }), -/* 405 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91415,7 +91494,7 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 406 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91425,7 +91504,7 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(96); +var Frame = __webpack_require__(97); /** * @classdesc @@ -91845,7 +91924,7 @@ module.exports = Bob; /***/ }), -/* 407 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91887,7 +91966,7 @@ module.exports = Union; /***/ }), -/* 408 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91898,13 +91977,13 @@ module.exports = Union; var Class = __webpack_require__(0); var Components = __webpack_require__(11); -var DOMElementRender = __webpack_require__(977); +var DOMElementRender = __webpack_require__(981); var GameObject = __webpack_require__(14); var GameObjectEvents = __webpack_require__(29); var IsPlainObject = __webpack_require__(7); -var RemoveFromDOM = __webpack_require__(186); +var RemoveFromDOM = __webpack_require__(188); var SCENE_EVENTS = __webpack_require__(20); -var Vector4 = __webpack_require__(128); +var Vector4 = __webpack_require__(129); /** * @classdesc @@ -92883,7 +92962,7 @@ module.exports = DOMElement; /***/ }), -/* 409 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92892,7 +92971,7 @@ module.exports = DOMElement; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(978); +var CSSBlendModes = __webpack_require__(982); var GameObject = __webpack_require__(14); /** @@ -93005,7 +93084,7 @@ module.exports = DOMElementCSSRenderer; /***/ }), -/* 410 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93018,7 +93097,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GameObjectEvents = __webpack_require__(29); -var ExternRender = __webpack_require__(982); +var ExternRender = __webpack_require__(986); /** * @classdesc @@ -93117,7 +93196,7 @@ module.exports = Extern; /***/ }), -/* 411 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93126,7 +93205,7 @@ module.exports = Extern; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(202); +var CircumferencePoint = __webpack_require__(204); var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -93160,7 +93239,7 @@ module.exports = GetPoint; /***/ }), -/* 412 */ +/* 413 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93169,8 +93248,8 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(413); -var CircumferencePoint = __webpack_require__(202); +var Circumference = __webpack_require__(414); +var CircumferencePoint = __webpack_require__(204); var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); @@ -93214,7 +93293,7 @@ module.exports = GetPoints; /***/ }), -/* 413 */ +/* 414 */ /***/ (function(module, exports) { /** @@ -93246,7 +93325,7 @@ module.exports = Circumference; /***/ }), -/* 414 */ +/* 415 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93255,7 +93334,7 @@ module.exports = Circumference; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(201); +var Commands = __webpack_require__(203); var SetTransform = __webpack_require__(28); /** @@ -93496,7 +93575,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 415 */ +/* 416 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93506,7 +93585,7 @@ module.exports = GraphicsCanvasRenderer; */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(126); +var FloatBetween = __webpack_require__(127); var GetEaseFunction = __webpack_require__(71); var GetFastValue = __webpack_require__(2); var Wrap = __webpack_require__(59); @@ -94087,7 +94166,7 @@ module.exports = EmitterOp; /***/ }), -/* 416 */ +/* 417 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94306,7 +94385,7 @@ module.exports = GravityWell; /***/ }), -/* 417 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94875,7 +94954,7 @@ module.exports = Particle; /***/ }), -/* 418 */ +/* 419 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94887,17 +94966,17 @@ module.exports = Particle; var BlendModes = __webpack_require__(54); var Class = __webpack_require__(0); var Components = __webpack_require__(11); -var DeathZone = __webpack_require__(419); -var EdgeZone = __webpack_require__(420); -var EmitterOp = __webpack_require__(415); +var DeathZone = __webpack_require__(420); +var EdgeZone = __webpack_require__(421); +var EmitterOp = __webpack_require__(416); var GetFastValue = __webpack_require__(2); -var GetRandom = __webpack_require__(194); -var HasAny = __webpack_require__(421); -var HasValue = __webpack_require__(113); -var Particle = __webpack_require__(417); -var RandomZone = __webpack_require__(422); +var GetRandom = __webpack_require__(196); +var HasAny = __webpack_require__(422); +var HasValue = __webpack_require__(115); +var Particle = __webpack_require__(418); +var RandomZone = __webpack_require__(423); var Rectangle = __webpack_require__(9); -var StableSort = __webpack_require__(138); +var StableSort = __webpack_require__(139); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(59); @@ -96946,7 +97025,7 @@ module.exports = ParticleEmitter; /***/ }), -/* 419 */ +/* 420 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97024,7 +97103,7 @@ module.exports = DeathZone; /***/ }), -/* 420 */ +/* 421 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97268,7 +97347,7 @@ module.exports = EdgeZone; /***/ }), -/* 421 */ +/* 422 */ /***/ (function(module, exports) { /** @@ -97305,7 +97384,7 @@ module.exports = HasAny; /***/ }), -/* 422 */ +/* 423 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97378,7 +97457,7 @@ module.exports = RandomZone; /***/ }), -/* 423 */ +/* 424 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97460,7 +97539,7 @@ module.exports = PathFollower; /***/ }), -/* 424 */ +/* 425 */ /***/ (function(module, exports) { /** @@ -97542,7 +97621,7 @@ module.exports = GetTextSize; /***/ }), -/* 425 */ +/* 426 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97554,7 +97633,7 @@ module.exports = GetTextSize; var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var MeasureText = __webpack_require__(426); +var MeasureText = __webpack_require__(427); // Key: [ Object Key, Default Value ] @@ -98648,7 +98727,7 @@ module.exports = TextStyle; /***/ }), -/* 426 */ +/* 427 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98783,7 +98862,7 @@ module.exports = MeasureText; /***/ }), -/* 427 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98792,7 +98871,7 @@ module.exports = MeasureText; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(1016); +var ArcRender = __webpack_require__(1020); var Class = __webpack_require__(0); var DegToRad = __webpack_require__(41); var Earcut = __webpack_require__(60); @@ -99192,7 +99271,7 @@ module.exports = Arc; /***/ }), -/* 428 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99202,7 +99281,7 @@ module.exports = Arc; */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(1019); +var CurveRender = __webpack_require__(1023); var Earcut = __webpack_require__(60); var Rectangle = __webpack_require__(9); var Shape = __webpack_require__(30); @@ -99374,7 +99453,7 @@ module.exports = Curve; /***/ }), -/* 429 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99385,8 +99464,8 @@ module.exports = Curve; var Class = __webpack_require__(0); var Earcut = __webpack_require__(60); -var EllipseRender = __webpack_require__(1022); -var GeomEllipse = __webpack_require__(97); +var EllipseRender = __webpack_require__(1026); +var GeomEllipse = __webpack_require__(98); var Shape = __webpack_require__(30); /** @@ -99561,7 +99640,7 @@ module.exports = Ellipse; /***/ }), -/* 430 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99572,7 +99651,7 @@ module.exports = Ellipse; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); -var GridRender = __webpack_require__(1025); +var GridRender = __webpack_require__(1029); /** * @classdesc @@ -99836,7 +99915,7 @@ module.exports = Grid; /***/ }), -/* 431 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99845,7 +99924,7 @@ module.exports = Grid; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(1028); +var IsoBoxRender = __webpack_require__(1032); var Class = __webpack_require__(0); var Shape = __webpack_require__(30); @@ -100051,7 +100130,7 @@ module.exports = IsoBox; /***/ }), -/* 432 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100061,7 +100140,7 @@ module.exports = IsoBox; */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(1031); +var IsoTriangleRender = __webpack_require__(1035); var Shape = __webpack_require__(30); /** @@ -100297,7 +100376,7 @@ module.exports = IsoTriangle; /***/ }), -/* 433 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100309,7 +100388,7 @@ module.exports = IsoTriangle; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); var GeomLine = __webpack_require__(40); -var LineRender = __webpack_require__(1034); +var LineRender = __webpack_require__(1038); /** * @classdesc @@ -100464,7 +100543,7 @@ module.exports = Line; /***/ }), -/* 434 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100473,13 +100552,13 @@ module.exports = Line; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1037); +var PolygonRender = __webpack_require__(1041); var Class = __webpack_require__(0); var Earcut = __webpack_require__(60); -var GetAABB = __webpack_require__(435); -var GeomPolygon = __webpack_require__(210); +var GetAABB = __webpack_require__(436); +var GeomPolygon = __webpack_require__(212); var Shape = __webpack_require__(30); -var Smooth = __webpack_require__(438); +var Smooth = __webpack_require__(439); /** * @classdesc @@ -100603,7 +100682,7 @@ module.exports = Polygon; /***/ }), -/* 435 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100659,7 +100738,7 @@ module.exports = GetAABB; /***/ }), -/* 436 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100670,7 +100749,7 @@ module.exports = GetAABB; var Length = __webpack_require__(58); var Line = __webpack_require__(40); -var Perimeter = __webpack_require__(437); +var Perimeter = __webpack_require__(438); /** * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon, @@ -100736,7 +100815,7 @@ module.exports = GetPoints; /***/ }), -/* 437 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100784,7 +100863,7 @@ module.exports = Perimeter; /***/ }), -/* 438 */ +/* 439 */ /***/ (function(module, exports) { /** @@ -100860,7 +100939,7 @@ module.exports = Smooth; /***/ }), -/* 439 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100872,7 +100951,7 @@ module.exports = Smooth; var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(9); var Shape = __webpack_require__(30); -var RectangleRender = __webpack_require__(1040); +var RectangleRender = __webpack_require__(1044); /** * @classdesc @@ -101003,7 +101082,7 @@ module.exports = Rectangle; /***/ }), -/* 440 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101012,7 +101091,7 @@ module.exports = Rectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1043); +var StarRender = __webpack_require__(1047); var Class = __webpack_require__(0); var Earcut = __webpack_require__(60); var Shape = __webpack_require__(30); @@ -101291,7 +101370,7 @@ module.exports = Star; /***/ }), -/* 441 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101303,7 +101382,7 @@ module.exports = Star; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); var GeomTriangle = __webpack_require__(73); -var TriangleRender = __webpack_require__(1046); +var TriangleRender = __webpack_require__(1050); /** * @classdesc @@ -101434,7 +101513,7 @@ module.exports = Triangle; /***/ }), -/* 442 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101521,7 +101600,7 @@ module.exports = GetPoint; /***/ }), -/* 443 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101614,7 +101693,7 @@ module.exports = GetPoints; /***/ }), -/* 444 */ +/* 445 */ /***/ (function(module, exports) { /** @@ -101697,7 +101776,7 @@ module.exports = SetValue; /***/ }), -/* 445 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102188,7 +102267,7 @@ module.exports = Light; /***/ }), -/* 446 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102198,7 +102277,7 @@ module.exports = Light; */ var Class = __webpack_require__(0); -var Light = __webpack_require__(445); +var Light = __webpack_require__(446); var Utils = __webpack_require__(10); /** @@ -102557,7 +102636,7 @@ module.exports = LightsManager; /***/ }), -/* 447 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102575,14 +102654,14 @@ var Extend = __webpack_require__(19); var Geom = { - Circle: __webpack_require__(1106), - Ellipse: __webpack_require__(1116), - Intersects: __webpack_require__(448), - Line: __webpack_require__(1136), - Point: __webpack_require__(1158), - Polygon: __webpack_require__(1172), - Rectangle: __webpack_require__(464), - Triangle: __webpack_require__(1205) + Circle: __webpack_require__(1110), + Ellipse: __webpack_require__(1120), + Intersects: __webpack_require__(449), + Line: __webpack_require__(1140), + Point: __webpack_require__(1162), + Polygon: __webpack_require__(1176), + Rectangle: __webpack_require__(465), + Triangle: __webpack_require__(1209) }; @@ -102593,7 +102672,7 @@ module.exports = Geom; /***/ }), -/* 448 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102608,39 +102687,39 @@ module.exports = Geom; module.exports = { - CircleToCircle: __webpack_require__(214), - CircleToRectangle: __webpack_require__(215), - GetCircleToCircle: __webpack_require__(1126), - GetCircleToRectangle: __webpack_require__(1127), - GetLineToCircle: __webpack_require__(216), - GetLineToLine: __webpack_require__(449), - GetLineToPoints: __webpack_require__(450), - GetLineToPolygon: __webpack_require__(451), - GetLineToRectangle: __webpack_require__(218), - GetRaysFromPointToPolygon: __webpack_require__(1128), - GetRectangleIntersection: __webpack_require__(1129), - GetRectangleToRectangle: __webpack_require__(1130), - GetRectangleToTriangle: __webpack_require__(1131), - GetTriangleToCircle: __webpack_require__(1132), - GetTriangleToLine: __webpack_require__(456), - GetTriangleToTriangle: __webpack_require__(1133), - LineToCircle: __webpack_require__(217), + CircleToCircle: __webpack_require__(216), + CircleToRectangle: __webpack_require__(217), + GetCircleToCircle: __webpack_require__(1130), + GetCircleToRectangle: __webpack_require__(1131), + GetLineToCircle: __webpack_require__(218), + GetLineToLine: __webpack_require__(450), + GetLineToPoints: __webpack_require__(451), + GetLineToPolygon: __webpack_require__(452), + GetLineToRectangle: __webpack_require__(220), + GetRaysFromPointToPolygon: __webpack_require__(1132), + GetRectangleIntersection: __webpack_require__(1133), + GetRectangleToRectangle: __webpack_require__(1134), + GetRectangleToTriangle: __webpack_require__(1135), + GetTriangleToCircle: __webpack_require__(1136), + GetTriangleToLine: __webpack_require__(457), + GetTriangleToTriangle: __webpack_require__(1137), + LineToCircle: __webpack_require__(219), LineToLine: __webpack_require__(86), - LineToRectangle: __webpack_require__(452), - PointToLine: __webpack_require__(460), - PointToLineSegment: __webpack_require__(1134), - RectangleToRectangle: __webpack_require__(142), - RectangleToTriangle: __webpack_require__(453), - RectangleToValues: __webpack_require__(1135), - TriangleToCircle: __webpack_require__(455), - TriangleToLine: __webpack_require__(457), - TriangleToTriangle: __webpack_require__(458) + LineToRectangle: __webpack_require__(453), + PointToLine: __webpack_require__(461), + PointToLineSegment: __webpack_require__(1138), + RectangleToRectangle: __webpack_require__(143), + RectangleToTriangle: __webpack_require__(454), + RectangleToValues: __webpack_require__(1139), + TriangleToCircle: __webpack_require__(456), + TriangleToLine: __webpack_require__(458), + TriangleToTriangle: __webpack_require__(459) }; /***/ }), -/* 449 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102709,7 +102788,7 @@ module.exports = GetLineToLine; /***/ }), -/* 450 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102719,7 +102798,7 @@ module.exports = GetLineToLine; */ var Vector3 = __webpack_require__(81); -var GetLineToLine = __webpack_require__(449); +var GetLineToLine = __webpack_require__(450); var Line = __webpack_require__(40); // Temp calculation segment @@ -102786,7 +102865,7 @@ module.exports = GetLineToPoints; /***/ }), -/* 451 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102796,8 +102875,8 @@ module.exports = GetLineToPoints; */ var Vector3 = __webpack_require__(81); -var Vector4 = __webpack_require__(128); -var GetLineToPoints = __webpack_require__(450); +var Vector4 = __webpack_require__(129); +var GetLineToPoints = __webpack_require__(451); // Temp vec3 var tempIntersect = new Vector3(); @@ -102857,7 +102936,7 @@ module.exports = GetLineToPolygon; /***/ }), -/* 452 */ +/* 453 */ /***/ (function(module, exports) { /** @@ -102958,7 +103037,7 @@ module.exports = LineToRectangle; /***/ }), -/* 453 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102969,8 +103048,8 @@ module.exports = LineToRectangle; var LineToLine = __webpack_require__(86); var Contains = __webpack_require__(50); -var ContainsArray = __webpack_require__(219); -var Decompose = __webpack_require__(454); +var ContainsArray = __webpack_require__(221); +var Decompose = __webpack_require__(455); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -103051,7 +103130,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 454 */ +/* 455 */ /***/ (function(module, exports) { /** @@ -103088,7 +103167,7 @@ module.exports = Decompose; /***/ }), -/* 455 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103097,7 +103176,7 @@ module.exports = Decompose; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToCircle = __webpack_require__(217); +var LineToCircle = __webpack_require__(219); var Contains = __webpack_require__(85); /** @@ -103153,7 +103232,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 456 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103164,7 +103243,7 @@ module.exports = TriangleToCircle; */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(457); +var TriangleToLine = __webpack_require__(458); var LineToLine = __webpack_require__(86); /** @@ -103212,7 +103291,7 @@ module.exports = GetTriangleToLine; /***/ }), -/* 457 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103268,7 +103347,7 @@ module.exports = TriangleToLine; /***/ }), -/* 458 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103277,8 +103356,8 @@ module.exports = TriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ContainsArray = __webpack_require__(219); -var Decompose = __webpack_require__(459); +var ContainsArray = __webpack_require__(221); +var Decompose = __webpack_require__(460); var LineToLine = __webpack_require__(86); /** @@ -103358,7 +103437,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 459 */ +/* 460 */ /***/ (function(module, exports) { /** @@ -103393,7 +103472,7 @@ module.exports = Decompose; /***/ }), -/* 460 */ +/* 461 */ /***/ (function(module, exports) { /** @@ -103463,7 +103542,7 @@ module.exports = PointToLine; /***/ }), -/* 461 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103497,7 +103576,7 @@ module.exports = NormalAngle; /***/ }), -/* 462 */ +/* 463 */ /***/ (function(module, exports) { /** @@ -103525,7 +103604,7 @@ module.exports = GetMagnitude; /***/ }), -/* 463 */ +/* 464 */ /***/ (function(module, exports) { /** @@ -103553,7 +103632,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 464 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103564,50 +103643,50 @@ module.exports = GetMagnitudeSq; var Rectangle = __webpack_require__(9); -Rectangle.Area = __webpack_require__(1179); -Rectangle.Ceil = __webpack_require__(1180); -Rectangle.CeilAll = __webpack_require__(1181); -Rectangle.CenterOn = __webpack_require__(176); -Rectangle.Clone = __webpack_require__(1182); +Rectangle.Area = __webpack_require__(1183); +Rectangle.Ceil = __webpack_require__(1184); +Rectangle.CeilAll = __webpack_require__(1185); +Rectangle.CenterOn = __webpack_require__(178); +Rectangle.Clone = __webpack_require__(1186); Rectangle.Contains = __webpack_require__(50); -Rectangle.ContainsPoint = __webpack_require__(1183); -Rectangle.ContainsRect = __webpack_require__(465); -Rectangle.CopyFrom = __webpack_require__(1184); -Rectangle.Decompose = __webpack_require__(454); -Rectangle.Equals = __webpack_require__(1185); -Rectangle.FitInside = __webpack_require__(1186); -Rectangle.FitOutside = __webpack_require__(1187); -Rectangle.Floor = __webpack_require__(1188); -Rectangle.FloorAll = __webpack_require__(1189); -Rectangle.FromPoints = __webpack_require__(184); -Rectangle.FromXY = __webpack_require__(1190); -Rectangle.GetAspectRatio = __webpack_require__(221); -Rectangle.GetCenter = __webpack_require__(1191); -Rectangle.GetPoint = __webpack_require__(159); -Rectangle.GetPoints = __webpack_require__(282); -Rectangle.GetSize = __webpack_require__(1192); -Rectangle.Inflate = __webpack_require__(1193); -Rectangle.Intersection = __webpack_require__(1194); -Rectangle.MarchingAnts = __webpack_require__(293); -Rectangle.MergePoints = __webpack_require__(1195); -Rectangle.MergeRect = __webpack_require__(1196); -Rectangle.MergeXY = __webpack_require__(1197); -Rectangle.Offset = __webpack_require__(1198); -Rectangle.OffsetPoint = __webpack_require__(1199); -Rectangle.Overlaps = __webpack_require__(1200); -Rectangle.Perimeter = __webpack_require__(116); -Rectangle.PerimeterPoint = __webpack_require__(1201); -Rectangle.Random = __webpack_require__(162); -Rectangle.RandomOutside = __webpack_require__(1202); -Rectangle.SameDimensions = __webpack_require__(1203); -Rectangle.Scale = __webpack_require__(1204); -Rectangle.Union = __webpack_require__(407); +Rectangle.ContainsPoint = __webpack_require__(1187); +Rectangle.ContainsRect = __webpack_require__(466); +Rectangle.CopyFrom = __webpack_require__(1188); +Rectangle.Decompose = __webpack_require__(455); +Rectangle.Equals = __webpack_require__(1189); +Rectangle.FitInside = __webpack_require__(1190); +Rectangle.FitOutside = __webpack_require__(1191); +Rectangle.Floor = __webpack_require__(1192); +Rectangle.FloorAll = __webpack_require__(1193); +Rectangle.FromPoints = __webpack_require__(186); +Rectangle.FromXY = __webpack_require__(1194); +Rectangle.GetAspectRatio = __webpack_require__(223); +Rectangle.GetCenter = __webpack_require__(1195); +Rectangle.GetPoint = __webpack_require__(161); +Rectangle.GetPoints = __webpack_require__(283); +Rectangle.GetSize = __webpack_require__(1196); +Rectangle.Inflate = __webpack_require__(1197); +Rectangle.Intersection = __webpack_require__(1198); +Rectangle.MarchingAnts = __webpack_require__(294); +Rectangle.MergePoints = __webpack_require__(1199); +Rectangle.MergeRect = __webpack_require__(1200); +Rectangle.MergeXY = __webpack_require__(1201); +Rectangle.Offset = __webpack_require__(1202); +Rectangle.OffsetPoint = __webpack_require__(1203); +Rectangle.Overlaps = __webpack_require__(1204); +Rectangle.Perimeter = __webpack_require__(118); +Rectangle.PerimeterPoint = __webpack_require__(1205); +Rectangle.Random = __webpack_require__(164); +Rectangle.RandomOutside = __webpack_require__(1206); +Rectangle.SameDimensions = __webpack_require__(1207); +Rectangle.Scale = __webpack_require__(1208); +Rectangle.Union = __webpack_require__(408); module.exports = Rectangle; /***/ }), -/* 465 */ +/* 466 */ /***/ (function(module, exports) { /** @@ -103647,7 +103726,7 @@ module.exports = ContainsRect; /***/ }), -/* 466 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103691,7 +103770,7 @@ module.exports = Centroid; /***/ }), -/* 467 */ +/* 468 */ /***/ (function(module, exports) { /** @@ -103732,7 +103811,7 @@ module.exports = Offset; /***/ }), -/* 468 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103797,7 +103876,7 @@ module.exports = InCenter; /***/ }), -/* 469 */ +/* 470 */ /***/ (function(module, exports) { /** @@ -103833,7 +103912,7 @@ module.exports = CreatePixelPerfectHandler; /***/ }), -/* 470 */ +/* 471 */ /***/ (function(module, exports) { /** @@ -103904,7 +103983,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 471 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104029,7 +104108,7 @@ module.exports = Axis; /***/ }), -/* 472 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104039,7 +104118,7 @@ module.exports = Axis; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(223); +var Events = __webpack_require__(225); /** * @classdesc @@ -104175,7 +104254,7 @@ module.exports = Button; /***/ }), -/* 473 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104184,8 +104263,8 @@ module.exports = Button; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(471); -var Button = __webpack_require__(472); +var Axis = __webpack_require__(472); +var Button = __webpack_require__(473); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); var Vector2 = __webpack_require__(3); @@ -104933,7 +105012,7 @@ module.exports = Gamepad; /***/ }), -/* 474 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104944,7 +105023,7 @@ module.exports = Gamepad; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(144); +var Events = __webpack_require__(145); /** * @classdesc @@ -105335,7 +105414,7 @@ module.exports = Key; /***/ }), -/* 475 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105345,10 +105424,10 @@ module.exports = Key; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(144); +var Events = __webpack_require__(145); var GetFastValue = __webpack_require__(2); -var ProcessKeyCombo = __webpack_require__(1243); -var ResetKeyCombo = __webpack_require__(1245); +var ProcessKeyCombo = __webpack_require__(1247); +var ResetKeyCombo = __webpack_require__(1249); /** * @classdesc @@ -105628,7 +105707,7 @@ module.exports = KeyCombo; /***/ }), -/* 476 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105637,7 +105716,7 @@ module.exports = KeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(224); +var MergeXHRSettings = __webpack_require__(226); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -105709,7 +105788,7 @@ module.exports = XHRLoader; /***/ }), -/* 477 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105723,7 +105802,7 @@ var CONST = __webpack_require__(18); var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var HTML5AudioFile = __webpack_require__(478); +var HTML5AudioFile = __webpack_require__(479); var IsPlainObject = __webpack_require__(7); /** @@ -105983,7 +106062,7 @@ module.exports = AudioFile; /***/ }), -/* 478 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105996,7 +106075,7 @@ var Class = __webpack_require__(0); var Events = __webpack_require__(84); var File = __webpack_require__(22); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(145); +var GetURL = __webpack_require__(146); var IsPlainObject = __webpack_require__(7); /** @@ -106186,7 +106265,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 479 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106357,7 +106436,7 @@ module.exports = ScriptFile; /***/ }), -/* 480 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106532,7 +106611,7 @@ module.exports = TextFile; /***/ }), -/* 481 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106541,12 +106620,12 @@ module.exports = TextFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(482); -var ArcadeSprite = __webpack_require__(147); +var ArcadeImage = __webpack_require__(483); +var ArcadeSprite = __webpack_require__(148); var Class = __webpack_require__(0); var CONST = __webpack_require__(52); -var PhysicsGroup = __webpack_require__(484); -var StaticPhysicsGroup = __webpack_require__(485); +var PhysicsGroup = __webpack_require__(485); +var StaticPhysicsGroup = __webpack_require__(486); /** * @classdesc @@ -106805,7 +106884,7 @@ module.exports = Factory; /***/ }), -/* 482 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106815,8 +106894,8 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(226); -var Image = __webpack_require__(112); +var Components = __webpack_require__(228); +var Image = __webpack_require__(114); /** * @classdesc @@ -106905,13 +106984,13 @@ module.exports = ArcadeImage; /***/ }), -/* 483 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { -var OverlapRect = __webpack_require__(227); +var OverlapRect = __webpack_require__(229); var Circle = __webpack_require__(68); -var CircleToCircle = __webpack_require__(214); -var CircleToRectangle = __webpack_require__(215); +var CircleToCircle = __webpack_require__(216); +var CircleToRectangle = __webpack_require__(217); /** * This method will search the given circular area and return an array of all physics bodies that @@ -106973,7 +107052,7 @@ module.exports = OverlapCirc; /***/ }), -/* 484 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106982,11 +107061,11 @@ module.exports = OverlapCirc; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(147); +var ArcadeSprite = __webpack_require__(148); var Class = __webpack_require__(0); var CONST = __webpack_require__(52); var GetFastValue = __webpack_require__(2); -var Group = __webpack_require__(99); +var Group = __webpack_require__(100); var IsPlainObject = __webpack_require__(7); /** @@ -107267,7 +107346,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 485 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107276,11 +107355,11 @@ module.exports = PhysicsGroup; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(147); +var ArcadeSprite = __webpack_require__(148); var Class = __webpack_require__(0); var CONST = __webpack_require__(52); var GetFastValue = __webpack_require__(2); -var Group = __webpack_require__(99); +var Group = __webpack_require__(100); var IsPlainObject = __webpack_require__(7); /** @@ -107466,7 +107545,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 486 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107475,32 +107554,32 @@ module.exports = StaticPhysicsGroup; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AngleBetweenPoints = __webpack_require__(330); -var Body = __webpack_require__(487); +var AngleBetweenPoints = __webpack_require__(331); +var Body = __webpack_require__(488); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Collider = __webpack_require__(488); +var Collider = __webpack_require__(489); var CONST = __webpack_require__(52); var DistanceBetween = __webpack_require__(55); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(228); -var FuzzyEqual = __webpack_require__(108); -var FuzzyGreaterThan = __webpack_require__(334); -var FuzzyLessThan = __webpack_require__(335); -var GetOverlapX = __webpack_require__(229); -var GetOverlapY = __webpack_require__(230); +var Events = __webpack_require__(230); +var FuzzyEqual = __webpack_require__(109); +var FuzzyGreaterThan = __webpack_require__(335); +var FuzzyLessThan = __webpack_require__(336); +var GetOverlapX = __webpack_require__(231); +var GetOverlapY = __webpack_require__(232); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var ProcessQueue = __webpack_require__(195); -var ProcessTileCallbacks = __webpack_require__(489); +var ProcessQueue = __webpack_require__(197); +var ProcessTileCallbacks = __webpack_require__(490); var Rectangle = __webpack_require__(9); -var RTree = __webpack_require__(490); -var SeparateTile = __webpack_require__(491); -var SeparateX = __webpack_require__(496); -var SeparateY = __webpack_require__(497); -var Set = __webpack_require__(140); -var StaticBody = __webpack_require__(498); -var TileIntersectsBody = __webpack_require__(231); +var RTree = __webpack_require__(491); +var SeparateTile = __webpack_require__(492); +var SeparateX = __webpack_require__(497); +var SeparateY = __webpack_require__(498); +var Set = __webpack_require__(141); +var StaticBody = __webpack_require__(499); +var TileIntersectsBody = __webpack_require__(233); var TransformMatrix = __webpack_require__(31); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(59); @@ -109899,7 +109978,7 @@ module.exports = World; /***/ }), -/* 487 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109911,8 +109990,8 @@ module.exports = World; var Class = __webpack_require__(0); var CONST = __webpack_require__(52); -var Events = __webpack_require__(228); -var RadToDeg = __webpack_require__(181); +var Events = __webpack_require__(230); +var RadToDeg = __webpack_require__(183); var Rectangle = __webpack_require__(9); var RectangleContains = __webpack_require__(50); var Vector2 = __webpack_require__(3); @@ -110306,7 +110385,7 @@ var Body = new Class({ * You can also change it by using the `Body.setBoundsRectangle` method. * * @name Phaser.Physics.Arcade.Body#customBoundsRectangle - * @type {?Phaser.Geom.Rectangle} + * @type {Phaser.Geom.Rectangle} * @since 3.20 */ this.customBoundsRectangle = world.bounds; @@ -112276,7 +112355,7 @@ module.exports = Body; /***/ }), -/* 488 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112459,7 +112538,7 @@ module.exports = Collider; /***/ }), -/* 489 */ +/* 490 */ /***/ (function(module, exports) { /** @@ -112500,7 +112579,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 490 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112510,7 +112589,7 @@ module.exports = ProcessTileCallbacks; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var quickselect = __webpack_require__(402); +var quickselect = __webpack_require__(403); /** * @classdesc @@ -113111,7 +113190,7 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 491 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113120,9 +113199,9 @@ module.exports = rbush; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileCheckX = __webpack_require__(492); -var TileCheckY = __webpack_require__(494); -var TileIntersectsBody = __webpack_require__(231); +var TileCheckX = __webpack_require__(493); +var TileCheckY = __webpack_require__(495); +var TileIntersectsBody = __webpack_require__(233); /** * The core separation function to separate a physics body and a tile. @@ -113231,7 +113310,7 @@ module.exports = SeparateTile; /***/ }), -/* 492 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113240,7 +113319,7 @@ module.exports = SeparateTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(493); +var ProcessTileSeparationX = __webpack_require__(494); /** * Check the body against the given tile on the X axis. @@ -113321,7 +113400,7 @@ module.exports = TileCheckX; /***/ }), -/* 493 */ +/* 494 */ /***/ (function(module, exports) { /** @@ -113368,7 +113447,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 494 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113377,7 +113456,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(495); +var ProcessTileSeparationY = __webpack_require__(496); /** * Check the body against the given tile on the Y axis. @@ -113458,7 +113537,7 @@ module.exports = TileCheckY; /***/ }), -/* 495 */ +/* 496 */ /***/ (function(module, exports) { /** @@ -113505,7 +113584,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 496 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113514,7 +113593,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(229); +var GetOverlapX = __webpack_require__(231); /** * Separates two overlapping bodies on the X-axis (horizontally). @@ -113598,7 +113677,7 @@ module.exports = SeparateX; /***/ }), -/* 497 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113607,7 +113686,7 @@ module.exports = SeparateX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapY = __webpack_require__(230); +var GetOverlapY = __webpack_require__(232); /** * Separates two overlapping bodies on the Y-axis (vertically). @@ -113691,7 +113770,7 @@ module.exports = SeparateY; /***/ }), -/* 498 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114680,7 +114759,7 @@ module.exports = StaticBody; /***/ }), -/* 499 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114695,24 +114774,24 @@ module.exports = StaticBody; module.exports = { - Bounce: __webpack_require__(1413), - Collision: __webpack_require__(1414), - Force: __webpack_require__(1415), - Friction: __webpack_require__(1416), - Gravity: __webpack_require__(1417), - Mass: __webpack_require__(1418), - Sensor: __webpack_require__(1419), - SetBody: __webpack_require__(1420), - Sleep: __webpack_require__(1421), - Static: __webpack_require__(1438), - Transform: __webpack_require__(1439), - Velocity: __webpack_require__(1440) + Bounce: __webpack_require__(1417), + Collision: __webpack_require__(1418), + Force: __webpack_require__(1419), + Friction: __webpack_require__(1420), + Gravity: __webpack_require__(1421), + Mass: __webpack_require__(1422), + Sensor: __webpack_require__(1423), + SetBody: __webpack_require__(1424), + Sleep: __webpack_require__(1425), + Static: __webpack_require__(1442), + Transform: __webpack_require__(1443), + Velocity: __webpack_require__(1444) }; /***/ }), -/* 500 */ +/* 501 */ /***/ (function(module, exports) { /** @@ -114838,7 +114917,7 @@ module.exports = Pair; /***/ }), -/* 501 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114968,7 +115047,7 @@ module.exports = BasePlugin; /***/ }), -/* 502 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115012,7 +115091,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 503 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115021,7 +115100,7 @@ module.exports = ReplaceByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(103); +var IsInLayerBounds = __webpack_require__(104); /** * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns @@ -115054,7 +115133,7 @@ module.exports = HasTileAt; /***/ }), -/* 504 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115064,8 +115143,8 @@ module.exports = HasTileAt; */ var Tile = __webpack_require__(75); -var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(233); +var IsInLayerBounds = __webpack_require__(104); +var CalculateFacesAt = __webpack_require__(235); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -115116,7 +115195,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 505 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115126,10 +115205,10 @@ module.exports = RemoveTileAt; */ var Formats = __webpack_require__(33); -var Parse2DArray = __webpack_require__(235); -var ParseCSV = __webpack_require__(506); -var ParseJSONTiled = __webpack_require__(507); -var ParseWeltmeister = __webpack_require__(518); +var Parse2DArray = __webpack_require__(237); +var ParseCSV = __webpack_require__(507); +var ParseJSONTiled = __webpack_require__(508); +var ParseWeltmeister = __webpack_require__(519); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -115186,7 +115265,7 @@ module.exports = Parse; /***/ }), -/* 506 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115196,7 +115275,7 @@ module.exports = Parse; */ var Formats = __webpack_require__(33); -var Parse2DArray = __webpack_require__(235); +var Parse2DArray = __webpack_require__(237); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -115234,7 +115313,7 @@ module.exports = ParseCSV; /***/ }), -/* 507 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115244,13 +115323,13 @@ module.exports = ParseCSV; */ var Formats = __webpack_require__(33); -var MapData = __webpack_require__(105); -var ParseTileLayers = __webpack_require__(508); -var ParseImageLayers = __webpack_require__(510); -var ParseTilesets = __webpack_require__(511); -var ParseObjectLayers = __webpack_require__(514); -var BuildTilesetIndex = __webpack_require__(516); -var AssignTileProperties = __webpack_require__(517); +var MapData = __webpack_require__(106); +var ParseTileLayers = __webpack_require__(509); +var ParseImageLayers = __webpack_require__(511); +var ParseTilesets = __webpack_require__(512); +var ParseObjectLayers = __webpack_require__(515); +var BuildTilesetIndex = __webpack_require__(517); +var AssignTileProperties = __webpack_require__(518); /** * Parses a Tiled JSON object into a new MapData object. @@ -115312,7 +115391,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 508 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115321,12 +115400,12 @@ module.exports = ParseJSONTiled; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(509); +var Base64Decode = __webpack_require__(510); var GetFastValue = __webpack_require__(2); -var LayerData = __webpack_require__(104); -var ParseGID = __webpack_require__(236); +var LayerData = __webpack_require__(105); +var ParseGID = __webpack_require__(238); var Tile = __webpack_require__(75); -var CreateGroupLayer = __webpack_require__(153); +var CreateGroupLayer = __webpack_require__(154); /** * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. @@ -115570,7 +115649,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 509 */ +/* 510 */ /***/ (function(module, exports) { /** @@ -115613,7 +115692,7 @@ module.exports = Base64Decode; /***/ }), -/* 510 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115623,7 +115702,7 @@ module.exports = Base64Decode; */ var GetFastValue = __webpack_require__(2); -var CreateGroupLayer = __webpack_require__(153); +var CreateGroupLayer = __webpack_require__(154); /** * Parses a Tiled JSON object into an array of objects with details about the image layers. @@ -115701,7 +115780,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 511 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115710,9 +115789,9 @@ module.exports = ParseImageLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(106); -var ImageCollection = __webpack_require__(512); -var ParseObject = __webpack_require__(237); +var Tileset = __webpack_require__(107); +var ImageCollection = __webpack_require__(513); +var ParseObject = __webpack_require__(239); /** * Tilesets and Image Collections @@ -115870,7 +115949,7 @@ module.exports = ParseTilesets; /***/ }), -/* 512 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116042,7 +116121,7 @@ module.exports = ImageCollection; /***/ }), -/* 513 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116051,7 +116130,7 @@ module.exports = ImageCollection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasValue = __webpack_require__(113); +var HasValue = __webpack_require__(115); /** * Returns a new object that only contains the `keys` that were found on the object provided. @@ -116086,7 +116165,7 @@ module.exports = Pick; /***/ }), -/* 514 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116096,9 +116175,9 @@ module.exports = Pick; */ var GetFastValue = __webpack_require__(2); -var ParseObject = __webpack_require__(237); -var ObjectLayer = __webpack_require__(515); -var CreateGroupLayer = __webpack_require__(153); +var ParseObject = __webpack_require__(239); +var ObjectLayer = __webpack_require__(516); +var CreateGroupLayer = __webpack_require__(154); /** * Parses a Tiled JSON object into an array of ObjectLayer objects. @@ -116185,7 +116264,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 515 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116307,7 +116386,7 @@ module.exports = ObjectLayer; /***/ }), -/* 516 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116316,7 +116395,7 @@ module.exports = ObjectLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(106); +var Tileset = __webpack_require__(107); /** * Master list of tiles -> x, y, index in tileset. @@ -116401,7 +116480,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 517 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116474,7 +116553,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 518 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116484,9 +116563,9 @@ module.exports = AssignTileProperties; */ var Formats = __webpack_require__(33); -var MapData = __webpack_require__(105); -var ParseTileLayers = __webpack_require__(519); -var ParseTilesets = __webpack_require__(520); +var MapData = __webpack_require__(106); +var ParseTileLayers = __webpack_require__(520); +var ParseTilesets = __webpack_require__(521); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -116541,7 +116620,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 519 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116550,7 +116629,7 @@ module.exports = ParseWeltmeister; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LayerData = __webpack_require__(104); +var LayerData = __webpack_require__(105); var Tile = __webpack_require__(75); /** @@ -116627,7 +116706,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 520 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116636,7 +116715,7 @@ module.exports = ParseTileLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(106); +var Tileset = __webpack_require__(107); /** * Tilesets and Image Collections @@ -116678,7 +116757,7 @@ module.exports = ParseTilesets; /***/ }), -/* 521 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116689,16 +116768,16 @@ module.exports = ParseTilesets; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(41); -var DynamicTilemapLayer = __webpack_require__(522); +var DynamicTilemapLayer = __webpack_require__(523); var Extend = __webpack_require__(19); var Formats = __webpack_require__(33); -var LayerData = __webpack_require__(104); -var Rotate = __webpack_require__(343); +var LayerData = __webpack_require__(105); +var Rotate = __webpack_require__(344); var SpliceOne = __webpack_require__(82); -var StaticTilemapLayer = __webpack_require__(523); +var StaticTilemapLayer = __webpack_require__(524); var Tile = __webpack_require__(75); -var TilemapComponents = __webpack_require__(148); -var Tileset = __webpack_require__(106); +var TilemapComponents = __webpack_require__(149); +var Tileset = __webpack_require__(107); /** * @callback TilemapFilterCallback @@ -119235,7 +119314,7 @@ module.exports = Tilemap; /***/ }), -/* 522 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119246,9 +119325,9 @@ module.exports = Tilemap; var Class = __webpack_require__(0); var Components = __webpack_require__(11); -var DynamicTilemapLayerRender = __webpack_require__(1354); +var DynamicTilemapLayerRender = __webpack_require__(1358); var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(148); +var TilemapComponents = __webpack_require__(149); /** * @classdesc @@ -119487,7 +119566,7 @@ var DynamicTilemapLayer = new Class({ this.setOrigin(); this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height); - this.initPipeline('MultiPipeline'); + this.initPipeline(); }, /** @@ -120556,7 +120635,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 523 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120569,9 +120648,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(11); var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var ModelViewProjection = __webpack_require__(111); -var StaticTilemapLayerRender = __webpack_require__(1357); -var TilemapComponents = __webpack_require__(148); +var ModelViewProjection = __webpack_require__(113); +var StaticTilemapLayerRender = __webpack_require__(1361); +var TilemapComponents = __webpack_require__(149); var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); @@ -120921,7 +121000,7 @@ var StaticTilemapLayer = new Class({ this.updateVBOData(); - this.initPipeline('MultiPipeline'); + this.initPipeline(); this.mvpInit(); @@ -122076,7 +122155,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 524 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122389,7 +122468,7 @@ module.exports = TimerEvent; /***/ }), -/* 525 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122398,7 +122477,7 @@ module.exports = TimerEvent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1371); +var RESERVED = __webpack_require__(1375); /** * Internal function used by the Tween Builder to return an array of properties @@ -122450,7 +122529,7 @@ module.exports = GetProps; /***/ }), -/* 526 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122498,7 +122577,7 @@ module.exports = GetTweens; /***/ }), -/* 527 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122507,15 +122586,15 @@ module.exports = GetTweens; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(241); +var Defaults = __webpack_require__(243); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(90); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(154); +var GetNewValue = __webpack_require__(155); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(240); -var Tween = __webpack_require__(242); -var TweenData = __webpack_require__(244); +var GetValueOp = __webpack_require__(242); +var Tween = __webpack_require__(244); +var TweenData = __webpack_require__(246); /** * Creates a new Number Tween. @@ -122628,7 +122707,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 528 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122874,7 +122953,7 @@ module.exports = StaggerBuilder; /***/ }), -/* 529 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122884,16 +122963,16 @@ module.exports = StaggerBuilder; */ var Clone = __webpack_require__(69); -var Defaults = __webpack_require__(241); +var Defaults = __webpack_require__(243); var GetAdvancedValue = __webpack_require__(15); var GetBoolean = __webpack_require__(90); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(154); -var GetTargets = __webpack_require__(239); -var GetTweens = __webpack_require__(526); +var GetNewValue = __webpack_require__(155); +var GetTargets = __webpack_require__(241); +var GetTweens = __webpack_require__(527); var GetValue = __webpack_require__(6); -var Timeline = __webpack_require__(530); -var TweenBuilder = __webpack_require__(155); +var Timeline = __webpack_require__(531); +var TweenBuilder = __webpack_require__(156); /** * Builds a Timeline of Tweens based on a configuration object. @@ -123028,7 +123107,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 530 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123039,8 +123118,8 @@ module.exports = TimelineBuilder; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(243); -var TweenBuilder = __webpack_require__(155); +var Events = __webpack_require__(245); +var TweenBuilder = __webpack_require__(156); var TWEEN_CONST = __webpack_require__(91); /** @@ -123933,7 +124012,7 @@ module.exports = Timeline; /***/ }), -/* 531 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123943,12 +124022,12 @@ module.exports = Timeline; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(532); +var CanvasSnapshot = __webpack_require__(533); var CameraEvents = __webpack_require__(42); var Class = __webpack_require__(0); var CONST = __webpack_require__(34); -var GetBlendModes = __webpack_require__(533); -var ScaleEvents = __webpack_require__(93); +var GetBlendModes = __webpack_require__(534); +var ScaleEvents = __webpack_require__(94); var TransformMatrix = __webpack_require__(31); /** @@ -124740,7 +124819,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 532 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124833,7 +124912,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 533 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124843,7 +124922,7 @@ module.exports = CanvasSnapshot; */ var modes = __webpack_require__(54); -var CanvasFeatures = __webpack_require__(328); +var CanvasFeatures = __webpack_require__(329); /** * Returns an array which maps the default blend modes to supported Canvas blend modes. @@ -124897,7 +124976,7 @@ module.exports = GetBlendModes; /***/ }), -/* 534 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124907,27 +124986,22 @@ module.exports = GetBlendModes; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(92); +var BaseCamera = __webpack_require__(93); var CameraEvents = __webpack_require__(42); var Class = __webpack_require__(0); var CONST = __webpack_require__(34); var GameEvents = __webpack_require__(21); -var IsSizePowerOfTwo = __webpack_require__(127); +var IsSizePowerOfTwo = __webpack_require__(128); var NOOP = __webpack_require__(1); -var ProjectOrtho = __webpack_require__(183); -var ScaleEvents = __webpack_require__(93); +var PIPELINE_CONST = __webpack_require__(110); +var PipelineManager = __webpack_require__(536); +var ProjectOrtho = __webpack_require__(185); +var ScaleEvents = __webpack_require__(94); var SpliceOne = __webpack_require__(82); -var TextureEvents = __webpack_require__(129); +var TextureEvents = __webpack_require__(130); var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(535); - -// Default Pipelines -var BitmapMaskPipeline = __webpack_require__(536); -var LightPipeline = __webpack_require__(537); -var MultiPipeline = __webpack_require__(110); -var RopePipeline = __webpack_require__(538); -var SinglePipeline = __webpack_require__(539); +var WebGLSnapshot = __webpack_require__(541); /** * @callback WebGLContextCallback @@ -125010,6 +125084,23 @@ var WebGLRenderer = new Class({ */ this.type = CONST.WEBGL; + /** + * An instance of the Pipeline Manager class, that handles all WebGL Pipelines. + * + * Use this to manage all of your interactions with pipelines, such as adding, getting, + * setting and rendering them. + * + * The Pipeline Manager class is created in the `init` method and then populated + * with pipelines during the `boot` method. + * + * Prior to Phaser v3.50.0 this was just a plain JavaScript object, not a class. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines + * @type {Phaser.Renderer.WebGL.PipelineManager} + * @since 3.50.0 + */ + this.pipelines = null; + /** * The width of the canvas being rendered to. * This is populated in the onResize event handler. @@ -125071,16 +125162,6 @@ var WebGLRenderer = new Class({ */ this.contextLost = false; - /** - * This object will store all pipelines created through addPipeline - * - * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines - * @type {object} - * @default null - * @since 3.0.0 - */ - this.pipelines = null; - /** * Details about the currently scheduled snapshot. * @@ -125185,27 +125266,6 @@ var WebGLRenderer = new Class({ */ this.currentFramebuffer = null; - /** - * Current WebGLPipeline in use. - * - * @name Phaser.Renderer.WebGL.WebGLRenderer#currentPipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @since 3.0.0 - */ - this.currentPipeline = null; - - /** - * The previous WebGLPipeline in use. - * This is set when `clearPipeline` is called and restored in `rebindPipeline` if none is given. - * - * @name Phaser.Renderer.WebGL.WebGLRenderer#previousPipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @since 3.50.0 - */ - this.previousPipeline = null; - /** * Current WebGLProgram in use. * @@ -125724,8 +125784,7 @@ var WebGLRenderer = new Class({ this.startActiveTexture++; gl.activeTexture(gl.TEXTURE1); - // Clear previous pipelines and reload default ones - this.pipelines = {}; + this.pipelines = new PipelineManager(this); this.setBlendMode(CONST.BlendModes.NORMAL); @@ -125745,12 +125804,9 @@ var WebGLRenderer = new Class({ { var game = this.game; - var multi = this.addPipeline('MultiPipeline', new MultiPipeline({ game: game })); + this.pipelines.boot(); - this.addPipeline('SinglePipeline', new SinglePipeline({ game: game })); - this.addPipeline('RopePipeline', new RopePipeline({ game: game })); - this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game })); - this.addPipeline('Light2D', new LightPipeline({ game: game })); + var multi = this.pipelines.get(PIPELINE_CONST.MULTI_PIPELINE); var blank = game.textures.getFrame('__DEFAULT'); @@ -125764,8 +125820,6 @@ var WebGLRenderer = new Class({ gl.enable(gl.SCISSOR_TEST); - this.setPipeline(multi); - game.scale.on(ScaleEvents.RESIZE, this.onResize, this); var baseSize = game.scale.baseSize; @@ -125808,7 +125862,6 @@ var WebGLRenderer = new Class({ resize: function (width, height, resolution) { var gl = this.gl; - var pipelines = this.pipelines; this.width = width; this.height = height; @@ -125816,11 +125869,7 @@ var WebGLRenderer = new Class({ gl.viewport(0, 0, width, height); - // Update all registered pipelines - for (var pipelineName in pipelines) - { - pipelines[pipelineName].resize(width, height, resolution); - } + this.pipelines.resize(width, height, resolution); this.drawingBufferHeight = gl.drawingBufferHeight; @@ -125876,91 +125925,7 @@ var WebGLRenderer = new Class({ */ flush: function () { - if (this.currentPipeline) - { - this.currentPipeline.flush(); - } - }, - - /** - * Checks if a pipeline is present in the current WebGLRenderer - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#hasPipeline - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline. - * - * @return {boolean} `true` if the given pipeline is loaded, otherwise `false`. - */ - hasPipeline: function (pipelineName) - { - return (pipelineName in this.pipelines); - }, - - /** - * Returns the pipeline by name if the pipeline exists - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#getPipeline - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline. - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance, or `null` if not found. - */ - getPipeline: function (pipelineName) - { - return (this.hasPipeline(pipelineName)) ? this.pipelines[pipelineName] : null; - }, - - /** - * Removes a pipeline by name. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#removePipeline - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline to be removed. - * - * @return {this} This WebGLRenderer instance. - */ - removePipeline: function (pipelineName) - { - delete this.pipelines[pipelineName]; - - return this; - }, - - /** - * Adds a pipeline instance into the collection of pipelines - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#addPipeline - * @since 3.0.0 - * - * @param {string} pipelineName - A unique string-based key for the pipeline. - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - A pipeline instance which must extend WebGLPipeline. - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance that was passed. - */ - addPipeline: function (pipelineName, pipelineInstance) - { - if (!this.hasPipeline(pipelineName)) - { - this.pipelines[pipelineName] = pipelineInstance; - } - else - { - console.warn('Pipeline exists: ' + pipelineName); - } - - pipelineInstance.name = pipelineName; - - if (!pipelineInstance.hasBooted) - { - pipelineInstance.boot(); - } - - this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution); - - return pipelineInstance; + this.pipelines.flush(); }, /** @@ -126059,33 +126024,6 @@ var WebGLRenderer = new Class({ this.currentScissor = scissor; }, - /** - * Binds a WebGLPipeline and sets it as the current pipeline to be used. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#setPipeline - * @since 3.0.0 - * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated. - * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any. - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline that was activated. - */ - setPipeline: function (pipelineInstance, gameObject) - { - var current = this.currentPipeline; - - if (current !== pipelineInstance || current.vertexBuffer !== this.currentVertexBuffer || current.program !== this.currentProgram) - { - this.resetTextures(); - this.currentPipeline = pipelineInstance; - this.currentPipeline.bind(); - } - - this.currentPipeline.onBind(gameObject); - - return this.currentPipeline; - }, - /** * Is there an active stencil mask? * @@ -126102,91 +126040,6 @@ var WebGLRenderer = new Class({ return ((mask && mask.isStencil) || (camMask && camMask.isStencil)); }, - /** - * Use this to reset the gl context to the state that Phaser requires to continue rendering. - * Calling this will: - * - * * Disable `DEPTH_TEST`, `CULL_FACE` and `STENCIL_TEST`. - * * Clear the depth buffer and stencil buffers. - * * Reset the viewport size. - * * Reset the blend mode. - * * Bind a blank texture as the active texture on texture unit zero. - * * Rebinds the given pipeline instance. - * - * You should call this having previously called `clearPipeline` and then wishing to return - * control to Phaser again. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#rebindPipeline - * @since 3.16.0 - * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} [pipelineInstance] - The pipeline instance to be activated. - */ - rebindPipeline: function (pipelineInstance) - { - if (pipelineInstance === undefined && this.previousPipeline) - { - pipelineInstance = this.previousPipeline; - } - - if (!pipelineInstance) - { - return; - } - - var gl = this.gl; - - gl.disable(gl.DEPTH_TEST); - gl.disable(gl.CULL_FACE); - - if (this.hasActiveStencilMask()) - { - gl.clear(gl.DEPTH_BUFFER_BIT); - } - else - { - // If there wasn't a stencil mask set before this call, we can disable it safely - gl.disable(gl.STENCIL_TEST); - gl.clear(gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); - } - - gl.viewport(0, 0, this.width, this.height); - - this.currentProgram = null; - this.currentVertexBuffer = null; - this.currentIndexBuffer = null; - - this.setBlendMode(0, true); - - this.resetTextures(); - - this.currentPipeline = pipelineInstance; - this.currentPipeline.bind(true); - this.currentPipeline.onBind(); - }, - - /** - * Flushes the current WebGLPipeline being used and then clears it, along with the - * the current shader program and vertex buffer. Then resets the blend mode to NORMAL. - * Call this before jumping to your own gl context handler, and then call `rebindPipeline` when - * you wish to return control to Phaser again. - * - * @method Phaser.Renderer.WebGL.WebGLRenderer#clearPipeline - * @since 3.16.0 - */ - clearPipeline: function () - { - this.flush(); - - this.previousPipeline = this.currentPipeline; - - this.currentPipeline = null; - this.currentProgram = null; - this.currentVertexBuffer = null; - this.currentIndexBuffer = null; - - this.setBlendMode(0, true); - }, - /** * Sets the blend mode to the value given. * @@ -126326,7 +126179,7 @@ var WebGLRenderer = new Class({ */ setTextureSource: function (textureSource) { - if (this.currentPipeline.forceZero) + if (this.pipelines.current.forceZero) { this.setTextureZero(textureSource.glTexture, true); @@ -126556,7 +126409,7 @@ var WebGLRenderer = new Class({ */ setTexture2D: function (texture) { - if (this.currentPipeline.forceZero) + if (this.pipelines.current.forceZero) { this.setTextureZero(texture, true); @@ -127042,14 +126895,6 @@ var WebGLRenderer = new Class({ this.resetTextures(); - /* - if (!this.game.pendingDestroy) - { - // texture we just deleted is in use, so bind a blank texture - this.setBlankTexture(true); - } - */ - return this; }, @@ -127120,10 +126965,10 @@ var WebGLRenderer = new Class({ var cw = camera._cw; var ch = camera._ch; - var MultiPipeline = this.pipelines.MultiPipeline; - var color = camera.backgroundColor; + var MultiPipeline = this.pipelines.MULTI_PIPELINE; + if (camera.renderToTexture) { this.flush(); @@ -127218,12 +127063,10 @@ var WebGLRenderer = new Class({ */ postRenderCamera: function (camera) { - this.setPipeline(this.pipelines.MultiPipeline); + var multiPipeline = this.pipelines.setMulti(); - var MultiPipeline = this.pipelines.MultiPipeline; - - camera.flashEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); - camera.fadeEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); + camera.flashEffect.postRenderWebGL(multiPipeline, Utils.getTintFromFloats); + camera.fadeEffect.postRenderWebGL(multiPipeline, Utils.getTintFromFloats); camera.dirty = false; @@ -127231,7 +127074,7 @@ var WebGLRenderer = new Class({ if (camera.renderToTexture) { - MultiPipeline.flush(); + multiPipeline.flush(); this.setFramebuffer(null); @@ -127239,11 +127082,11 @@ var WebGLRenderer = new Class({ if (camera.renderToGame) { - ProjectOrtho(MultiPipeline, 0, MultiPipeline.width, MultiPipeline.height, 0, -1000.0, 1000.0); + ProjectOrtho(multiPipeline, 0, multiPipeline.width, multiPipeline.height, 0, -1000.0, 1000.0); var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = (camera.pipeline) ? camera.pipeline : MultiPipeline; + var pipeline = (camera.pipeline) ? camera.pipeline : multiPipeline; pipeline.batchTexture( camera, @@ -127291,7 +127134,6 @@ var WebGLRenderer = new Class({ if (this.contextLost) { return; } var gl = this.gl; - var pipelines = this.pipelines; // Make sure we are bound to the main frame buffer gl.bindFramebuffer(gl.FRAMEBUFFER, null); @@ -127307,10 +127149,7 @@ var WebGLRenderer = new Class({ gl.enable(gl.SCISSOR_TEST); - for (var key in pipelines) - { - pipelines[key].onPreRender(); - } + this.pipelines.preRender(); // TODO - Find a way to stop needing to create these arrays every frame // and equally not need a huge array buffer created to hold them @@ -127329,7 +127168,7 @@ var WebGLRenderer = new Class({ this.textureFlush = 0; - this.setPipeline(this.pipelines.MultiPipeline); + this.pipelines.setMulti(); }, /** @@ -127356,12 +127195,8 @@ var WebGLRenderer = new Class({ var list = children.list; var childCount = list.length; - var pipelines = this.pipelines; - for (var key in pipelines) - { - pipelines[key].onRender(scene, camera); - } + this.pipelines.render(scene, camera); // Apply scissor for cam region + render background color, if not transparent this.preRenderCamera(camera); @@ -127465,12 +127300,7 @@ var WebGLRenderer = new Class({ state.callback = null; } - var pipelines = this.pipelines; - - for (var key in pipelines) - { - pipelines[key].onPostRender(); - } + this.pipelines.postRender(); if (this.textureFlush > 0) { @@ -127854,7 +127684,6 @@ var WebGLRenderer = new Class({ var gl = this.gl; var glFilter = [ gl.LINEAR, gl.NEAREST ][filter]; - // this.setTexture2D(texture, 0); gl.activeTexture(gl.TEXTURE0); var currentTexture = gl.getParameter(gl.TEXTURE_BINDING_2D); @@ -127864,7 +127693,6 @@ var WebGLRenderer = new Class({ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, glFilter); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, glFilter); - // this.setTexture2D(null, 0); if (currentTexture) { gl.bindTexture(gl.TEXTURE_2D, currentTexture); @@ -128314,12 +128142,7 @@ var WebGLRenderer = new Class({ this.textureIndexes = []; this.nativeTextures = []; - for (var key in this.pipelines) - { - this.pipelines[key].destroy(); - - delete this.pipelines[key]; - } + this.pipelines.destroy(); this.defaultCamera.destroy(); @@ -128346,7 +128169,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 535 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128355,108 +128178,498 @@ module.exports = WebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasPool = __webpack_require__(26); -var Color = __webpack_require__(32); -var GetFastValue = __webpack_require__(2); +var Class = __webpack_require__(0); +var CustomMap = __webpack_require__(92); +var CONST = __webpack_require__(110); + +// Default Phaser 3 Pipelines +var BitmapMaskPipeline = __webpack_require__(537); +var LightPipeline = __webpack_require__(538); +var MultiPipeline = __webpack_require__(112); +var RopePipeline = __webpack_require__(539); +var SinglePipeline = __webpack_require__(540); /** - * Takes a snapshot of an area from the current frame displayed by a WebGL canvas. - * - * This is then copied to an Image object. When this loads, the results are sent - * to the callback provided in the Snapshot Configuration object. + * @classdesc * - * @function Phaser.Renderer.Snapshot.WebGL - * @since 3.0.0 * - * @param {HTMLCanvasElement} sourceCanvas - The canvas to take a snapshot of. - * @param {Phaser.Types.Renderer.Snapshot.SnapshotState} config - The snapshot configuration object. + * @class PipelineManager + * @memberof Phaser.Renderer.WebGL + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the WebGL Renderer that owns this Pipeline Manager. */ -var WebGLSnapshot = function (sourceCanvas, config) -{ - var gl = sourceCanvas.getContext('experimental-webgl'); +var PipelineManager = new Class({ - var callback = GetFastValue(config, 'callback'); - var type = GetFastValue(config, 'type', 'image/png'); - var encoderOptions = GetFastValue(config, 'encoder', 0.92); - var x = GetFastValue(config, 'x', 0); - var y = GetFastValue(config, 'y', 0); + initialize: - var getPixel = GetFastValue(config, 'getPixel', false); - - var isFramebuffer = GetFastValue(config, 'isFramebuffer', false); - - var bufferWidth = (isFramebuffer) ? GetFastValue(config, 'bufferWidth', 1) : gl.drawingBufferWidth; - var bufferHeight = (isFramebuffer) ? GetFastValue(config, 'bufferHeight', 1) : gl.drawingBufferHeight; - - if (getPixel) + function PipelineManager (renderer) { - var pixel = new Uint8Array(4); + /** + * A reference to the Game instance. + * + * @name Phaser.Renderer.WebGL.PipelineManager#game + * @type {Phaser.Game} + * @since 3.50.0 + */ + this.game = renderer.game; - var destY = (isFramebuffer) ? y : bufferHeight - y; + /** + * A reference to the WebGL Renderer instance. + * + * @name Phaser.Renderer.WebGL.PipelineManager#renderer + * @type {Phaser.Renderer.WebGL.WebGLRenderer} + * @since 3.50.0 + */ + this.renderer = renderer; - gl.readPixels(x, destY, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel); + /** + * This map stores all pipeline instances in this manager. + * + * This is populated with the default pipelines in the `boot` method. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines + * @type {Phaser.Structs.Map.} + * @since 3.50.0 + */ + this.pipelines = new CustomMap(); - callback.call(null, new Color(pixel[0], pixel[1], pixel[2], pixel[3] / 255)); - } - else + /** + * Current pipeline in use by the WebGLRenderer. + * + * @name Phaser.Renderer.WebGL.PipelineManager#current + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @since 3.50.0 + */ + this.current = null; + + /** + * The previous WebGLPipeline that was in use. + * + * This is set when `clearPipeline` is called and restored in `rebindPipeline` if none is given. + * + * @name Phaser.Renderer.WebGL.PipelineManager#previous + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @since 3.50.0 + */ + this.previous = null; + + /** + * A constant-style reference to the Multi Pipeline Instance. + * + * This is the default Phaser 3 pipeline and is used by the WebGL Renderer to manage + * camera effects and more. This property is set during the `boot` method. + * + * @name Phaser.Renderer.WebGL.PipelineManager#MULTI_PIPELINE + * @type {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} + * @default null + * @since 3.50.0 + */ + this.MULTI_PIPELINE = null; + + /** + * A constant-style reference to the Bitmap Mask Pipeline Instance. + * + * This is the default Phaser 3 mask pipeline and is used Game Objects using + * a Bitmap Mask. This property is set during the `boot` method. + * + * @name Phaser.Renderer.WebGL.PipelineManager#BITMAPMASK_PIPELINE + * @type {Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline} + * @default null + * @since 3.50.0 + */ + this.BITMAPMASK_PIPELINE = null; + }, + + /** + * Internal boot handler, called by the WebGLRenderer durings its boot process. + * + * Adds all of the default pipelines, based on the game config, and then calls + * the `boot` method on each one of them. + * + * Finally, the default pipeline is set. + * + * @method Phaser.Renderer.WebGL.PipelineManager#boot + * @since 3.50.0 + */ + boot: function () { - var width = GetFastValue(config, 'width', bufferWidth); - var height = GetFastValue(config, 'height', bufferHeight); + var game = this.game; - var total = width * height * 4; + this.MULTI_PIPELINE = this.add(CONST.MULTI_PIPELINE, new MultiPipeline({ game: game })); + this.BITMAPMASK_PIPELINE = this.add(CONST.BITMAPMASK_PIPELINE, new BitmapMaskPipeline({ game: game })); - var pixels = new Uint8Array(total); + this.add(CONST.SINGLE_PIPELINE, new SinglePipeline({ game: game })); + this.add(CONST.ROPE_PIPELINE, new RopePipeline({ game: game })); + this.add(CONST.LIGHT_PIPELINE, new LightPipeline({ game: game })); - gl.readPixels(x, bufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels); - - var canvas = CanvasPool.createWebGL(this, width, height); - var ctx = canvas.getContext('2d'); + this.set(this.MULTI_PIPELINE); + }, - var imageData = ctx.getImageData(0, 0, width, height); - - var data = imageData.data; + /** + * Adds a pipeline instance to this Pipeline Manager. + * + * The name of the instance must be unique within this manager. + * + * Make sure to pass an instance to this method, not a base class. For example: + * + * ```javascript + * this.add('yourName', new MultiPipeline());` + * ``` + * + * @method Phaser.Renderer.WebGL.PipelineManager#addPipeline + * @since 3.50.0 + * + * @param {string} name - A unique string-based key for the pipeline within the manager. + * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - A pipeline _instance_ which must extend `WebGLPipeline`. + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance that was passed. + */ + add: function (name, pipeline) + { + var pipelines = this.pipelines; + var renderer = this.renderer; - for (var py = 0; py < height; py++) + if (!pipelines.has(name)) { - for (var px = 0; px < width; px++) - { - var sourceIndex = ((height - py) * width + px) * 4; - var destIndex = (isFramebuffer) ? total - ((py * width + (width - px)) * 4) : (py * width + px) * 4; - - data[destIndex + 0] = pixels[sourceIndex + 0]; - data[destIndex + 1] = pixels[sourceIndex + 1]; - data[destIndex + 2] = pixels[sourceIndex + 2]; - data[destIndex + 3] = pixels[sourceIndex + 3]; - } + pipelines.set(name, pipeline); + } + else + { + console.warn('Pipeline exists: ' + name); } - ctx.putImageData(imageData, 0, 0); - - var image = new Image(); + pipeline.name = name; - image.onerror = function () + if (!pipeline.hasBooted) { - callback.call(null); + pipeline.boot(); + } - CanvasPool.remove(canvas); - }; + pipeline.resize(renderer.width, renderer.height, renderer.config.resolution); - image.onload = function () + return pipeline; + }, + + /** + * Resizes handler. + * + * This is called automatically by the `WebGLRenderer` when the game resizes. + * + * @method Phaser.Renderer.WebGL.PipelineManager#resize + * @since 3.50.0 + * + * @param {number} [width] - The new width of the renderer. + * @param {number} [height] - The new height of the renderer. + * @param {number} [resolution] - The new resolution of the renderer. + */ + resize: function (width, height, resolution) + { + var pipelines = this.pipelines; + + pipelines.each(function (pipelineName, pipelineInstance) { - callback.call(null, image); + pipelineInstance.resize(width, height, resolution); + }); + }, - CanvasPool.remove(canvas); - }; + /** + * Calls the `onPreRender` method on each pipeline in this manager. + * + * This is called automatically by the `WebGLRenderer.preRender` method. + * + * @method Phaser.Renderer.WebGL.PipelineManager#preRender + * @since 3.50.0 + */ + preRender: function () + { + var pipelines = this.pipelines; - image.src = canvas.toDataURL(type, encoderOptions); + pipelines.each(function (pipelineName, pipelineInstance) + { + pipelineInstance.onPreRender(); + }); + }, + + /** + * Calls the `onRender` method on each pipeline in this manager. + * + * This is called automatically by the `WebGLRenderer.render` method. + * + * @method Phaser.Renderer.WebGL.PipelineManager#render + * @since 3.50.0 + * + * @param {Phaser.Scene} scene - The Scene to render. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera to render with. + */ + render: function (scene, camera) + { + var pipelines = this.pipelines; + + pipelines.each(function (pipelineName, pipelineInstance) + { + pipelineInstance.onRender(scene, camera); + }); + }, + + /** + * Calls the `onPostRender` method on each pipeline in this manager. + * + * This is called automatically by the `WebGLRenderer.postRender` method. + * + * @method Phaser.Renderer.WebGL.PipelineManager#postRender + * @since 3.50.0 + */ + postRender: function () + { + var pipelines = this.pipelines; + + pipelines.each(function (pipelineName, pipelineInstance) + { + pipelineInstance.onPostRender(); + }); + }, + + /** + * Flushes the current pipeline, if one is bound. + * + * @method Phaser.Renderer.WebGL.PipelineManager#flush + * @since 3.50.0 + */ + flush: function () + { + if (this.current) + { + this.current.flush(); + } + }, + + /** + * Checks if a pipeline is present in the Pipeline Manager. + * + * @method Phaser.Renderer.WebGL.PipelineManager#has + * @since 3.50.0 + * + * @param {string} name - The name of the pipeline to check for. + * + * @return {boolean} `true` if the given pipeline is loaded, otherwise `false`. + */ + has: function (name) + { + return this.pipelines.has(name); + }, + + /** + * Returns the pipeline instance based on the given name. + * + * If no instance exists in this manager, it returns `undefined` instead. + * + * @method Phaser.Renderer.WebGL.PipelineManager#get + * @since 3.50.0 + * + * @param {string} name - The name of the pipeline to get. + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance, or `undefined` if not found. + */ + get: function (name) + { + return this.pipelines.get(name); + }, + + /** + * Removes a pipeline based on the given name. + * + * If no pipeline matches the name, this method does nothing. + * + * Note that the pipeline will not be flushed or destroyed, it's simply removed from + * this manager. + * + * @method Phaser.Renderer.WebGL.PipelineManager#remove + * @since 3.50.0 + * + * @param {string} name - The name of the pipeline to be removed. + */ + remove: function (name) + { + this.pipelines.delete(name); + }, + + /** + * Sets the current pipeline to be used by the `WebGLRenderer`. + * + * This method accepts a pipeline instance as its parameter, not the name. + * + * If the pipeline isn't already the current one, it will also call `resetTextures` on + * the `WebGLRenderer`. After this, `WebGLPipeline.bind` and then `onBind` are called. + * + * @method Phaser.Renderer.WebGL.PipelineManager#set + * @since 3.50.0 + * + * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The pipeline instance to be set as current. + * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any. + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline that was set. + */ + set: function (pipeline, gameObject) + { + var renderer = this.renderer; + var current = this.current; + + if ( + current !== pipeline || + current.vertexBuffer !== renderer.currentVertexBuffer || + current.program !== renderer.currentProgram + ) + { + renderer.resetTextures(); + + this.current = pipeline; + + pipeline.bind(); + } + + pipeline.onBind(gameObject); + + return pipeline; + }, + + /** + * Sets the Multi Pipeline to be the currently bound pipeline. + * + * This is the default Phaser 3 rendering pipeline. + * + * @method Phaser.Renderer.WebGL.PipelineManager#setMulti + * @since 3.50.0 + * + * @return {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} The Multi Pipeline instance. + */ + setMulti: function () + { + return this.set(this.MULTI_PIPELINE); + }, + + /** + * Use this to reset the gl context to the state that Phaser requires to continue rendering. + * + * Calling this will: + * + * * Disable `DEPTH_TEST`, `CULL_FACE` and `STENCIL_TEST`. + * * Clear the depth buffer and stencil buffers. + * * Reset the viewport size. + * * Reset the blend mode. + * * Bind a blank texture as the active texture on texture unit zero. + * * Rebinds the given pipeline instance. + * + * You should call this if you have previously called `clear`, and then wish to return + * rendering control to Phaser again. + * + * @method Phaser.Renderer.WebGL.PipelineManager#rebind + * @since 3.50.0 + * + * @param {Phaser.Renderer.WebGL.WebGLPipeline} [pipeline] - The pipeline instance to be rebound. If not given, the previous pipeline will be bound. + */ + rebind: function (pipeline) + { + if (pipeline === undefined && this.previous) + { + pipeline = this.previous; + } + + if (!pipeline) + { + return; + } + + var renderer = this.renderer; + var gl = renderer.gl; + + gl.disable(gl.DEPTH_TEST); + gl.disable(gl.CULL_FACE); + + if (renderer.hasActiveStencilMask()) + { + gl.clear(gl.DEPTH_BUFFER_BIT); + } + else + { + // If there wasn't a stencil mask set before this call, we can disable it safely + gl.disable(gl.STENCIL_TEST); + gl.clear(gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); + } + + gl.viewport(0, 0, renderer.width, renderer.height); + + renderer.currentProgram = null; + renderer.currentVertexBuffer = null; + renderer.currentIndexBuffer = null; + + renderer.setBlendMode(0, true); + + renderer.resetTextures(); + + this.current = pipeline; + + pipeline.bind(true); + pipeline.onBind(); + }, + + /** + * Flushes the current pipeline being used and then clears it, along with the + * the current shader program and vertex buffer from the `WebGLRenderer`. + * + * Then resets the blend mode to NORMAL. + * + * Call this before jumping to your own gl context handler, and then call `rebind` when + * you wish to return control to Phaser again. + * + * @method Phaser.Renderer.WebGL.PipelineManager#clear + * @since 3.50.0 + */ + clear: function () + { + var renderer = this.renderer; + + this.flush(); + + this.previous = this.current; + this.current = null; + + renderer.currentProgram = null; + renderer.currentVertexBuffer = null; + renderer.currentIndexBuffer = null; + + renderer.setBlendMode(0, true); + }, + + /** + * Destroy the Pipeline Manager, cleaning up all related resources and references. + * + * @method Phaser.Renderer.WebGL.PipelineManager#destroy + * @since 3.50.0 + */ + destroy: function () + { + this.flush(); + + this.pipelines.clear(); + + this.renderer = null; + this.game = null; + this.pipelines = null; + this.current = null; + this.previous = null; } -}; -module.exports = WebGLSnapshot; +}); + +module.exports = PipelineManager; /***/ }), -/* 536 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128468,9 +128681,9 @@ module.exports = WebGLSnapshot; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ShaderSourceFS = __webpack_require__(808); -var ShaderSourceVS = __webpack_require__(809); -var WebGLPipeline = __webpack_require__(109); +var ShaderSourceFS = __webpack_require__(807); +var ShaderSourceVS = __webpack_require__(808); +var WebGLPipeline = __webpack_require__(111); /** * @classdesc @@ -128650,7 +128863,7 @@ var BitmapMaskPipeline = new Class({ } // Bind bitmap mask pipeline and draw - renderer.setPipeline(this); + renderer.pipelines.set(this); gl.activeTexture(gl.TEXTURE1); gl.bindTexture(gl.TEXTURE_2D, mask.maskTexture); @@ -128671,7 +128884,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 537 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128683,9 +128896,9 @@ module.exports = BitmapMaskPipeline; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ShaderSourceFS = __webpack_require__(810); -var MultiPipeline = __webpack_require__(110); -var WebGLPipeline = __webpack_require__(109); +var ShaderSourceFS = __webpack_require__(809); +var MultiPipeline = __webpack_require__(112); +var WebGLPipeline = __webpack_require__(111); var LIGHT_COUNT = 10; @@ -129094,7 +129307,7 @@ module.exports = LightPipeline; /***/ }), -/* 538 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129104,8 +129317,8 @@ module.exports = LightPipeline; */ var Class = __webpack_require__(0); -var ModelViewProjection = __webpack_require__(111); -var MultiPipeline = __webpack_require__(110); +var ModelViewProjection = __webpack_require__(113); +var MultiPipeline = __webpack_require__(112); /** * @classdesc @@ -129166,7 +129379,7 @@ module.exports = RopePipeline; /***/ }), -/* 539 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129177,11 +129390,11 @@ module.exports = RopePipeline; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(111); -var MultiPipeline = __webpack_require__(110); -var ShaderSourceFS = __webpack_require__(813); -var ShaderSourceVS = __webpack_require__(814); -var WebGLPipeline = __webpack_require__(109); +var ModelViewProjection = __webpack_require__(113); +var MultiPipeline = __webpack_require__(112); +var ShaderSourceFS = __webpack_require__(812); +var ShaderSourceVS = __webpack_require__(813); +var WebGLPipeline = __webpack_require__(111); /** * @classdesc @@ -129498,7 +129711,117 @@ module.exports = SinglePipeline; /***/ }), -/* 540 */ +/* 541 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CanvasPool = __webpack_require__(26); +var Color = __webpack_require__(32); +var GetFastValue = __webpack_require__(2); + +/** + * Takes a snapshot of an area from the current frame displayed by a WebGL canvas. + * + * This is then copied to an Image object. When this loads, the results are sent + * to the callback provided in the Snapshot Configuration object. + * + * @function Phaser.Renderer.Snapshot.WebGL + * @since 3.0.0 + * + * @param {HTMLCanvasElement} sourceCanvas - The canvas to take a snapshot of. + * @param {Phaser.Types.Renderer.Snapshot.SnapshotState} config - The snapshot configuration object. + */ +var WebGLSnapshot = function (sourceCanvas, config) +{ + var gl = sourceCanvas.getContext('experimental-webgl'); + + var callback = GetFastValue(config, 'callback'); + var type = GetFastValue(config, 'type', 'image/png'); + var encoderOptions = GetFastValue(config, 'encoder', 0.92); + var x = GetFastValue(config, 'x', 0); + var y = GetFastValue(config, 'y', 0); + + var getPixel = GetFastValue(config, 'getPixel', false); + + var isFramebuffer = GetFastValue(config, 'isFramebuffer', false); + + var bufferWidth = (isFramebuffer) ? GetFastValue(config, 'bufferWidth', 1) : gl.drawingBufferWidth; + var bufferHeight = (isFramebuffer) ? GetFastValue(config, 'bufferHeight', 1) : gl.drawingBufferHeight; + + if (getPixel) + { + var pixel = new Uint8Array(4); + + var destY = (isFramebuffer) ? y : bufferHeight - y; + + gl.readPixels(x, destY, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel); + + callback.call(null, new Color(pixel[0], pixel[1], pixel[2], pixel[3] / 255)); + } + else + { + var width = GetFastValue(config, 'width', bufferWidth); + var height = GetFastValue(config, 'height', bufferHeight); + + var total = width * height * 4; + + var pixels = new Uint8Array(total); + + gl.readPixels(x, bufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels); + + var canvas = CanvasPool.createWebGL(this, width, height); + var ctx = canvas.getContext('2d'); + + var imageData = ctx.getImageData(0, 0, width, height); + + var data = imageData.data; + + for (var py = 0; py < height; py++) + { + for (var px = 0; px < width; px++) + { + var sourceIndex = ((height - py) * width + px) * 4; + var destIndex = (isFramebuffer) ? total - ((py * width + (width - px)) * 4) : (py * width + px) * 4; + + data[destIndex + 0] = pixels[sourceIndex + 0]; + data[destIndex + 1] = pixels[sourceIndex + 1]; + data[destIndex + 2] = pixels[sourceIndex + 2]; + data[destIndex + 3] = pixels[sourceIndex + 3]; + } + } + + ctx.putImageData(imageData, 0, 0); + + var image = new Image(); + + image.onerror = function () + { + callback.call(null); + + CanvasPool.remove(canvas); + }; + + image.onload = function () + { + callback.call(null, image); + + CanvasPool.remove(canvas); + }; + + image.src = canvas.toDataURL(type, encoderOptions); + } +}; + +module.exports = WebGLSnapshot; + + +/***/ }), +/* 542 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129511,7 +129834,7 @@ var Axes = {}; module.exports = Axes; -var Vector = __webpack_require__(101); +var Vector = __webpack_require__(102); var Common = __webpack_require__(44); (function() { @@ -129568,7 +129891,7 @@ var Common = __webpack_require__(44); /***/ }), -/* 541 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129583,28 +129906,28 @@ var Common = __webpack_require__(44); module.exports = { - AFTER_ADD: __webpack_require__(1422), - AFTER_REMOVE: __webpack_require__(1423), - AFTER_UPDATE: __webpack_require__(1424), - BEFORE_ADD: __webpack_require__(1425), - BEFORE_REMOVE: __webpack_require__(1426), - BEFORE_UPDATE: __webpack_require__(1427), - COLLISION_ACTIVE: __webpack_require__(1428), - COLLISION_END: __webpack_require__(1429), - COLLISION_START: __webpack_require__(1430), - DRAG_END: __webpack_require__(1431), - DRAG: __webpack_require__(1432), - DRAG_START: __webpack_require__(1433), - PAUSE: __webpack_require__(1434), - RESUME: __webpack_require__(1435), - SLEEP_END: __webpack_require__(1436), - SLEEP_START: __webpack_require__(1437) + AFTER_ADD: __webpack_require__(1426), + AFTER_REMOVE: __webpack_require__(1427), + AFTER_UPDATE: __webpack_require__(1428), + BEFORE_ADD: __webpack_require__(1429), + BEFORE_REMOVE: __webpack_require__(1430), + BEFORE_UPDATE: __webpack_require__(1431), + COLLISION_ACTIVE: __webpack_require__(1432), + COLLISION_END: __webpack_require__(1433), + COLLISION_START: __webpack_require__(1434), + DRAG_END: __webpack_require__(1435), + DRAG: __webpack_require__(1436), + DRAG_START: __webpack_require__(1437), + PAUSE: __webpack_require__(1438), + RESUME: __webpack_require__(1439), + SLEEP_END: __webpack_require__(1440), + SLEEP_START: __webpack_require__(1441) }; /***/ }), -/* 542 */ +/* 544 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129619,9 +129942,9 @@ var Detector = {}; module.exports = Detector; -var SAT = __webpack_require__(543); -var Pair = __webpack_require__(500); -var Bounds = __webpack_require__(102); +var SAT = __webpack_require__(545); +var Pair = __webpack_require__(501); +var Bounds = __webpack_require__(103); (function() { @@ -129717,7 +130040,7 @@ var Bounds = __webpack_require__(102); /***/ }), -/* 543 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129733,7 +130056,7 @@ var SAT = {}; module.exports = SAT; var Vertices = __webpack_require__(88); -var Vector = __webpack_require__(101); +var Vector = __webpack_require__(102); (function() { @@ -129993,21 +130316,47 @@ var Vector = __webpack_require__(101); /***/ }), -/* 544 */ +/* 546 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 547 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(545); -__webpack_require__(546); -__webpack_require__(547); __webpack_require__(548); __webpack_require__(549); __webpack_require__(550); __webpack_require__(551); __webpack_require__(552); +__webpack_require__(553); +__webpack_require__(554); +__webpack_require__(555); /***/ }), -/* 545 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -130047,7 +130396,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 546 */ +/* 549 */ /***/ (function(module, exports) { /** @@ -130063,7 +130412,7 @@ if (!Array.isArray) /***/ }), -/* 547 */ +/* 550 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -130250,7 +130599,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 548 */ +/* 551 */ /***/ (function(module, exports) { /** @@ -130265,7 +130614,7 @@ if (!window.console) /***/ }), -/* 549 */ +/* 552 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -130277,7 +130626,7 @@ if (!Math.trunc) { /***/ }), -/* 550 */ +/* 553 */ /***/ (function(module, exports) { /** @@ -130314,7 +130663,7 @@ if (!Math.trunc) { /***/ }), -/* 551 */ +/* 554 */ /***/ (function(module, exports) { // References: @@ -130371,7 +130720,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 552 */ +/* 555 */ /***/ (function(module, exports) { /** @@ -130424,7 +130773,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 553 */ +/* 556 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130433,7 +130782,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var QuickSet = __webpack_require__(252); +var QuickSet = __webpack_require__(253); /** * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. @@ -130472,7 +130821,7 @@ module.exports = AlignTo; /***/ }), -/* 554 */ +/* 557 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130513,7 +130862,7 @@ module.exports = Angle; /***/ }), -/* 555 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -130552,7 +130901,7 @@ module.exports = Call; /***/ }), -/* 556 */ +/* 559 */ /***/ (function(module, exports) { /** @@ -130610,7 +130959,7 @@ module.exports = GetFirst; /***/ }), -/* 557 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -130668,7 +131017,7 @@ module.exports = GetLast; /***/ }), -/* 558 */ +/* 561 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130677,11 +131026,11 @@ module.exports = GetLast; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AlignIn = __webpack_require__(265); -var CONST = __webpack_require__(107); +var AlignIn = __webpack_require__(266); +var CONST = __webpack_require__(108); var GetFastValue = __webpack_require__(2); var NOOP = __webpack_require__(1); -var Zone = __webpack_require__(115); +var Zone = __webpack_require__(117); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -130787,7 +131136,7 @@ module.exports = GridAlign; /***/ }), -/* 559 */ +/* 562 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131082,7 +131431,7 @@ module.exports = Alpha; /***/ }), -/* 560 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -131231,7 +131580,7 @@ module.exports = ComputedSize; /***/ }), -/* 561 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -131356,7 +131705,7 @@ module.exports = Crop; /***/ }), -/* 562 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -131520,7 +131869,7 @@ module.exports = Flip; /***/ }), -/* 563 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131530,7 +131879,7 @@ module.exports = Flip; */ var Rectangle = __webpack_require__(9); -var RotateAround = __webpack_require__(284); +var RotateAround = __webpack_require__(285); var Vector2 = __webpack_require__(3); /** @@ -131879,7 +132228,7 @@ module.exports = GetBounds; /***/ }), -/* 564 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -131902,7 +132251,7 @@ module.exports = 'blur'; /***/ }), -/* 565 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -131924,7 +132273,7 @@ module.exports = 'boot'; /***/ }), -/* 566 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -131947,7 +132296,7 @@ module.exports = 'contextlost'; /***/ }), -/* 567 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -131970,7 +132319,7 @@ module.exports = 'contextrestored'; /***/ }), -/* 568 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -131993,7 +132342,7 @@ module.exports = 'destroy'; /***/ }), -/* 569 */ +/* 572 */ /***/ (function(module, exports) { /** @@ -132015,7 +132364,7 @@ module.exports = 'focus'; /***/ }), -/* 570 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -132041,7 +132390,7 @@ module.exports = 'hidden'; /***/ }), -/* 571 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -132062,7 +132411,7 @@ module.exports = 'pause'; /***/ }), -/* 572 */ +/* 575 */ /***/ (function(module, exports) { /** @@ -132088,7 +132437,7 @@ module.exports = 'postrender'; /***/ }), -/* 573 */ +/* 576 */ /***/ (function(module, exports) { /** @@ -132113,7 +132462,7 @@ module.exports = 'poststep'; /***/ }), -/* 574 */ +/* 577 */ /***/ (function(module, exports) { /** @@ -132138,7 +132487,7 @@ module.exports = 'prerender'; /***/ }), -/* 575 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -132163,7 +132512,7 @@ module.exports = 'prestep'; /***/ }), -/* 576 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -132185,7 +132534,7 @@ module.exports = 'ready'; /***/ }), -/* 577 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -132206,7 +132555,7 @@ module.exports = 'resume'; /***/ }), -/* 578 */ +/* 581 */ /***/ (function(module, exports) { /** @@ -132231,7 +132580,7 @@ module.exports = 'step'; /***/ }), -/* 579 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -132255,7 +132604,7 @@ module.exports = 'visible'; /***/ }), -/* 580 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -132458,7 +132807,7 @@ module.exports = Origin; /***/ }), -/* 581 */ +/* 584 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132885,7 +133234,7 @@ module.exports = PathFollower; /***/ }), -/* 582 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -133072,7 +133421,7 @@ module.exports = Size; /***/ }), -/* 583 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -133202,7 +133551,7 @@ module.exports = Texture; /***/ }), -/* 584 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -133410,7 +133759,7 @@ module.exports = TextureCrop; /***/ }), -/* 585 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133419,7 +133768,7 @@ module.exports = TextureCrop; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColorFromValue = __webpack_require__(117); +var GetColorFromValue = __webpack_require__(119); /** * Provides methods used for setting the tint of a Game Object. @@ -133742,7 +134091,7 @@ module.exports = Tint; /***/ }), -/* 586 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -133774,7 +134123,7 @@ module.exports = 'changedata'; /***/ }), -/* 587 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -133804,7 +134153,7 @@ module.exports = 'changedata-'; /***/ }), -/* 588 */ +/* 591 */ /***/ (function(module, exports) { /** @@ -133832,7 +134181,7 @@ module.exports = 'removedata'; /***/ }), -/* 589 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -133860,7 +134209,7 @@ module.exports = 'setdata'; /***/ }), -/* 590 */ +/* 593 */ /***/ (function(module, exports) { /** @@ -133886,7 +134235,7 @@ module.exports = 'addedtoscene'; /***/ }), -/* 591 */ +/* 594 */ /***/ (function(module, exports) { /** @@ -133911,7 +134260,7 @@ module.exports = 'destroy'; /***/ }), -/* 592 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -133937,7 +134286,7 @@ module.exports = 'removedfromscene'; /***/ }), -/* 593 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -133969,7 +134318,7 @@ module.exports = 'complete'; /***/ }), -/* 594 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -133998,7 +134347,7 @@ module.exports = 'created'; /***/ }), -/* 595 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -134024,7 +134373,7 @@ module.exports = 'error'; /***/ }), -/* 596 */ +/* 599 */ /***/ (function(module, exports) { /** @@ -134056,7 +134405,7 @@ module.exports = 'loop'; /***/ }), -/* 597 */ +/* 600 */ /***/ (function(module, exports) { /** @@ -134084,7 +134433,7 @@ module.exports = 'play'; /***/ }), -/* 598 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -134109,7 +134458,7 @@ module.exports = 'seeked'; /***/ }), -/* 599 */ +/* 602 */ /***/ (function(module, exports) { /** @@ -134135,7 +134484,7 @@ module.exports = 'seeking'; /***/ }), -/* 600 */ +/* 603 */ /***/ (function(module, exports) { /** @@ -134161,7 +134510,7 @@ module.exports = 'stop'; /***/ }), -/* 601 */ +/* 604 */ /***/ (function(module, exports) { /** @@ -134187,7 +134536,7 @@ module.exports = 'timeout'; /***/ }), -/* 602 */ +/* 605 */ /***/ (function(module, exports) { /** @@ -134213,7 +134562,7 @@ module.exports = 'unlocked'; /***/ }), -/* 603 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134254,7 +134603,7 @@ module.exports = IncAlpha; /***/ }), -/* 604 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134295,7 +134644,7 @@ module.exports = IncX; /***/ }), -/* 605 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134342,7 +134691,7 @@ module.exports = IncXY; /***/ }), -/* 606 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134383,7 +134732,7 @@ module.exports = IncY; /***/ }), -/* 607 */ +/* 610 */ /***/ (function(module, exports) { /** @@ -134432,7 +134781,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 608 */ +/* 611 */ /***/ (function(module, exports) { /** @@ -134484,7 +134833,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 609 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134493,7 +134842,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(160); +var GetPoints = __webpack_require__(162); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -134528,7 +134877,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 610 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134537,9 +134886,9 @@ module.exports = PlaceOnLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MarchingAnts = __webpack_require__(293); -var RotateLeft = __webpack_require__(294); -var RotateRight = __webpack_require__(295); +var MarchingAnts = __webpack_require__(294); +var RotateLeft = __webpack_require__(295); +var RotateRight = __webpack_require__(296); /** * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle. @@ -134586,7 +134935,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 611 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134595,7 +134944,7 @@ module.exports = PlaceOnRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BresenhamPoints = __webpack_require__(296); +var BresenhamPoints = __webpack_require__(297); /** * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle. @@ -134647,7 +134996,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 612 */ +/* 615 */ /***/ (function(module, exports) { /** @@ -134684,7 +135033,7 @@ module.exports = PlayAnimation; /***/ }), -/* 613 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134693,7 +135042,7 @@ module.exports = PlayAnimation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(158); +var Random = __webpack_require__(160); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -134724,7 +135073,7 @@ module.exports = RandomCircle; /***/ }), -/* 614 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134733,7 +135082,7 @@ module.exports = RandomCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(165); +var Random = __webpack_require__(167); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -134764,7 +135113,7 @@ module.exports = RandomEllipse; /***/ }), -/* 615 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134773,7 +135122,7 @@ module.exports = RandomEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(161); +var Random = __webpack_require__(163); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -134804,7 +135153,7 @@ module.exports = RandomLine; /***/ }), -/* 616 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134813,7 +135162,7 @@ module.exports = RandomLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(162); +var Random = __webpack_require__(164); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -134842,7 +135191,7 @@ module.exports = RandomRectangle; /***/ }), -/* 617 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134851,7 +135200,7 @@ module.exports = RandomRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(166); +var Random = __webpack_require__(168); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -134882,7 +135231,7 @@ module.exports = RandomTriangle; /***/ }), -/* 618 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134923,7 +135272,7 @@ module.exports = Rotate; /***/ }), -/* 619 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134932,7 +135281,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(167); +var RotateAroundDistance = __webpack_require__(169); var DistanceBetween = __webpack_require__(55); /** @@ -134969,7 +135318,7 @@ module.exports = RotateAround; /***/ }), -/* 620 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134978,7 +135327,7 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(167); +var MathRotateAroundDistance = __webpack_require__(169); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -135018,7 +135367,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 621 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135059,7 +135408,7 @@ module.exports = ScaleX; /***/ }), -/* 622 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135106,7 +135455,7 @@ module.exports = ScaleXY; /***/ }), -/* 623 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135147,7 +135496,7 @@ module.exports = ScaleY; /***/ }), -/* 624 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135188,7 +135537,7 @@ module.exports = SetAlpha; /***/ }), -/* 625 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135228,7 +135577,7 @@ module.exports = SetBlendMode; /***/ }), -/* 626 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135269,7 +135618,7 @@ module.exports = SetDepth; /***/ }), -/* 627 */ +/* 630 */ /***/ (function(module, exports) { /** @@ -135308,7 +135657,7 @@ module.exports = SetHitArea; /***/ }), -/* 628 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135361,7 +135710,7 @@ module.exports = SetOrigin; /***/ }), -/* 629 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135402,7 +135751,7 @@ module.exports = SetRotation; /***/ }), -/* 630 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135449,7 +135798,7 @@ module.exports = SetScale; /***/ }), -/* 631 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135490,7 +135839,7 @@ module.exports = SetScaleX; /***/ }), -/* 632 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135531,7 +135880,7 @@ module.exports = SetScaleY; /***/ }), -/* 633 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135578,7 +135927,7 @@ module.exports = SetScrollFactor; /***/ }), -/* 634 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135619,7 +135968,7 @@ module.exports = SetScrollFactorX; /***/ }), -/* 635 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135660,7 +136009,7 @@ module.exports = SetScrollFactorY; /***/ }), -/* 636 */ +/* 639 */ /***/ (function(module, exports) { /** @@ -135699,7 +136048,7 @@ module.exports = SetTint; /***/ }), -/* 637 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135737,7 +136086,7 @@ module.exports = SetVisible; /***/ }), -/* 638 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135778,7 +136127,7 @@ module.exports = SetX; /***/ }), -/* 639 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135825,7 +136174,7 @@ module.exports = SetXY; /***/ }), -/* 640 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135866,7 +136215,7 @@ module.exports = SetY; /***/ }), -/* 641 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135996,7 +136345,7 @@ module.exports = ShiftPosition; /***/ }), -/* 642 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136005,7 +136354,7 @@ module.exports = ShiftPosition; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayShuffle = __webpack_require__(119); +var ArrayShuffle = __webpack_require__(121); /** * Shuffles the array in place. The shuffled array is both modified and returned. @@ -136029,7 +136378,7 @@ module.exports = Shuffle; /***/ }), -/* 643 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136038,7 +136387,7 @@ module.exports = Shuffle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(168); +var MathSmootherStep = __webpack_require__(170); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -136087,7 +136436,7 @@ module.exports = SmootherStep; /***/ }), -/* 644 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136096,7 +136445,7 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(169); +var MathSmoothStep = __webpack_require__(171); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -136145,7 +136494,7 @@ module.exports = SmoothStep; /***/ }), -/* 645 */ +/* 648 */ /***/ (function(module, exports) { /** @@ -136208,7 +136557,7 @@ module.exports = Spread; /***/ }), -/* 646 */ +/* 649 */ /***/ (function(module, exports) { /** @@ -136244,7 +136593,7 @@ module.exports = ToggleVisible; /***/ }), -/* 647 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136293,7 +136642,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 648 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136308,17 +136657,17 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(170), - AnimationFrame: __webpack_require__(298), - AnimationManager: __webpack_require__(300), - AnimationState: __webpack_require__(248), - Events: __webpack_require__(120) + Animation: __webpack_require__(172), + AnimationFrame: __webpack_require__(299), + AnimationManager: __webpack_require__(301), + AnimationState: __webpack_require__(157), + Events: __webpack_require__(122) }; /***/ }), -/* 649 */ +/* 652 */ /***/ (function(module, exports) { /** @@ -136345,7 +136694,7 @@ module.exports = 'add'; /***/ }), -/* 650 */ +/* 653 */ /***/ (function(module, exports) { /** @@ -136373,6 +136722,7 @@ module.exports = 'add'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -136390,7 +136740,57 @@ module.exports = 'animationcomplete'; /***/ }), -/* 651 */ +/* 654 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Complete Dynamic Key Event. + * + * This event is dispatched by a Sprite when an animation playing on it completes playback. + * This happens when the animation gets to the end of its sequence, factoring in any delays + * or repeats it may have to process. + * + * An animation that is set to loop, or repeat forever, will never fire this event, because + * it never actually completes. If you need to handle this, listen for the `ANIMATION_STOP` + * event instead, as this is emitted when the animation is stopped directly. + * + * The difference between this and the `ANIMATION_COMPLETE` event is that this one has a + * dynamic event name that contains the name of the animation within it. For example, + * if you had an animation called `explode` you could listen for the completion of that + * specific animation by using: `sprite.on('animationcomplete-explode', listener)`. Or, if you + * wish to use types: `sprite.on(Phaser.Animations.Events.ANIMATION_COMPLETE_KEY + 'explode', listener)`. + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_COMPLETE_KEY + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationcomplete-'; + + +/***/ }), +/* 655 */ /***/ (function(module, exports) { /** @@ -136415,6 +136815,7 @@ module.exports = 'animationcomplete'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -136432,7 +136833,7 @@ module.exports = 'animationrepeat'; /***/ }), -/* 652 */ +/* 656 */ /***/ (function(module, exports) { /** @@ -136455,6 +136856,7 @@ module.exports = 'animationrepeat'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -136472,7 +136874,7 @@ module.exports = 'animationrestart'; /***/ }), -/* 653 */ +/* 657 */ /***/ (function(module, exports) { /** @@ -136496,6 +136898,7 @@ module.exports = 'animationrestart'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -136513,7 +136916,7 @@ module.exports = 'animationstart'; /***/ }), -/* 654 */ +/* 658 */ /***/ (function(module, exports) { /** @@ -136537,6 +136940,7 @@ module.exports = 'animationstart'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -136554,7 +136958,7 @@ module.exports = 'animationstop'; /***/ }), -/* 655 */ +/* 659 */ /***/ (function(module, exports) { /** @@ -136582,6 +136986,7 @@ module.exports = 'animationstop'; * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * 5. `ANIMATION_COMPLETE_KEY` (only if there is a finite, or zero, repeat count) * * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. * @@ -136599,7 +137004,7 @@ module.exports = 'animationupdate'; /***/ }), -/* 656 */ +/* 660 */ /***/ (function(module, exports) { /** @@ -136623,7 +137028,7 @@ module.exports = 'pauseall'; /***/ }), -/* 657 */ +/* 661 */ /***/ (function(module, exports) { /** @@ -136647,7 +137052,7 @@ module.exports = 'remove'; /***/ }), -/* 658 */ +/* 662 */ /***/ (function(module, exports) { /** @@ -136670,7 +137075,7 @@ module.exports = 'resumeall'; /***/ }), -/* 659 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136685,15 +137090,15 @@ module.exports = 'resumeall'; module.exports = { - BaseCache: __webpack_require__(302), - CacheManager: __webpack_require__(304), - Events: __webpack_require__(303) + BaseCache: __webpack_require__(303), + CacheManager: __webpack_require__(305), + Events: __webpack_require__(304) }; /***/ }), -/* 660 */ +/* 664 */ /***/ (function(module, exports) { /** @@ -136718,7 +137123,7 @@ module.exports = 'add'; /***/ }), -/* 661 */ +/* 665 */ /***/ (function(module, exports) { /** @@ -136743,7 +137148,7 @@ module.exports = 'remove'; /***/ }), -/* 662 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136762,14 +137167,14 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(663), - Scene2D: __webpack_require__(666) + Controls: __webpack_require__(667), + Scene2D: __webpack_require__(670) }; /***/ }), -/* 663 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136784,14 +137189,14 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(664), - SmoothedKeyControl: __webpack_require__(665) + FixedKeyControl: __webpack_require__(668), + SmoothedKeyControl: __webpack_require__(669) }; /***/ }), -/* 664 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137097,7 +137502,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 665 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137580,7 +137985,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 666 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137595,17 +138000,17 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(305), - BaseCamera: __webpack_require__(92), - CameraManager: __webpack_require__(722), - Effects: __webpack_require__(313), + Camera: __webpack_require__(306), + BaseCamera: __webpack_require__(93), + CameraManager: __webpack_require__(726), + Effects: __webpack_require__(314), Events: __webpack_require__(42) }; /***/ }), -/* 667 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -137628,7 +138033,7 @@ module.exports = 'cameradestroy'; /***/ }), -/* 668 */ +/* 672 */ /***/ (function(module, exports) { /** @@ -137654,7 +138059,7 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 669 */ +/* 673 */ /***/ (function(module, exports) { /** @@ -137684,7 +138089,7 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 670 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -137710,7 +138115,7 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 671 */ +/* 675 */ /***/ (function(module, exports) { /** @@ -137740,7 +138145,7 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 672 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -137764,7 +138169,7 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 673 */ +/* 677 */ /***/ (function(module, exports) { /** @@ -137792,7 +138197,7 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 674 */ +/* 678 */ /***/ (function(module, exports) { /** @@ -137816,7 +138221,7 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 675 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -137843,7 +138248,7 @@ module.exports = 'camerapanstart'; /***/ }), -/* 676 */ +/* 680 */ /***/ (function(module, exports) { /** @@ -137869,7 +138274,7 @@ module.exports = 'postrender'; /***/ }), -/* 677 */ +/* 681 */ /***/ (function(module, exports) { /** @@ -137895,7 +138300,7 @@ module.exports = 'prerender'; /***/ }), -/* 678 */ +/* 682 */ /***/ (function(module, exports) { /** @@ -137919,7 +138324,7 @@ module.exports = 'camerarotatecomplete'; /***/ }), -/* 679 */ +/* 683 */ /***/ (function(module, exports) { /** @@ -137945,7 +138350,7 @@ module.exports = 'camerarotatestart'; /***/ }), -/* 680 */ +/* 684 */ /***/ (function(module, exports) { /** @@ -137969,7 +138374,7 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 681 */ +/* 685 */ /***/ (function(module, exports) { /** @@ -137995,7 +138400,7 @@ module.exports = 'camerashakestart'; /***/ }), -/* 682 */ +/* 686 */ /***/ (function(module, exports) { /** @@ -138019,7 +138424,7 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 683 */ +/* 687 */ /***/ (function(module, exports) { /** @@ -138045,7 +138450,7 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 684 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138433,7 +138838,7 @@ module.exports = Fade; /***/ }), -/* 685 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138784,7 +139189,7 @@ module.exports = Flash; /***/ }), -/* 686 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138795,7 +139200,7 @@ module.exports = Flash; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(122); +var EaseMap = __webpack_require__(123); var Events = __webpack_require__(42); var Vector2 = __webpack_require__(3); @@ -139109,7 +139514,7 @@ module.exports = Pan; /***/ }), -/* 687 */ +/* 691 */ /***/ (function(module, exports) { /** @@ -139140,7 +139545,7 @@ module.exports = In; /***/ }), -/* 688 */ +/* 692 */ /***/ (function(module, exports) { /** @@ -139171,7 +139576,7 @@ module.exports = Out; /***/ }), -/* 689 */ +/* 693 */ /***/ (function(module, exports) { /** @@ -139211,7 +139616,7 @@ module.exports = InOut; /***/ }), -/* 690 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -139256,7 +139661,7 @@ module.exports = In; /***/ }), -/* 691 */ +/* 695 */ /***/ (function(module, exports) { /** @@ -139299,7 +139704,7 @@ module.exports = Out; /***/ }), -/* 692 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -139363,7 +139768,7 @@ module.exports = InOut; /***/ }), -/* 693 */ +/* 697 */ /***/ (function(module, exports) { /** @@ -139391,7 +139796,7 @@ module.exports = In; /***/ }), -/* 694 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -139419,7 +139824,7 @@ module.exports = Out; /***/ }), -/* 695 */ +/* 699 */ /***/ (function(module, exports) { /** @@ -139454,7 +139859,7 @@ module.exports = InOut; /***/ }), -/* 696 */ +/* 700 */ /***/ (function(module, exports) { /** @@ -139482,7 +139887,7 @@ module.exports = In; /***/ }), -/* 697 */ +/* 701 */ /***/ (function(module, exports) { /** @@ -139510,7 +139915,7 @@ module.exports = Out; /***/ }), -/* 698 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -139545,7 +139950,7 @@ module.exports = InOut; /***/ }), -/* 699 */ +/* 703 */ /***/ (function(module, exports) { /** @@ -139600,7 +140005,7 @@ module.exports = In; /***/ }), -/* 700 */ +/* 704 */ /***/ (function(module, exports) { /** @@ -139655,7 +140060,7 @@ module.exports = Out; /***/ }), -/* 701 */ +/* 705 */ /***/ (function(module, exports) { /** @@ -139717,7 +140122,7 @@ module.exports = InOut; /***/ }), -/* 702 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -139745,7 +140150,7 @@ module.exports = In; /***/ }), -/* 703 */ +/* 707 */ /***/ (function(module, exports) { /** @@ -139773,7 +140178,7 @@ module.exports = Out; /***/ }), -/* 704 */ +/* 708 */ /***/ (function(module, exports) { /** @@ -139808,7 +140213,7 @@ module.exports = InOut; /***/ }), -/* 705 */ +/* 709 */ /***/ (function(module, exports) { /** @@ -139836,7 +140241,7 @@ module.exports = Linear; /***/ }), -/* 706 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -139864,7 +140269,7 @@ module.exports = In; /***/ }), -/* 707 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -139892,7 +140297,7 @@ module.exports = Out; /***/ }), -/* 708 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -139927,7 +140332,7 @@ module.exports = InOut; /***/ }), -/* 709 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -139955,7 +140360,7 @@ module.exports = In; /***/ }), -/* 710 */ +/* 714 */ /***/ (function(module, exports) { /** @@ -139983,7 +140388,7 @@ module.exports = Out; /***/ }), -/* 711 */ +/* 715 */ /***/ (function(module, exports) { /** @@ -140018,7 +140423,7 @@ module.exports = InOut; /***/ }), -/* 712 */ +/* 716 */ /***/ (function(module, exports) { /** @@ -140046,7 +140451,7 @@ module.exports = In; /***/ }), -/* 713 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -140074,7 +140479,7 @@ module.exports = Out; /***/ }), -/* 714 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -140109,7 +140514,7 @@ module.exports = InOut; /***/ }), -/* 715 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -140148,7 +140553,7 @@ module.exports = In; /***/ }), -/* 716 */ +/* 720 */ /***/ (function(module, exports) { /** @@ -140187,7 +140592,7 @@ module.exports = Out; /***/ }), -/* 717 */ +/* 721 */ /***/ (function(module, exports) { /** @@ -140226,7 +140631,7 @@ module.exports = InOut; /***/ }), -/* 718 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -140268,7 +140673,7 @@ module.exports = Stepped; /***/ }), -/* 719 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140587,7 +140992,7 @@ module.exports = Shake; /***/ }), -/* 720 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140599,7 +141004,7 @@ module.exports = Shake; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); var Events = __webpack_require__(42); -var EaseMap = __webpack_require__(122); +var EaseMap = __webpack_require__(123); /** * @classdesc @@ -141020,7 +141425,7 @@ module.exports = RotateTo; /***/ }), -/* 721 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141031,7 +141436,7 @@ module.exports = RotateTo; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(122); +var EaseMap = __webpack_require__(123); var Events = __webpack_require__(42); /** @@ -141313,7 +141718,7 @@ module.exports = Zoom; /***/ }), -/* 722 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141322,12 +141727,12 @@ module.exports = Zoom; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Camera = __webpack_require__(305); +var Camera = __webpack_require__(306); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); var RectangleContains = __webpack_require__(50); -var ScaleEvents = __webpack_require__(93); +var ScaleEvents = __webpack_require__(94); var SceneEvents = __webpack_require__(20); /** @@ -142061,7 +142466,7 @@ module.exports = CameraManager; /***/ }), -/* 723 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -142080,7 +142485,7 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 724 */ +/* 728 */ /***/ (function(module, exports) { /** @@ -142099,7 +142504,7 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 725 */ +/* 729 */ /***/ (function(module, exports) { /** @@ -142118,7 +142523,7 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 726 */ +/* 730 */ /***/ (function(module, exports) { /** @@ -142138,7 +142543,7 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 727 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -142159,7 +142564,7 @@ module.exports = 'orientationchange'; /***/ }), -/* 728 */ +/* 732 */ /***/ (function(module, exports) { /** @@ -142190,7 +142595,7 @@ module.exports = 'resize'; /***/ }), -/* 729 */ +/* 733 */ /***/ (function(module, exports) { /** @@ -142216,7 +142621,7 @@ module.exports = 'addedtoscene'; /***/ }), -/* 730 */ +/* 734 */ /***/ (function(module, exports) { /** @@ -142241,7 +142646,7 @@ module.exports = 'boot'; /***/ }), -/* 731 */ +/* 735 */ /***/ (function(module, exports) { /** @@ -142270,7 +142675,7 @@ module.exports = 'create'; /***/ }), -/* 732 */ +/* 736 */ /***/ (function(module, exports) { /** @@ -142297,7 +142702,7 @@ module.exports = 'destroy'; /***/ }), -/* 733 */ +/* 737 */ /***/ (function(module, exports) { /** @@ -142324,7 +142729,7 @@ module.exports = 'pause'; /***/ }), -/* 734 */ +/* 738 */ /***/ (function(module, exports) { /** @@ -142361,7 +142766,7 @@ module.exports = 'postupdate'; /***/ }), -/* 735 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -142398,7 +142803,7 @@ module.exports = 'preupdate'; /***/ }), -/* 736 */ +/* 740 */ /***/ (function(module, exports) { /** @@ -142426,7 +142831,7 @@ module.exports = 'ready'; /***/ }), -/* 737 */ +/* 741 */ /***/ (function(module, exports) { /** @@ -142452,7 +142857,7 @@ module.exports = 'removedfromscene'; /***/ }), -/* 738 */ +/* 742 */ /***/ (function(module, exports) { /** @@ -142488,7 +142893,7 @@ module.exports = 'render'; /***/ }), -/* 739 */ +/* 743 */ /***/ (function(module, exports) { /** @@ -142515,7 +142920,7 @@ module.exports = 'resume'; /***/ }), -/* 740 */ +/* 744 */ /***/ (function(module, exports) { /** @@ -142545,7 +142950,7 @@ module.exports = 'shutdown'; /***/ }), -/* 741 */ +/* 745 */ /***/ (function(module, exports) { /** @@ -142572,7 +142977,7 @@ module.exports = 'sleep'; /***/ }), -/* 742 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -142597,7 +143002,7 @@ module.exports = 'start'; /***/ }), -/* 743 */ +/* 747 */ /***/ (function(module, exports) { /** @@ -142633,7 +143038,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 744 */ +/* 748 */ /***/ (function(module, exports) { /** @@ -142670,7 +143075,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 745 */ +/* 749 */ /***/ (function(module, exports) { /** @@ -142704,7 +143109,7 @@ module.exports = 'transitionout'; /***/ }), -/* 746 */ +/* 750 */ /***/ (function(module, exports) { /** @@ -142744,7 +143149,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 747 */ +/* 751 */ /***/ (function(module, exports) { /** @@ -142779,7 +143184,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 748 */ +/* 752 */ /***/ (function(module, exports) { /** @@ -142816,7 +143221,7 @@ module.exports = 'update'; /***/ }), -/* 749 */ +/* 753 */ /***/ (function(module, exports) { /** @@ -142843,7 +143248,7 @@ module.exports = 'wake'; /***/ }), -/* 750 */ +/* 754 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142858,18 +143263,18 @@ module.exports = 'wake'; module.exports = { - Config: __webpack_require__(326), - CreateRenderer: __webpack_require__(348), - DebugHeader: __webpack_require__(350), + Config: __webpack_require__(327), + CreateRenderer: __webpack_require__(349), + DebugHeader: __webpack_require__(351), Events: __webpack_require__(21), - TimeStep: __webpack_require__(351), - VisibilityHandler: __webpack_require__(353) + TimeStep: __webpack_require__(352), + VisibilityHandler: __webpack_require__(354) }; /***/ }), -/* 751 */ +/* 755 */ /***/ (function(module, exports) { // shim for using process in browser @@ -143059,7 +143464,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 752 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143068,7 +143473,7 @@ process.umask = function() { return 0; }; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(125); +var Browser = __webpack_require__(126); /** * Determines the input support of the browser running this Phaser Game instance. @@ -143134,7 +143539,7 @@ module.exports = init(); /***/ }), -/* 753 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143143,7 +143548,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(125); +var Browser = __webpack_require__(126); /** * Determines the audio playback capabilities of the device running this Phaser Game instance. @@ -143259,7 +143664,7 @@ module.exports = init(); /***/ }), -/* 754 */ +/* 758 */ /***/ (function(module, exports) { /** @@ -143346,7 +143751,7 @@ module.exports = init(); /***/ }), -/* 755 */ +/* 759 */ /***/ (function(module, exports) { /** @@ -143450,7 +143855,7 @@ module.exports = init(); /***/ }), -/* 756 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143465,25 +143870,25 @@ module.exports = init(); module.exports = { - Between: __webpack_require__(329), - BetweenPoints: __webpack_require__(330), - BetweenPointsY: __webpack_require__(757), - BetweenY: __webpack_require__(758), - CounterClockwise: __webpack_require__(759), - Normalize: __webpack_require__(331), - Random: __webpack_require__(760), - RandomDegrees: __webpack_require__(761), - Reverse: __webpack_require__(762), - RotateTo: __webpack_require__(763), - ShortestBetween: __webpack_require__(764), - Wrap: __webpack_require__(246), - WrapDegrees: __webpack_require__(247) + Between: __webpack_require__(330), + BetweenPoints: __webpack_require__(331), + BetweenPointsY: __webpack_require__(761), + BetweenY: __webpack_require__(762), + CounterClockwise: __webpack_require__(763), + Normalize: __webpack_require__(332), + Random: __webpack_require__(764), + RandomDegrees: __webpack_require__(765), + Reverse: __webpack_require__(766), + RotateTo: __webpack_require__(767), + ShortestBetween: __webpack_require__(768), + Wrap: __webpack_require__(248), + WrapDegrees: __webpack_require__(249) }; /***/ }), -/* 757 */ +/* 761 */ /***/ (function(module, exports) { /** @@ -143515,7 +143920,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 758 */ +/* 762 */ /***/ (function(module, exports) { /** @@ -143549,7 +143954,7 @@ module.exports = BetweenY; /***/ }), -/* 759 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143594,7 +143999,7 @@ module.exports = CounterClockwise; /***/ }), -/* 760 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143604,7 +144009,7 @@ module.exports = CounterClockwise; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(126); +var FloatBetween = __webpack_require__(127); /** * Returns a random angle in the range [-pi, pi]. @@ -143623,7 +144028,7 @@ module.exports = Random; /***/ }), -/* 761 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143633,7 +144038,7 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(126); +var FloatBetween = __webpack_require__(127); /** * Returns a random angle in the range [-180, 180]. @@ -143652,7 +144057,7 @@ module.exports = RandomDegrees; /***/ }), -/* 762 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143661,7 +144066,7 @@ module.exports = RandomDegrees; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(331); +var Normalize = __webpack_require__(332); /** * Reverse the given angle. @@ -143682,7 +144087,7 @@ module.exports = Reverse; /***/ }), -/* 763 */ +/* 767 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143749,7 +144154,7 @@ module.exports = RotateTo; /***/ }), -/* 764 */ +/* 768 */ /***/ (function(module, exports) { /** @@ -143798,7 +144203,7 @@ module.exports = ShortestBetween; /***/ }), -/* 765 */ +/* 769 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143814,18 +144219,18 @@ module.exports = ShortestBetween; module.exports = { Between: __webpack_require__(55), - BetweenPoints: __webpack_require__(332), - BetweenPointsSquared: __webpack_require__(766), - Chebyshev: __webpack_require__(767), - Power: __webpack_require__(768), - Snake: __webpack_require__(769), - Squared: __webpack_require__(333) + BetweenPoints: __webpack_require__(333), + BetweenPointsSquared: __webpack_require__(770), + Chebyshev: __webpack_require__(771), + Power: __webpack_require__(772), + Snake: __webpack_require__(773), + Squared: __webpack_require__(334) }; /***/ }), -/* 766 */ +/* 770 */ /***/ (function(module, exports) { /** @@ -143857,7 +144262,7 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), -/* 767 */ +/* 771 */ /***/ (function(module, exports) { /** @@ -143891,7 +144296,7 @@ module.exports = ChebyshevDistance; /***/ }), -/* 768 */ +/* 772 */ /***/ (function(module, exports) { /** @@ -143925,7 +144330,7 @@ module.exports = DistancePower; /***/ }), -/* 769 */ +/* 773 */ /***/ (function(module, exports) { /** @@ -143959,7 +144364,7 @@ module.exports = SnakeDistance; /***/ }), -/* 770 */ +/* 774 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143974,24 +144379,24 @@ module.exports = SnakeDistance; module.exports = { - Back: __webpack_require__(314), - Bounce: __webpack_require__(315), - Circular: __webpack_require__(316), - Cubic: __webpack_require__(317), - Elastic: __webpack_require__(318), - Expo: __webpack_require__(319), - Linear: __webpack_require__(320), - Quadratic: __webpack_require__(321), - Quartic: __webpack_require__(322), - Quintic: __webpack_require__(323), - Sine: __webpack_require__(324), - Stepped: __webpack_require__(325) + Back: __webpack_require__(315), + Bounce: __webpack_require__(316), + Circular: __webpack_require__(317), + Cubic: __webpack_require__(318), + Elastic: __webpack_require__(319), + Expo: __webpack_require__(320), + Linear: __webpack_require__(321), + Quadratic: __webpack_require__(322), + Quartic: __webpack_require__(323), + Quintic: __webpack_require__(324), + Sine: __webpack_require__(325), + Stepped: __webpack_require__(326) }; /***/ }), -/* 771 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144006,17 +144411,17 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(772), - Equal: __webpack_require__(108), - Floor: __webpack_require__(773), - GreaterThan: __webpack_require__(334), - LessThan: __webpack_require__(335) + Ceil: __webpack_require__(776), + Equal: __webpack_require__(109), + Floor: __webpack_require__(777), + GreaterThan: __webpack_require__(335), + LessThan: __webpack_require__(336) }; /***/ }), -/* 772 */ +/* 776 */ /***/ (function(module, exports) { /** @@ -144047,7 +144452,7 @@ module.exports = Ceil; /***/ }), -/* 773 */ +/* 777 */ /***/ (function(module, exports) { /** @@ -144078,7 +144483,7 @@ module.exports = Floor; /***/ }), -/* 774 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144093,19 +144498,19 @@ module.exports = Floor; module.exports = { - Bezier: __webpack_require__(775), - CatmullRom: __webpack_require__(776), - CubicBezier: __webpack_require__(338), - Linear: __webpack_require__(777), - QuadraticBezier: __webpack_require__(339), - SmoothStep: __webpack_require__(340), - SmootherStep: __webpack_require__(778) + Bezier: __webpack_require__(779), + CatmullRom: __webpack_require__(780), + CubicBezier: __webpack_require__(339), + Linear: __webpack_require__(781), + QuadraticBezier: __webpack_require__(340), + SmoothStep: __webpack_require__(341), + SmootherStep: __webpack_require__(782) }; /***/ }), -/* 775 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144114,7 +144519,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(336); +var Bernstein = __webpack_require__(337); /** * A bezier interpolation method. @@ -144144,7 +144549,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 776 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144153,7 +144558,7 @@ module.exports = BezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(179); +var CatmullRom = __webpack_require__(181); /** * A Catmull-Rom interpolation method. @@ -144201,7 +144606,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 777 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144210,7 +144615,7 @@ module.exports = CatmullRomInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(123); +var Linear = __webpack_require__(124); /** * A linear interpolation method. @@ -144248,7 +144653,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 778 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144257,7 +144662,7 @@ module.exports = LinearInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(168); +var SmootherStep = __webpack_require__(170); /** * A Smoother Step interpolation method. @@ -144281,7 +144686,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 779 */ +/* 783 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144296,15 +144701,15 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(341), - IsSize: __webpack_require__(127), - IsValue: __webpack_require__(780) + GetNext: __webpack_require__(342), + IsSize: __webpack_require__(128), + IsValue: __webpack_require__(784) }; /***/ }), -/* 780 */ +/* 784 */ /***/ (function(module, exports) { /** @@ -144332,7 +144737,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 781 */ +/* 785 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144347,15 +144752,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(342), - Floor: __webpack_require__(94), - To: __webpack_require__(782) + Ceil: __webpack_require__(343), + Floor: __webpack_require__(95), + To: __webpack_require__(786) }; /***/ }), -/* 782 */ +/* 786 */ /***/ (function(module, exports) { /** @@ -144398,7 +144803,7 @@ module.exports = SnapTo; /***/ }), -/* 783 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144908,7 +145313,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 784 */ +/* 788 */ /***/ (function(module, exports) { /** @@ -144943,7 +145348,7 @@ module.exports = Average; /***/ }), -/* 785 */ +/* 789 */ /***/ (function(module, exports) { /** @@ -144980,7 +145385,7 @@ module.exports = CeilTo; /***/ }), -/* 786 */ +/* 790 */ /***/ (function(module, exports) { /** @@ -145009,7 +145414,7 @@ module.exports = Difference; /***/ }), -/* 787 */ +/* 791 */ /***/ (function(module, exports) { /** @@ -145046,7 +145451,7 @@ module.exports = FloorTo; /***/ }), -/* 788 */ +/* 792 */ /***/ (function(module, exports) { /** @@ -145079,7 +145484,7 @@ module.exports = GetSpeed; /***/ }), -/* 789 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -145110,7 +145515,7 @@ module.exports = IsEven; /***/ }), -/* 790 */ +/* 794 */ /***/ (function(module, exports) { /** @@ -145139,7 +145544,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 791 */ +/* 795 */ /***/ (function(module, exports) { /** @@ -145169,7 +145574,7 @@ module.exports = MaxAdd; /***/ }), -/* 792 */ +/* 796 */ /***/ (function(module, exports) { /** @@ -145199,7 +145604,7 @@ module.exports = MinSub; /***/ }), -/* 793 */ +/* 797 */ /***/ (function(module, exports) { /** @@ -145258,7 +145663,7 @@ module.exports = Percent; /***/ }), -/* 794 */ +/* 798 */ /***/ (function(module, exports) { /** @@ -145298,7 +145703,7 @@ module.exports = RandomXY; /***/ }), -/* 795 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -145337,7 +145742,7 @@ module.exports = RandomXYZ; /***/ }), -/* 796 */ +/* 800 */ /***/ (function(module, exports) { /** @@ -145374,7 +145779,7 @@ module.exports = RandomXYZW; /***/ }), -/* 797 */ +/* 801 */ /***/ (function(module, exports) { /** @@ -145411,7 +145816,7 @@ module.exports = RotateTo; /***/ }), -/* 798 */ +/* 802 */ /***/ (function(module, exports) { /** @@ -145463,7 +145868,7 @@ module.exports = RoundTo; /***/ }), -/* 799 */ +/* 803 */ /***/ (function(module, exports) { /** @@ -145516,7 +145921,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 800 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145574,7 +145979,7 @@ module.exports = ToXY; /***/ }), -/* 801 */ +/* 805 */ /***/ (function(module, exports) { /** @@ -145604,7 +146009,7 @@ module.exports = Within; /***/ }), -/* 802 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145614,8 +146019,8 @@ module.exports = Within; */ var Vector3 = __webpack_require__(81); -var Matrix4 = __webpack_require__(346); -var Quaternion = __webpack_require__(347); +var Matrix4 = __webpack_require__(347); +var Quaternion = __webpack_require__(348); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -145651,142 +146056,10 @@ var RotateVec3 = function (vec, axis, radians) module.exports = RotateVec3; -/***/ }), -/* 803 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Texture Add Event. - * - * This event is dispatched by the Texture Manager when a texture is added to it. - * - * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`. - * - * @event Phaser.Textures.Events#ADD - * @since 3.0.0 - * - * @param {string} key - The key of the Texture that was added to the Texture Manager. - * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was added to the Texture Manager. - */ -module.exports = 'addtexture'; - - -/***/ }), -/* 804 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Texture Load Error Event. - * - * This event is dispatched by the Texture Manager when a texture it requested to load failed. - * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin. - * - * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`. - * - * @event Phaser.Textures.Events#ERROR - * @since 3.0.0 - * - * @param {string} key - The key of the Texture that failed to load into the Texture Manager. - */ -module.exports = 'onerror'; - - -/***/ }), -/* 805 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Texture Load Event. - * - * This event is dispatched by the Texture Manager when a texture has finished loading on it. - * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin. - * - * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`. - * - * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event. - * - * @event Phaser.Textures.Events#LOAD - * @since 3.0.0 - * - * @param {string} key - The key of the Texture that was loaded by the Texture Manager. - * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was loaded by the Texture Manager. - */ -module.exports = 'onload'; - - -/***/ }), -/* 806 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * This internal event signifies that the Texture Manager is now ready and the Game can continue booting. - * - * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking - * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game - * instance, which tells the Game to carry on booting. - * - * @event Phaser.Textures.Events#READY - * @since 3.16.1 - */ -module.exports = 'ready'; - - /***/ }), /* 807 */ /***/ (function(module, exports) { -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Texture Remove Event. - * - * This event is dispatched by the Texture Manager when a texture is removed from it. - * - * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`. - * - * If you have any Game Objects still using the removed texture, they will start throwing - * errors the next time they try to render. Be sure to clear all use of the texture in this event handler. - * - * @event Phaser.Textures.Events#REMOVE - * @since 3.0.0 - * - * @param {string} key - The key of the Texture that was removed from the Texture Manager. - */ -module.exports = 'removetexture'; - - -/***/ }), -/* 808 */ -/***/ (function(module, exports) { - module.exports = [ '#define SHADER_NAME PHASER_BITMAP_MASK_FS', '', @@ -145820,7 +146093,7 @@ module.exports = [ /***/ }), -/* 809 */ +/* 808 */ /***/ (function(module, exports) { module.exports = [ @@ -145839,7 +146112,7 @@ module.exports = [ /***/ }), -/* 810 */ +/* 809 */ /***/ (function(module, exports) { module.exports = [ @@ -145898,7 +146171,7 @@ module.exports = [ /***/ }), -/* 811 */ +/* 810 */ /***/ (function(module, exports) { module.exports = [ @@ -145946,7 +146219,7 @@ module.exports = [ /***/ }), -/* 812 */ +/* 811 */ /***/ (function(module, exports) { module.exports = [ @@ -145984,7 +146257,7 @@ module.exports = [ /***/ }), -/* 813 */ +/* 812 */ /***/ (function(module, exports) { module.exports = [ @@ -146028,7 +146301,7 @@ module.exports = [ /***/ }), -/* 814 */ +/* 813 */ /***/ (function(module, exports) { module.exports = [ @@ -146061,8 +146334,140 @@ module.exports = [ ].join('\n'); +/***/ }), +/* 814 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Texture Add Event. + * + * This event is dispatched by the Texture Manager when a texture is added to it. + * + * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`. + * + * @event Phaser.Textures.Events#ADD + * @since 3.0.0 + * + * @param {string} key - The key of the Texture that was added to the Texture Manager. + * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was added to the Texture Manager. + */ +module.exports = 'addtexture'; + + /***/ }), /* 815 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Texture Load Error Event. + * + * This event is dispatched by the Texture Manager when a texture it requested to load failed. + * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin. + * + * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`. + * + * @event Phaser.Textures.Events#ERROR + * @since 3.0.0 + * + * @param {string} key - The key of the Texture that failed to load into the Texture Manager. + */ +module.exports = 'onerror'; + + +/***/ }), +/* 816 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Texture Load Event. + * + * This event is dispatched by the Texture Manager when a texture has finished loading on it. + * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin. + * + * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`. + * + * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event. + * + * @event Phaser.Textures.Events#LOAD + * @since 3.0.0 + * + * @param {string} key - The key of the Texture that was loaded by the Texture Manager. + * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was loaded by the Texture Manager. + */ +module.exports = 'onload'; + + +/***/ }), +/* 817 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * This internal event signifies that the Texture Manager is now ready and the Game can continue booting. + * + * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking + * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game + * instance, which tells the Game to carry on booting. + * + * @event Phaser.Textures.Events#READY + * @since 3.16.1 + */ +module.exports = 'ready'; + + +/***/ }), +/* 818 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Texture Remove Event. + * + * This event is dispatched by the Texture Manager when a texture is removed from it. + * + * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`. + * + * If you have any Game Objects still using the removed texture, they will start throwing + * errors the next time they try to render. Be sure to clear all use of the texture in this event handler. + * + * @event Phaser.Textures.Events#REMOVE + * @since 3.0.0 + * + * @param {string} key - The key of the Texture that was removed from the Texture Manager. + */ +module.exports = 'removetexture'; + + +/***/ }), +/* 819 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146077,14 +146482,14 @@ module.exports = [ module.exports = { - GenerateTexture: __webpack_require__(354), - Palettes: __webpack_require__(816) + GenerateTexture: __webpack_require__(355), + Palettes: __webpack_require__(820) }; /***/ }), -/* 816 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146099,17 +146504,17 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(355), - C64: __webpack_require__(817), - CGA: __webpack_require__(818), - JMP: __webpack_require__(819), - MSX: __webpack_require__(820) + ARNE16: __webpack_require__(356), + C64: __webpack_require__(821), + CGA: __webpack_require__(822), + JMP: __webpack_require__(823), + MSX: __webpack_require__(824) }; /***/ }), -/* 817 */ +/* 821 */ /***/ (function(module, exports) { /** @@ -146147,7 +146552,7 @@ module.exports = { /***/ }), -/* 818 */ +/* 822 */ /***/ (function(module, exports) { /** @@ -146185,7 +146590,7 @@ module.exports = { /***/ }), -/* 819 */ +/* 823 */ /***/ (function(module, exports) { /** @@ -146223,7 +146628,7 @@ module.exports = { /***/ }), -/* 820 */ +/* 824 */ /***/ (function(module, exports) { /** @@ -146261,7 +146666,7 @@ module.exports = { /***/ }), -/* 821 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146275,20 +146680,20 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(822), - MoveTo: __webpack_require__(359), + Path: __webpack_require__(826), + MoveTo: __webpack_require__(360), - CubicBezier: __webpack_require__(356), + CubicBezier: __webpack_require__(357), Curve: __webpack_require__(83), - Ellipse: __webpack_require__(357), - Line: __webpack_require__(358), - QuadraticBezier: __webpack_require__(360), - Spline: __webpack_require__(361) + Ellipse: __webpack_require__(358), + Line: __webpack_require__(359), + QuadraticBezier: __webpack_require__(361), + Spline: __webpack_require__(362) }; /***/ }), -/* 822 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146300,14 +146705,14 @@ module.exports = { // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezierCurve = __webpack_require__(356); -var EllipseCurve = __webpack_require__(357); +var CubicBezierCurve = __webpack_require__(357); +var EllipseCurve = __webpack_require__(358); var GameObjectFactory = __webpack_require__(5); -var LineCurve = __webpack_require__(358); -var MovePathTo = __webpack_require__(359); -var QuadraticBezierCurve = __webpack_require__(360); +var LineCurve = __webpack_require__(359); +var MovePathTo = __webpack_require__(360); +var QuadraticBezierCurve = __webpack_require__(361); var Rectangle = __webpack_require__(9); -var SplineCurve = __webpack_require__(361); +var SplineCurve = __webpack_require__(362); var Vector2 = __webpack_require__(3); var MATH_CONST = __webpack_require__(13); @@ -147177,7 +147582,7 @@ module.exports = Path; /***/ }), -/* 823 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147192,15 +147597,15 @@ module.exports = Path; module.exports = { - DataManager: __webpack_require__(118), - DataManagerPlugin: __webpack_require__(824), - Events: __webpack_require__(292) + DataManager: __webpack_require__(120), + DataManagerPlugin: __webpack_require__(828), + Events: __webpack_require__(293) }; /***/ }), -/* 824 */ +/* 828 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147210,7 +147615,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var DataManager = __webpack_require__(118); +var DataManager = __webpack_require__(120); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); @@ -147327,7 +147732,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 825 */ +/* 829 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147342,18 +147747,18 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(826), - BaseShader: __webpack_require__(362), - Bounds: __webpack_require__(829), - Canvas: __webpack_require__(833), - Color: __webpack_require__(363), - Masks: __webpack_require__(842) + Align: __webpack_require__(830), + BaseShader: __webpack_require__(363), + Bounds: __webpack_require__(833), + Canvas: __webpack_require__(837), + Color: __webpack_require__(364), + Masks: __webpack_require__(846) }; /***/ }), -/* 826 */ +/* 830 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147362,7 +147767,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(107); +var CONST = __webpack_require__(108); var Extend = __webpack_require__(19); /** @@ -147371,8 +147776,8 @@ var Extend = __webpack_require__(19); var Align = { - In: __webpack_require__(827), - To: __webpack_require__(828) + In: __webpack_require__(831), + To: __webpack_require__(832) }; @@ -147383,7 +147788,7 @@ module.exports = Align; /***/ }), -/* 827 */ +/* 831 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147398,22 +147803,22 @@ module.exports = Align; module.exports = { - BottomCenter: __webpack_require__(266), - BottomLeft: __webpack_require__(267), - BottomRight: __webpack_require__(268), - Center: __webpack_require__(269), - LeftCenter: __webpack_require__(271), - QuickSet: __webpack_require__(265), - RightCenter: __webpack_require__(272), - TopCenter: __webpack_require__(273), - TopLeft: __webpack_require__(274), - TopRight: __webpack_require__(275) + BottomCenter: __webpack_require__(267), + BottomLeft: __webpack_require__(268), + BottomRight: __webpack_require__(269), + Center: __webpack_require__(270), + LeftCenter: __webpack_require__(272), + QuickSet: __webpack_require__(266), + RightCenter: __webpack_require__(273), + TopCenter: __webpack_require__(274), + TopLeft: __webpack_require__(275), + TopRight: __webpack_require__(276) }; /***/ }), -/* 828 */ +/* 832 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147428,25 +147833,25 @@ module.exports = { module.exports = { - BottomCenter: __webpack_require__(253), - BottomLeft: __webpack_require__(254), - BottomRight: __webpack_require__(255), - LeftBottom: __webpack_require__(256), - LeftCenter: __webpack_require__(257), - LeftTop: __webpack_require__(258), - QuickSet: __webpack_require__(252), - RightBottom: __webpack_require__(259), - RightCenter: __webpack_require__(260), - RightTop: __webpack_require__(261), - TopCenter: __webpack_require__(262), - TopLeft: __webpack_require__(263), - TopRight: __webpack_require__(264) + BottomCenter: __webpack_require__(254), + BottomLeft: __webpack_require__(255), + BottomRight: __webpack_require__(256), + LeftBottom: __webpack_require__(257), + LeftCenter: __webpack_require__(258), + LeftTop: __webpack_require__(259), + QuickSet: __webpack_require__(253), + RightBottom: __webpack_require__(260), + RightCenter: __webpack_require__(261), + RightTop: __webpack_require__(262), + TopCenter: __webpack_require__(263), + TopLeft: __webpack_require__(264), + TopRight: __webpack_require__(265) }; /***/ }), -/* 829 */ +/* 833 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147461,14 +147866,14 @@ module.exports = { module.exports = { - CenterOn: __webpack_require__(270), + CenterOn: __webpack_require__(271), GetBottom: __webpack_require__(35), - GetBounds: __webpack_require__(830), + GetBounds: __webpack_require__(834), GetCenterX: __webpack_require__(77), GetCenterY: __webpack_require__(79), GetLeft: __webpack_require__(36), - GetOffsetX: __webpack_require__(831), - GetOffsetY: __webpack_require__(832), + GetOffsetX: __webpack_require__(835), + GetOffsetY: __webpack_require__(836), GetRight: __webpack_require__(37), GetTop: __webpack_require__(38), SetBottom: __webpack_require__(48), @@ -147482,7 +147887,7 @@ module.exports = { /***/ }), -/* 830 */ +/* 834 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147526,7 +147931,7 @@ module.exports = GetBounds; /***/ }), -/* 831 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -147556,7 +147961,7 @@ module.exports = GetOffsetX; /***/ }), -/* 832 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -147586,7 +147991,7 @@ module.exports = GetOffsetY; /***/ }), -/* 833 */ +/* 837 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147601,17 +148006,17 @@ module.exports = GetOffsetY; module.exports = { - CanvasInterpolation: __webpack_require__(349), + CanvasInterpolation: __webpack_require__(350), CanvasPool: __webpack_require__(26), - Smoothing: __webpack_require__(175), - TouchAction: __webpack_require__(834), - UserSelect: __webpack_require__(835) + Smoothing: __webpack_require__(177), + TouchAction: __webpack_require__(838), + UserSelect: __webpack_require__(839) }; /***/ }), -/* 834 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -147646,7 +148051,7 @@ module.exports = TouchAction; /***/ }), -/* 835 */ +/* 839 */ /***/ (function(module, exports) { /** @@ -147693,7 +148098,7 @@ module.exports = UserSelect; /***/ }), -/* 836 */ +/* 840 */ /***/ (function(module, exports) { /** @@ -147733,7 +148138,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 837 */ +/* 841 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147743,7 +148148,7 @@ module.exports = ColorToRGBA; */ var Color = __webpack_require__(32); -var HueToComponent = __webpack_require__(365); +var HueToComponent = __webpack_require__(366); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -147783,7 +148188,7 @@ module.exports = HSLToColor; /***/ }), -/* 838 */ +/* 842 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147792,7 +148197,7 @@ module.exports = HSLToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(174); +var HSVToRGB = __webpack_require__(176); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -147824,7 +148229,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 839 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147833,7 +148238,7 @@ module.exports = HSVColorWheel; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(123); +var Linear = __webpack_require__(124); /** * @namespace Phaser.Display.Color.Interpolate @@ -147932,7 +148337,7 @@ module.exports = { /***/ }), -/* 840 */ +/* 844 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147941,7 +148346,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(180); +var Between = __webpack_require__(182); var Color = __webpack_require__(32); /** @@ -147968,7 +148373,7 @@ module.exports = RandomRGB; /***/ }), -/* 841 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147977,7 +148382,7 @@ module.exports = RandomRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ComponentToHex = __webpack_require__(364); +var ComponentToHex = __webpack_require__(365); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -148012,7 +148417,7 @@ module.exports = RGBToString; /***/ }), -/* 842 */ +/* 846 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148027,14 +148432,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(286), - GeometryMask: __webpack_require__(287) + BitmapMask: __webpack_require__(287), + GeometryMask: __webpack_require__(288) }; /***/ }), -/* 843 */ +/* 847 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148049,14 +148454,14 @@ module.exports = { var Dom = { - AddToDOM: __webpack_require__(130), - DOMContentLoaded: __webpack_require__(366), - GetInnerHeight: __webpack_require__(367), - GetScreenOrientation: __webpack_require__(368), - GetTarget: __webpack_require__(373), - ParseXML: __webpack_require__(374), - RemoveFromDOM: __webpack_require__(186), - RequestAnimationFrame: __webpack_require__(352) + AddToDOM: __webpack_require__(131), + DOMContentLoaded: __webpack_require__(367), + GetInnerHeight: __webpack_require__(368), + GetScreenOrientation: __webpack_require__(369), + GetTarget: __webpack_require__(374), + ParseXML: __webpack_require__(375), + RemoveFromDOM: __webpack_require__(188), + RequestAnimationFrame: __webpack_require__(353) }; @@ -148064,7 +148469,7 @@ module.exports = Dom; /***/ }), -/* 844 */ +/* 848 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148077,11 +148482,11 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(845) }; +module.exports = { EventEmitter: __webpack_require__(849) }; /***/ }), -/* 845 */ +/* 849 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148265,7 +148670,7 @@ module.exports = EventEmitter; /***/ }), -/* 846 */ +/* 850 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148274,33 +148679,33 @@ module.exports = EventEmitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(130); -var AnimationManager = __webpack_require__(300); -var CacheManager = __webpack_require__(304); +var AddToDOM = __webpack_require__(131); +var AnimationManager = __webpack_require__(301); +var CacheManager = __webpack_require__(305); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Config = __webpack_require__(326); -var CreateDOMContainer = __webpack_require__(847); -var CreateRenderer = __webpack_require__(348); -var DataManager = __webpack_require__(118); -var DebugHeader = __webpack_require__(350); -var Device = __webpack_require__(327); -var DOMContentLoaded = __webpack_require__(366); +var Config = __webpack_require__(327); +var CreateDOMContainer = __webpack_require__(851); +var CreateRenderer = __webpack_require__(349); +var DataManager = __webpack_require__(120); +var DebugHeader = __webpack_require__(351); +var Device = __webpack_require__(328); +var DOMContentLoaded = __webpack_require__(367); var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(21); -var InputManager = __webpack_require__(375); +var InputManager = __webpack_require__(376); var PluginCache = __webpack_require__(23); -var PluginManager = __webpack_require__(380); -var ScaleManager = __webpack_require__(381); -var SceneManager = __webpack_require__(383); -var TextureEvents = __webpack_require__(129); -var TextureManager = __webpack_require__(388); -var TimeStep = __webpack_require__(351); -var VisibilityHandler = __webpack_require__(353); +var PluginManager = __webpack_require__(381); +var ScaleManager = __webpack_require__(382); +var SceneManager = __webpack_require__(384); +var TextureEvents = __webpack_require__(130); +var TextureManager = __webpack_require__(389); +var TimeStep = __webpack_require__(352); +var VisibilityHandler = __webpack_require__(354); if (true) { - var SoundManagerCreator = __webpack_require__(392); + var SoundManagerCreator = __webpack_require__(393); } if (false) @@ -148968,7 +149373,7 @@ module.exports = Game; /***/ }), -/* 847 */ +/* 851 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148977,7 +149382,7 @@ module.exports = Game; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(130); +var AddToDOM = __webpack_require__(131); var CreateDOMContainer = function (game) { @@ -149012,7 +149417,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 848 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -149033,7 +149438,7 @@ module.exports = 'boot'; /***/ }), -/* 849 */ +/* 853 */ /***/ (function(module, exports) { /** @@ -149054,7 +149459,7 @@ module.exports = 'destroy'; /***/ }), -/* 850 */ +/* 854 */ /***/ (function(module, exports) { /** @@ -149082,7 +149487,7 @@ module.exports = 'dragend'; /***/ }), -/* 851 */ +/* 855 */ /***/ (function(module, exports) { /** @@ -149113,7 +149518,7 @@ module.exports = 'dragenter'; /***/ }), -/* 852 */ +/* 856 */ /***/ (function(module, exports) { /** @@ -149145,7 +149550,7 @@ module.exports = 'drag'; /***/ }), -/* 853 */ +/* 857 */ /***/ (function(module, exports) { /** @@ -149176,7 +149581,7 @@ module.exports = 'dragleave'; /***/ }), -/* 854 */ +/* 858 */ /***/ (function(module, exports) { /** @@ -149210,7 +149615,7 @@ module.exports = 'dragover'; /***/ }), -/* 855 */ +/* 859 */ /***/ (function(module, exports) { /** @@ -149240,7 +149645,7 @@ module.exports = 'dragstart'; /***/ }), -/* 856 */ +/* 860 */ /***/ (function(module, exports) { /** @@ -149269,7 +149674,7 @@ module.exports = 'drop'; /***/ }), -/* 857 */ +/* 861 */ /***/ (function(module, exports) { /** @@ -149296,7 +149701,7 @@ module.exports = 'gameout'; /***/ }), -/* 858 */ +/* 862 */ /***/ (function(module, exports) { /** @@ -149323,7 +149728,7 @@ module.exports = 'gameover'; /***/ }), -/* 859 */ +/* 863 */ /***/ (function(module, exports) { /** @@ -149364,7 +149769,7 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 860 */ +/* 864 */ /***/ (function(module, exports) { /** @@ -149395,7 +149800,7 @@ module.exports = 'dragend'; /***/ }), -/* 861 */ +/* 865 */ /***/ (function(module, exports) { /** @@ -149425,7 +149830,7 @@ module.exports = 'dragenter'; /***/ }), -/* 862 */ +/* 866 */ /***/ (function(module, exports) { /** @@ -149456,7 +149861,7 @@ module.exports = 'drag'; /***/ }), -/* 863 */ +/* 867 */ /***/ (function(module, exports) { /** @@ -149486,7 +149891,7 @@ module.exports = 'dragleave'; /***/ }), -/* 864 */ +/* 868 */ /***/ (function(module, exports) { /** @@ -149519,7 +149924,7 @@ module.exports = 'dragover'; /***/ }), -/* 865 */ +/* 869 */ /***/ (function(module, exports) { /** @@ -149553,7 +149958,7 @@ module.exports = 'dragstart'; /***/ }), -/* 866 */ +/* 870 */ /***/ (function(module, exports) { /** @@ -149583,7 +149988,7 @@ module.exports = 'drop'; /***/ }), -/* 867 */ +/* 871 */ /***/ (function(module, exports) { /** @@ -149624,7 +150029,7 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 868 */ +/* 872 */ /***/ (function(module, exports) { /** @@ -149665,7 +150070,7 @@ module.exports = 'gameobjectout'; /***/ }), -/* 869 */ +/* 873 */ /***/ (function(module, exports) { /** @@ -149706,7 +150111,7 @@ module.exports = 'gameobjectover'; /***/ }), -/* 870 */ +/* 874 */ /***/ (function(module, exports) { /** @@ -149747,7 +150152,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 871 */ +/* 875 */ /***/ (function(module, exports) { /** @@ -149788,7 +150193,7 @@ module.exports = 'pointermove'; /***/ }), -/* 872 */ +/* 876 */ /***/ (function(module, exports) { /** @@ -149827,7 +150232,7 @@ module.exports = 'pointerout'; /***/ }), -/* 873 */ +/* 877 */ /***/ (function(module, exports) { /** @@ -149868,7 +150273,7 @@ module.exports = 'pointerover'; /***/ }), -/* 874 */ +/* 878 */ /***/ (function(module, exports) { /** @@ -149909,7 +150314,7 @@ module.exports = 'pointerup'; /***/ }), -/* 875 */ +/* 879 */ /***/ (function(module, exports) { /** @@ -149951,7 +150356,7 @@ module.exports = 'wheel'; /***/ }), -/* 876 */ +/* 880 */ /***/ (function(module, exports) { /** @@ -149992,7 +150397,7 @@ module.exports = 'gameobjectup'; /***/ }), -/* 877 */ +/* 881 */ /***/ (function(module, exports) { /** @@ -150036,7 +150441,7 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 878 */ +/* 882 */ /***/ (function(module, exports) { /** @@ -150057,7 +150462,7 @@ module.exports = 'boot'; /***/ }), -/* 879 */ +/* 883 */ /***/ (function(module, exports) { /** @@ -150082,7 +150487,7 @@ module.exports = 'process'; /***/ }), -/* 880 */ +/* 884 */ /***/ (function(module, exports) { /** @@ -150103,7 +150508,7 @@ module.exports = 'update'; /***/ }), -/* 881 */ +/* 885 */ /***/ (function(module, exports) { /** @@ -150138,7 +150543,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 882 */ +/* 886 */ /***/ (function(module, exports) { /** @@ -150172,7 +150577,7 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 883 */ +/* 887 */ /***/ (function(module, exports) { /** @@ -150207,7 +150612,7 @@ module.exports = 'pointermove'; /***/ }), -/* 884 */ +/* 888 */ /***/ (function(module, exports) { /** @@ -150242,7 +150647,7 @@ module.exports = 'pointerout'; /***/ }), -/* 885 */ +/* 889 */ /***/ (function(module, exports) { /** @@ -150277,7 +150682,7 @@ module.exports = 'pointerover'; /***/ }), -/* 886 */ +/* 890 */ /***/ (function(module, exports) { /** @@ -150312,7 +150717,7 @@ module.exports = 'pointerup'; /***/ }), -/* 887 */ +/* 891 */ /***/ (function(module, exports) { /** @@ -150346,7 +150751,7 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 888 */ +/* 892 */ /***/ (function(module, exports) { /** @@ -150384,7 +150789,7 @@ module.exports = 'wheel'; /***/ }), -/* 889 */ +/* 893 */ /***/ (function(module, exports) { /** @@ -150408,7 +150813,7 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 890 */ +/* 894 */ /***/ (function(module, exports) { /** @@ -150430,7 +150835,7 @@ module.exports = 'preupdate'; /***/ }), -/* 891 */ +/* 895 */ /***/ (function(module, exports) { /** @@ -150451,7 +150856,7 @@ module.exports = 'shutdown'; /***/ }), -/* 892 */ +/* 896 */ /***/ (function(module, exports) { /** @@ -150473,7 +150878,7 @@ module.exports = 'start'; /***/ }), -/* 893 */ +/* 897 */ /***/ (function(module, exports) { /** @@ -150498,7 +150903,7 @@ module.exports = 'update'; /***/ }), -/* 894 */ +/* 898 */ /***/ (function(module, exports) { /** @@ -150528,7 +150933,7 @@ module.exports = 'addfile'; /***/ }), -/* 895 */ +/* 899 */ /***/ (function(module, exports) { /** @@ -150556,7 +150961,7 @@ module.exports = 'complete'; /***/ }), -/* 896 */ +/* 900 */ /***/ (function(module, exports) { /** @@ -150585,7 +150990,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 897 */ +/* 901 */ /***/ (function(module, exports) { /** @@ -150639,7 +151044,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 898 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -150664,7 +151069,7 @@ module.exports = 'loaderror'; /***/ }), -/* 899 */ +/* 903 */ /***/ (function(module, exports) { /** @@ -150690,7 +151095,7 @@ module.exports = 'load'; /***/ }), -/* 900 */ +/* 904 */ /***/ (function(module, exports) { /** @@ -150717,7 +151122,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 901 */ +/* 905 */ /***/ (function(module, exports) { /** @@ -150746,7 +151151,7 @@ module.exports = 'postprocess'; /***/ }), -/* 902 */ +/* 906 */ /***/ (function(module, exports) { /** @@ -150771,7 +151176,7 @@ module.exports = 'progress'; /***/ }), -/* 903 */ +/* 907 */ /***/ (function(module, exports) { /** @@ -150798,7 +151203,7 @@ module.exports = 'start'; /***/ }), -/* 904 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150860,7 +151265,7 @@ module.exports = InjectionMap; /***/ }), -/* 905 */ +/* 909 */ /***/ (function(module, exports) { /** @@ -150941,7 +151346,7 @@ module.exports = AtlasXML; /***/ }), -/* 906 */ +/* 910 */ /***/ (function(module, exports) { /** @@ -150976,7 +151381,7 @@ module.exports = Canvas; /***/ }), -/* 907 */ +/* 911 */ /***/ (function(module, exports) { /** @@ -151011,7 +151416,7 @@ module.exports = Image; /***/ }), -/* 908 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151120,7 +151525,7 @@ module.exports = JSONArray; /***/ }), -/* 909 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151233,7 +151638,7 @@ module.exports = JSONHash; /***/ }), -/* 910 */ +/* 914 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151358,7 +151763,7 @@ module.exports = SpriteSheet; /***/ }), -/* 911 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151549,7 +151954,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 912 */ +/* 916 */ /***/ (function(module, exports) { /** @@ -151719,7 +152124,7 @@ TextureImporter: /***/ }), -/* 913 */ +/* 917 */ /***/ (function(module, exports) { /** @@ -151750,7 +152155,7 @@ module.exports = 'complete'; /***/ }), -/* 914 */ +/* 918 */ /***/ (function(module, exports) { /** @@ -151780,7 +152185,7 @@ module.exports = 'decoded'; /***/ }), -/* 915 */ +/* 919 */ /***/ (function(module, exports) { /** @@ -151812,7 +152217,7 @@ module.exports = 'decodedall'; /***/ }), -/* 916 */ +/* 920 */ /***/ (function(module, exports) { /** @@ -151844,7 +152249,7 @@ module.exports = 'destroy'; /***/ }), -/* 917 */ +/* 921 */ /***/ (function(module, exports) { /** @@ -151877,7 +152282,7 @@ module.exports = 'detune'; /***/ }), -/* 918 */ +/* 922 */ /***/ (function(module, exports) { /** @@ -151905,7 +152310,7 @@ module.exports = 'detune'; /***/ }), -/* 919 */ +/* 923 */ /***/ (function(module, exports) { /** @@ -151932,7 +152337,7 @@ module.exports = 'mute'; /***/ }), -/* 920 */ +/* 924 */ /***/ (function(module, exports) { /** @@ -151960,7 +152365,7 @@ module.exports = 'rate'; /***/ }), -/* 921 */ +/* 925 */ /***/ (function(module, exports) { /** @@ -151987,7 +152392,7 @@ module.exports = 'volume'; /***/ }), -/* 922 */ +/* 926 */ /***/ (function(module, exports) { /** @@ -152021,7 +152426,7 @@ module.exports = 'loop'; /***/ }), -/* 923 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -152055,7 +152460,7 @@ module.exports = 'looped'; /***/ }), -/* 924 */ +/* 928 */ /***/ (function(module, exports) { /** @@ -152088,7 +152493,7 @@ module.exports = 'mute'; /***/ }), -/* 925 */ +/* 929 */ /***/ (function(module, exports) { /** @@ -152115,7 +152520,7 @@ module.exports = 'pauseall'; /***/ }), -/* 926 */ +/* 930 */ /***/ (function(module, exports) { /** @@ -152147,7 +152552,7 @@ module.exports = 'pause'; /***/ }), -/* 927 */ +/* 931 */ /***/ (function(module, exports) { /** @@ -152178,7 +152583,7 @@ module.exports = 'play'; /***/ }), -/* 928 */ +/* 932 */ /***/ (function(module, exports) { /** @@ -152211,7 +152616,7 @@ module.exports = 'rate'; /***/ }), -/* 929 */ +/* 933 */ /***/ (function(module, exports) { /** @@ -152238,7 +152643,7 @@ module.exports = 'resumeall'; /***/ }), -/* 930 */ +/* 934 */ /***/ (function(module, exports) { /** @@ -152271,7 +152676,7 @@ module.exports = 'resume'; /***/ }), -/* 931 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -152304,7 +152709,7 @@ module.exports = 'seek'; /***/ }), -/* 932 */ +/* 936 */ /***/ (function(module, exports) { /** @@ -152331,7 +152736,7 @@ module.exports = 'stopall'; /***/ }), -/* 933 */ +/* 937 */ /***/ (function(module, exports) { /** @@ -152363,7 +152768,7 @@ module.exports = 'stop'; /***/ }), -/* 934 */ +/* 938 */ /***/ (function(module, exports) { /** @@ -152390,7 +152795,7 @@ module.exports = 'unlocked'; /***/ }), -/* 935 */ +/* 939 */ /***/ (function(module, exports) { /** @@ -152423,7 +152828,7 @@ module.exports = 'volume'; /***/ }), -/* 936 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152440,109 +152845,109 @@ var GameObjects = { Events: __webpack_require__(29), - DisplayList: __webpack_require__(937), + DisplayList: __webpack_require__(941), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(5), - UpdateList: __webpack_require__(962), + UpdateList: __webpack_require__(966), Components: __webpack_require__(11), BuildGameObject: __webpack_require__(27), - BuildGameObjectAnimation: __webpack_require__(405), + BuildGameObjectAnimation: __webpack_require__(406), GameObject: __webpack_require__(14), - BitmapText: __webpack_require__(139), - Blitter: __webpack_require__(197), - Bob: __webpack_require__(406), - Container: __webpack_require__(198), - DOMElement: __webpack_require__(408), - DynamicBitmapText: __webpack_require__(199), - Extern: __webpack_require__(410), - Graphics: __webpack_require__(200), - Group: __webpack_require__(99), - Image: __webpack_require__(112), - Particles: __webpack_require__(993), - PathFollower: __webpack_require__(423), - RenderTexture: __webpack_require__(204), - RetroFont: __webpack_require__(1001), - Rope: __webpack_require__(206), + BitmapText: __webpack_require__(140), + Blitter: __webpack_require__(199), + Bob: __webpack_require__(407), + Container: __webpack_require__(200), + DOMElement: __webpack_require__(409), + DynamicBitmapText: __webpack_require__(201), + Extern: __webpack_require__(411), + Graphics: __webpack_require__(202), + Group: __webpack_require__(100), + Image: __webpack_require__(114), + Particles: __webpack_require__(997), + PathFollower: __webpack_require__(424), + RenderTexture: __webpack_require__(206), + RetroFont: __webpack_require__(1005), + Rope: __webpack_require__(208), Sprite: __webpack_require__(76), - Text: __webpack_require__(207), - GetTextSize: __webpack_require__(424), - MeasureText: __webpack_require__(426), - TextStyle: __webpack_require__(425), + Text: __webpack_require__(209), + GetTextSize: __webpack_require__(425), + MeasureText: __webpack_require__(427), + TextStyle: __webpack_require__(426), - TileSprite: __webpack_require__(208), - Zone: __webpack_require__(115), - Video: __webpack_require__(209), + TileSprite: __webpack_require__(210), + Zone: __webpack_require__(117), + Video: __webpack_require__(211), // Shapes Shape: __webpack_require__(30), - Arc: __webpack_require__(427), - Curve: __webpack_require__(428), - Ellipse: __webpack_require__(429), - Grid: __webpack_require__(430), - IsoBox: __webpack_require__(431), - IsoTriangle: __webpack_require__(432), - Line: __webpack_require__(433), - Polygon: __webpack_require__(434), - Rectangle: __webpack_require__(439), - Star: __webpack_require__(440), - Triangle: __webpack_require__(441), + Arc: __webpack_require__(428), + Curve: __webpack_require__(429), + Ellipse: __webpack_require__(430), + Grid: __webpack_require__(431), + IsoBox: __webpack_require__(432), + IsoTriangle: __webpack_require__(433), + Line: __webpack_require__(434), + Polygon: __webpack_require__(435), + Rectangle: __webpack_require__(440), + Star: __webpack_require__(441), + Triangle: __webpack_require__(442), // Game Object Factories Factories: { - Blitter: __webpack_require__(1049), - Container: __webpack_require__(1050), - DOMElement: __webpack_require__(1051), - DynamicBitmapText: __webpack_require__(1052), - Extern: __webpack_require__(1053), - Graphics: __webpack_require__(1054), - Group: __webpack_require__(1055), - Image: __webpack_require__(1056), - Particles: __webpack_require__(1057), - PathFollower: __webpack_require__(1058), - RenderTexture: __webpack_require__(1059), - Rope: __webpack_require__(1060), - Sprite: __webpack_require__(1061), - StaticBitmapText: __webpack_require__(1062), - Text: __webpack_require__(1063), - TileSprite: __webpack_require__(1064), - Zone: __webpack_require__(1065), - Video: __webpack_require__(1066), + Blitter: __webpack_require__(1053), + Container: __webpack_require__(1054), + DOMElement: __webpack_require__(1055), + DynamicBitmapText: __webpack_require__(1056), + Extern: __webpack_require__(1057), + Graphics: __webpack_require__(1058), + Group: __webpack_require__(1059), + Image: __webpack_require__(1060), + Particles: __webpack_require__(1061), + PathFollower: __webpack_require__(1062), + RenderTexture: __webpack_require__(1063), + Rope: __webpack_require__(1064), + Sprite: __webpack_require__(1065), + StaticBitmapText: __webpack_require__(1066), + Text: __webpack_require__(1067), + TileSprite: __webpack_require__(1068), + Zone: __webpack_require__(1069), + Video: __webpack_require__(1070), // Shapes - Arc: __webpack_require__(1067), - Curve: __webpack_require__(1068), - Ellipse: __webpack_require__(1069), - Grid: __webpack_require__(1070), - IsoBox: __webpack_require__(1071), - IsoTriangle: __webpack_require__(1072), - Line: __webpack_require__(1073), - Polygon: __webpack_require__(1074), - Rectangle: __webpack_require__(1075), - Star: __webpack_require__(1076), - Triangle: __webpack_require__(1077) + Arc: __webpack_require__(1071), + Curve: __webpack_require__(1072), + Ellipse: __webpack_require__(1073), + Grid: __webpack_require__(1074), + IsoBox: __webpack_require__(1075), + IsoTriangle: __webpack_require__(1076), + Line: __webpack_require__(1077), + Polygon: __webpack_require__(1078), + Rectangle: __webpack_require__(1079), + Star: __webpack_require__(1080), + Triangle: __webpack_require__(1081) }, Creators: { - Blitter: __webpack_require__(1078), - Container: __webpack_require__(1079), - DynamicBitmapText: __webpack_require__(1080), - Graphics: __webpack_require__(1081), - Group: __webpack_require__(1082), - Image: __webpack_require__(1083), - Particles: __webpack_require__(1084), - RenderTexture: __webpack_require__(1085), - Rope: __webpack_require__(1086), - Sprite: __webpack_require__(1087), - StaticBitmapText: __webpack_require__(1088), - Text: __webpack_require__(1089), - TileSprite: __webpack_require__(1090), - Zone: __webpack_require__(1091), - Video: __webpack_require__(1092) + Blitter: __webpack_require__(1082), + Container: __webpack_require__(1083), + DynamicBitmapText: __webpack_require__(1084), + Graphics: __webpack_require__(1085), + Group: __webpack_require__(1086), + Image: __webpack_require__(1087), + Particles: __webpack_require__(1088), + RenderTexture: __webpack_require__(1089), + Rope: __webpack_require__(1090), + Sprite: __webpack_require__(1091), + StaticBitmapText: __webpack_require__(1092), + Text: __webpack_require__(1093), + TileSprite: __webpack_require__(1094), + Zone: __webpack_require__(1095), + Video: __webpack_require__(1096) } }; @@ -152550,28 +152955,28 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(141); - GameObjects.Quad = __webpack_require__(212); - GameObjects.Shader = __webpack_require__(213); + GameObjects.Mesh = __webpack_require__(142); + GameObjects.Quad = __webpack_require__(214); + GameObjects.Shader = __webpack_require__(215); - GameObjects.Factories.Mesh = __webpack_require__(1099); - GameObjects.Factories.Quad = __webpack_require__(1100); - GameObjects.Factories.Shader = __webpack_require__(1101); + GameObjects.Factories.Mesh = __webpack_require__(1103); + GameObjects.Factories.Quad = __webpack_require__(1104); + GameObjects.Factories.Shader = __webpack_require__(1105); - GameObjects.Creators.Mesh = __webpack_require__(1102); - GameObjects.Creators.Quad = __webpack_require__(1103); - GameObjects.Creators.Shader = __webpack_require__(1104); + GameObjects.Creators.Mesh = __webpack_require__(1106); + GameObjects.Creators.Quad = __webpack_require__(1107); + GameObjects.Creators.Shader = __webpack_require__(1108); - GameObjects.Light = __webpack_require__(445); - GameObjects.LightsManager = __webpack_require__(446); - GameObjects.LightsPlugin = __webpack_require__(1105); + GameObjects.Light = __webpack_require__(446); + GameObjects.LightsManager = __webpack_require__(447); + GameObjects.LightsPlugin = __webpack_require__(1109); } module.exports = GameObjects; /***/ }), -/* 937 */ +/* 941 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152581,11 +152986,11 @@ module.exports = GameObjects; */ var Class = __webpack_require__(0); -var List = __webpack_require__(136); +var List = __webpack_require__(137); var PluginCache = __webpack_require__(23); var GameObjectEvents = __webpack_require__(29); var SceneEvents = __webpack_require__(20); -var StableSort = __webpack_require__(138); +var StableSort = __webpack_require__(139); /** * @classdesc @@ -152829,7 +153234,7 @@ module.exports = DisplayList; /***/ }), -/* 938 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152844,21 +153249,21 @@ module.exports = DisplayList; module.exports = { - CheckMatrix: __webpack_require__(193), - MatrixToString: __webpack_require__(939), - ReverseColumns: __webpack_require__(940), - ReverseRows: __webpack_require__(941), - Rotate180: __webpack_require__(942), - RotateLeft: __webpack_require__(943), - RotateMatrix: __webpack_require__(137), - RotateRight: __webpack_require__(944), - TransposeMatrix: __webpack_require__(401) + CheckMatrix: __webpack_require__(195), + MatrixToString: __webpack_require__(943), + ReverseColumns: __webpack_require__(944), + ReverseRows: __webpack_require__(945), + Rotate180: __webpack_require__(946), + RotateLeft: __webpack_require__(947), + RotateMatrix: __webpack_require__(138), + RotateRight: __webpack_require__(948), + TransposeMatrix: __webpack_require__(402) }; /***/ }), -/* 939 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152867,8 +153272,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(171); -var CheckMatrix = __webpack_require__(193); +var Pad = __webpack_require__(173); +var CheckMatrix = __webpack_require__(195); /** * Generates a string (which you can pass to console.log) from the given Array Matrix. @@ -152939,7 +153344,7 @@ module.exports = MatrixToString; /***/ }), -/* 940 */ +/* 944 */ /***/ (function(module, exports) { /** @@ -152970,7 +153375,7 @@ module.exports = ReverseColumns; /***/ }), -/* 941 */ +/* 945 */ /***/ (function(module, exports) { /** @@ -153006,7 +153411,7 @@ module.exports = ReverseRows; /***/ }), -/* 942 */ +/* 946 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153015,7 +153420,7 @@ module.exports = ReverseRows; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(137); +var RotateMatrix = __webpack_require__(138); /** * Rotates the array matrix 180 degrees. @@ -153039,7 +153444,7 @@ module.exports = Rotate180; /***/ }), -/* 943 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153048,7 +153453,7 @@ module.exports = Rotate180; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(137); +var RotateMatrix = __webpack_require__(138); /** * Rotates the array matrix to the left (or 90 degrees) @@ -153072,7 +153477,7 @@ module.exports = RotateLeft; /***/ }), -/* 944 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153081,7 +153486,7 @@ module.exports = RotateLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(137); +var RotateMatrix = __webpack_require__(138); /** * Rotates the array matrix to the left (or -90 degrees) @@ -153105,7 +153510,7 @@ module.exports = RotateRight; /***/ }), -/* 945 */ +/* 949 */ /***/ (function(module, exports) { /** @@ -153222,7 +153627,7 @@ module.exports = Add; /***/ }), -/* 946 */ +/* 950 */ /***/ (function(module, exports) { /** @@ -153344,7 +153749,7 @@ module.exports = AddAt; /***/ }), -/* 947 */ +/* 951 */ /***/ (function(module, exports) { /** @@ -153382,7 +153787,7 @@ module.exports = BringToTop; /***/ }), -/* 948 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153434,7 +153839,7 @@ module.exports = CountAllMatching; /***/ }), -/* 949 */ +/* 953 */ /***/ (function(module, exports) { /** @@ -153480,7 +153885,7 @@ module.exports = Each; /***/ }), -/* 950 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153536,7 +153941,7 @@ module.exports = EachInRange; /***/ }), -/* 951 */ +/* 955 */ /***/ (function(module, exports) { /** @@ -153578,7 +153983,7 @@ module.exports = MoveDown; /***/ }), -/* 952 */ +/* 956 */ /***/ (function(module, exports) { /** @@ -153625,7 +154030,7 @@ module.exports = MoveTo; /***/ }), -/* 953 */ +/* 957 */ /***/ (function(module, exports) { /** @@ -153667,7 +154072,7 @@ module.exports = MoveUp; /***/ }), -/* 954 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153676,7 +154081,7 @@ module.exports = MoveUp; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RoundAwayFromZero = __webpack_require__(344); +var RoundAwayFromZero = __webpack_require__(345); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -153744,7 +154149,7 @@ module.exports = NumberArrayStep; /***/ }), -/* 955 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153795,7 +154200,7 @@ module.exports = RemoveAt; /***/ }), -/* 956 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153858,7 +154263,7 @@ module.exports = RemoveBetween; /***/ }), -/* 957 */ +/* 961 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153896,7 +154301,7 @@ module.exports = RemoveRandomElement; /***/ }), -/* 958 */ +/* 962 */ /***/ (function(module, exports) { /** @@ -153940,7 +154345,7 @@ module.exports = Replace; /***/ }), -/* 959 */ +/* 963 */ /***/ (function(module, exports) { /** @@ -153978,7 +154383,7 @@ module.exports = SendToBack; /***/ }), -/* 960 */ +/* 964 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154033,7 +154438,7 @@ module.exports = SetAll; /***/ }), -/* 961 */ +/* 965 */ /***/ (function(module, exports) { /** @@ -154081,7 +154486,7 @@ module.exports = Swap; /***/ }), -/* 962 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154091,7 +154496,7 @@ module.exports = Swap; */ var Class = __webpack_require__(0); -var ProcessQueue = __webpack_require__(195); +var ProcessQueue = __webpack_require__(197); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); @@ -154385,7 +154790,7 @@ module.exports = UpdateList; /***/ }), -/* 963 */ +/* 967 */ /***/ (function(module, exports) { /** @@ -154412,7 +154817,7 @@ module.exports = 'add'; /***/ }), -/* 964 */ +/* 968 */ /***/ (function(module, exports) { /** @@ -154439,7 +154844,7 @@ module.exports = 'remove'; /***/ }), -/* 965 */ +/* 969 */ /***/ (function(module, exports) { /** @@ -154961,7 +155366,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 966 */ +/* 970 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154970,7 +155375,7 @@ module.exports = GetBitmapTextSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(196); +var ParseXMLBitmapFont = __webpack_require__(198); /** * Parse an XML Bitmap Font from an Atlas. @@ -155015,7 +155420,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 967 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155029,12 +155434,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(968); + renderWebGL = __webpack_require__(972); } if (true) { - renderCanvas = __webpack_require__(970); + renderCanvas = __webpack_require__(974); } module.exports = { @@ -155046,7 +155451,7 @@ module.exports = { /***/ }), -/* 968 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155055,7 +155460,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BatchChar = __webpack_require__(969); +var BatchChar = __webpack_require__(973); var Utils = __webpack_require__(10); /** @@ -155083,9 +155488,7 @@ var BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; @@ -155206,7 +155609,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 969 */ +/* 973 */ /***/ (function(module, exports) { /** @@ -155222,7 +155625,7 @@ module.exports = BitmapTextWebGLRenderer; * @since 3.50.0 * @private * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The BitmapText Game Object. + * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The WebGLPipeline. Must have a `batchQuad` method. * @param {Phaser.GameObjects.BitmapText} src - The BitmapText Game Object. * @param {Phaser.Types.GameObjects.BitmapText.BitmapTextCharacter} char - The character to render. * @param {Phaser.Types.GameObjects.BitmapText.BitmapFontCharacterData} glyph - The character glyph. @@ -155265,7 +155668,7 @@ module.exports = BatchChar; /***/ }), -/* 970 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155447,7 +155850,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 971 */ +/* 975 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155461,12 +155864,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(972); + renderWebGL = __webpack_require__(976); } if (true) { - renderCanvas = __webpack_require__(973); + renderCanvas = __webpack_require__(977); } module.exports = { @@ -155478,7 +155881,7 @@ module.exports = { /***/ }), -/* 972 */ +/* 976 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155513,9 +155916,7 @@ var BlitterWebGLRenderer = function (renderer, src, interpolationPercentage, cam return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var cameraScrollX = camera.scrollX * src.scrollFactorX; var cameraScrollY = camera.scrollY * src.scrollFactorY; @@ -155608,7 +156009,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 973 */ +/* 977 */ /***/ (function(module, exports) { /** @@ -155738,7 +156139,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 974 */ +/* 978 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155753,12 +156154,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(975); + renderWebGL = __webpack_require__(979); } if (true) { - renderCanvas = __webpack_require__(976); + renderCanvas = __webpack_require__(980); } module.exports = { @@ -155770,7 +156171,7 @@ module.exports = { /***/ }), -/* 975 */ +/* 979 */ /***/ (function(module, exports) { /** @@ -155919,7 +156320,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 976 */ +/* 980 */ /***/ (function(module, exports) { /** @@ -156026,7 +156427,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 977 */ +/* 981 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156040,12 +156441,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(409); + renderWebGL = __webpack_require__(410); } if (true) { - renderCanvas = __webpack_require__(409); + renderCanvas = __webpack_require__(410); } module.exports = { @@ -156057,7 +156458,7 @@ module.exports = { /***/ }), -/* 978 */ +/* 982 */ /***/ (function(module, exports) { /** @@ -156099,7 +156500,7 @@ module.exports = [ /***/ }), -/* 979 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156113,12 +156514,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(980); + renderWebGL = __webpack_require__(984); } if (true) { - renderCanvas = __webpack_require__(981); + renderCanvas = __webpack_require__(985); } module.exports = { @@ -156130,7 +156531,7 @@ module.exports = { /***/ }), -/* 980 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156140,7 +156541,7 @@ module.exports = { */ var Utils = __webpack_require__(10); -var GetColorFromValue = __webpack_require__(117); +var GetColorFromValue = __webpack_require__(119); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -156167,9 +156568,7 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, src, interpolationPerce return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; @@ -156437,7 +156836,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 981 */ +/* 985 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156648,7 +157047,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 982 */ +/* 986 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156662,12 +157061,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(983); + renderWebGL = __webpack_require__(987); } if (true) { - renderCanvas = __webpack_require__(984); + renderCanvas = __webpack_require__(988); } module.exports = { @@ -156679,7 +157078,7 @@ module.exports = { /***/ }), -/* 983 */ +/* 987 */ /***/ (function(module, exports) { /** @@ -156705,9 +157104,7 @@ module.exports = { */ var ExternWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = renderer.currentPipeline; - - renderer.clearPipeline(); + renderer.pipelines.clear(); var camMatrix = renderer._tempMatrix1; var spriteMatrix = renderer._tempMatrix2; @@ -156741,20 +157138,20 @@ var ExternWebGLRenderer = function (renderer, src, interpolationPercentage, came // Callback src.render.call(src, renderer, camera, calcMatrix); - renderer.rebindPipeline(pipeline); + renderer.pipelines.rebind(); }; module.exports = ExternWebGLRenderer; /***/ }), -/* 984 */ +/* 988 */ /***/ (function(module, exports) { /***/ }), -/* 985 */ +/* 989 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156768,15 +157165,15 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(986); + renderWebGL = __webpack_require__(990); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(414); + renderCanvas = __webpack_require__(415); } if (true) { - renderCanvas = __webpack_require__(414); + renderCanvas = __webpack_require__(415); } module.exports = { @@ -156788,7 +157185,7 @@ module.exports = { /***/ }), -/* 986 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156797,7 +157194,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(201); +var Commands = __webpack_require__(203); var Utils = __webpack_require__(10); // TODO: Remove the use of this @@ -156840,9 +157237,7 @@ var GraphicsWebGLRenderer = function (renderer, src, interpolationPercentage, ca return; } - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = src._tempMatrix1; var graphicsMatrix = src._tempMatrix2; @@ -157154,7 +157549,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 987 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157168,12 +157563,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(988); + renderWebGL = __webpack_require__(992); } if (true) { - renderCanvas = __webpack_require__(989); + renderCanvas = __webpack_require__(993); } module.exports = { @@ -157185,7 +157580,7 @@ module.exports = { /***/ }), -/* 988 */ +/* 992 */ /***/ (function(module, exports) { /** @@ -157218,7 +157613,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 989 */ +/* 993 */ /***/ (function(module, exports) { /** @@ -157250,129 +157645,6 @@ var SpriteCanvasRenderer = function (renderer, src, interpolationPercentage, cam module.exports = SpriteCanvasRenderer; -/***/ }), -/* 990 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var renderWebGL = __webpack_require__(1); -var renderCanvas = __webpack_require__(1); - -if (true) -{ - renderWebGL = __webpack_require__(991); -} - -if (true) -{ - renderCanvas = __webpack_require__(992); -} - -module.exports = { - - renderWebGL: renderWebGL, - renderCanvas: renderCanvas - -}; - - -/***/ }), -/* 991 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Renders this Game Object with the WebGL Renderer to the given Camera. - * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. - * This method should not be called directly. It is a utility function of the Render module. - * - * @method Phaser.GameObjects.Image#renderWebGL - * @since 3.0.0 - * @private - * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - */ -var ImageWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) -{ - this.pipeline.batchSprite(src, camera, parentMatrix); -}; - -module.exports = ImageWebGLRenderer; - - -/***/ }), -/* 992 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Renders this Game Object with the Canvas Renderer to the given Camera. - * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. - * This method should not be called directly. It is a utility function of the Render module. - * - * @method Phaser.GameObjects.Image#renderCanvas - * @since 3.0.0 - * @private - * - * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested - */ -var ImageCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) -{ - renderer.batchSprite(src, src.frame, camera, parentMatrix); -}; - -module.exports = ImageCanvasRenderer; - - -/***/ }), -/* 993 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Particles - */ - -module.exports = { - - EmitterOp: __webpack_require__(415), - GravityWell: __webpack_require__(416), - Particle: __webpack_require__(417), - ParticleEmitter: __webpack_require__(418), - ParticleEmitterManager: __webpack_require__(203), - Zones: __webpack_require__(997) - -}; - - /***/ }), /* 994 */ /***/ (function(module, exports, __webpack_require__) { @@ -157406,6 +157678,129 @@ module.exports = { /***/ }), /* 995 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the WebGL Renderer to the given Camera. + * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. + * This method should not be called directly. It is a utility function of the Render module. + * + * @method Phaser.GameObjects.Image#renderWebGL + * @since 3.0.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + */ +var ImageWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +{ + this.pipeline.batchSprite(src, camera, parentMatrix); +}; + +module.exports = ImageWebGLRenderer; + + +/***/ }), +/* 996 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the Canvas Renderer to the given Camera. + * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. + * This method should not be called directly. It is a utility function of the Render module. + * + * @method Phaser.GameObjects.Image#renderCanvas + * @since 3.0.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested + */ +var ImageCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +{ + renderer.batchSprite(src, src.frame, camera, parentMatrix); +}; + +module.exports = ImageCanvasRenderer; + + +/***/ }), +/* 997 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Particles + */ + +module.exports = { + + EmitterOp: __webpack_require__(416), + GravityWell: __webpack_require__(417), + Particle: __webpack_require__(418), + ParticleEmitter: __webpack_require__(419), + ParticleEmitterManager: __webpack_require__(205), + Zones: __webpack_require__(1001) + +}; + + +/***/ }), +/* 998 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); + +if (true) +{ + renderWebGL = __webpack_require__(999); +} + +if (true) +{ + renderCanvas = __webpack_require__(1000); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157441,7 +157836,7 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpola return; } - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1.copyFrom(camera.matrix); var calcMatrix = pipeline._tempMatrix2; @@ -157450,8 +157845,6 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpola camMatrix.multiply(managerMatrix); - renderer.setPipeline(pipeline); - var roundPixels = camera.roundPixels; var texture = emitterManager.defaultFrame.glTexture; var getTint = Utils.getTintAppendFloatAlphaAndSwap; @@ -157566,7 +157959,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 996 */ +/* 1000 */ /***/ (function(module, exports) { /** @@ -157689,7 +158082,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 997 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157704,15 +158097,15 @@ module.exports = ParticleManagerCanvasRenderer; module.exports = { - DeathZone: __webpack_require__(419), - EdgeZone: __webpack_require__(420), - RandomZone: __webpack_require__(422) + DeathZone: __webpack_require__(420), + EdgeZone: __webpack_require__(421), + RandomZone: __webpack_require__(423) }; /***/ }), -/* 998 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157726,12 +158119,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(999); + renderWebGL = __webpack_require__(1003); } if (true) { - renderCanvas = __webpack_require__(1000); + renderCanvas = __webpack_require__(1004); } module.exports = { @@ -157743,7 +158136,7 @@ module.exports = { /***/ }), -/* 999 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157775,9 +158168,7 @@ var RenderTextureWebGLRenderer = function (renderer, src, interpolationPercentag var width = frame.width; var height = frame.height; var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = src.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(src.pipeline, src); var textureUnit = pipeline.setTexture2D(frame.glTexture, src); @@ -157810,7 +158201,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 1000 */ +/* 1004 */ /***/ (function(module, exports) { /** @@ -157843,7 +158234,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 1001 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157852,7 +158243,7 @@ module.exports = RenderTextureCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(1002); +var RETRO_FONT_CONST = __webpack_require__(1006); var Extend = __webpack_require__(19); /** @@ -157860,7 +158251,7 @@ var Extend = __webpack_require__(19); * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(1003) }; +var RetroFont = { Parse: __webpack_require__(1007) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -157869,7 +158260,7 @@ module.exports = RetroFont; /***/ }), -/* 1002 */ +/* 1006 */ /***/ (function(module, exports) { /** @@ -157985,7 +158376,7 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 1003 */ +/* 1007 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158101,7 +158492,7 @@ module.exports = ParseRetroFont; /***/ }), -/* 1004 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158115,12 +158506,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1005); + renderWebGL = __webpack_require__(1009); } if (true) { - renderCanvas = __webpack_require__(1006); + renderCanvas = __webpack_require__(1010); } module.exports = { @@ -158132,7 +158523,7 @@ module.exports = { /***/ }), -/* 1005 */ +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158160,9 +158551,7 @@ var Utils = __webpack_require__(10); */ var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = src.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(src.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; @@ -158269,7 +158658,7 @@ module.exports = RopeWebGLRenderer; /***/ }), -/* 1006 */ +/* 1010 */ /***/ (function(module, exports) { /** @@ -158298,7 +158687,7 @@ module.exports = RopeCanvasRenderer; /***/ }), -/* 1007 */ +/* 1011 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158312,12 +158701,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1008); + renderWebGL = __webpack_require__(1012); } if (true) { - renderCanvas = __webpack_require__(1009); + renderCanvas = __webpack_require__(1013); } module.exports = { @@ -158329,7 +158718,7 @@ module.exports = { /***/ }), -/* 1008 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158366,9 +158755,7 @@ var TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera var width = frame.width; var height = frame.height; var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var textureUnit = pipeline.setTexture2D(frame.glTexture, src); @@ -158401,7 +158788,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 1009 */ +/* 1013 */ /***/ (function(module, exports) { /** @@ -158439,7 +158826,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 1010 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158453,12 +158840,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1011); + renderWebGL = __webpack_require__(1015); } if (true) { - renderCanvas = __webpack_require__(1012); + renderCanvas = __webpack_require__(1016); } module.exports = { @@ -158470,7 +158857,7 @@ module.exports = { /***/ }), -/* 1011 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158502,15 +158889,14 @@ var TileSpriteWebGLRenderer = function (renderer, src, interpolationPercentage, var width = src.width; var height = src.height; - var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = this.pipeline; - if (width === 0 || height === 0) { return; } - renderer.setPipeline(pipeline, src); + var getTint = Utils.getTintAppendFloatAlpha; + + var pipeline = renderer.pipelines.set(this.pipeline, src); var textureUnit = pipeline.setTexture2D(src.fillPattern, src); @@ -158544,7 +158930,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 1012 */ +/* 1016 */ /***/ (function(module, exports) { /** @@ -158579,7 +158965,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 1013 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158593,12 +158979,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1014); + renderWebGL = __webpack_require__(1018); } if (true) { - renderCanvas = __webpack_require__(1015); + renderCanvas = __webpack_require__(1019); } module.exports = { @@ -158610,7 +158996,7 @@ module.exports = { /***/ }), -/* 1014 */ +/* 1018 */ /***/ (function(module, exports) { /** @@ -158646,7 +159032,7 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 1015 */ +/* 1019 */ /***/ (function(module, exports) { /** @@ -158682,7 +159068,7 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 1016 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158696,12 +159082,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1017); + renderWebGL = __webpack_require__(1021); } if (true) { - renderCanvas = __webpack_require__(1018); + renderCanvas = __webpack_require__(1022); } module.exports = { @@ -158713,7 +159099,7 @@ module.exports = { /***/ }), -/* 1017 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158722,7 +159108,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(101); var StrokePathWebGL = __webpack_require__(72); /** @@ -158742,14 +159128,12 @@ var StrokePathWebGL = __webpack_require__(72); */ var ArcWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -158791,7 +159175,7 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 1018 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158867,7 +159251,7 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 1019 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158881,12 +159265,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1020); + renderWebGL = __webpack_require__(1024); } if (true) { - renderCanvas = __webpack_require__(1021); + renderCanvas = __webpack_require__(1025); } module.exports = { @@ -158898,7 +159282,7 @@ module.exports = { /***/ }), -/* 1020 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158907,7 +159291,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(101); var StrokePathWebGL = __webpack_require__(72); /** @@ -158927,14 +159311,12 @@ var StrokePathWebGL = __webpack_require__(72); */ var CurveWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -158976,7 +159358,7 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 1021 */ +/* 1025 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159064,7 +159446,7 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 1022 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159078,12 +159460,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1023); + renderWebGL = __webpack_require__(1027); } if (true) { - renderCanvas = __webpack_require__(1024); + renderCanvas = __webpack_require__(1028); } module.exports = { @@ -159095,7 +159477,7 @@ module.exports = { /***/ }), -/* 1023 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159104,7 +159486,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(101); var StrokePathWebGL = __webpack_require__(72); /** @@ -159124,14 +159506,12 @@ var StrokePathWebGL = __webpack_require__(72); */ var EllipseWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -159173,7 +159553,7 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 1024 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159258,7 +159638,7 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 1025 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159272,12 +159652,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1026); + renderWebGL = __webpack_require__(1030); } if (true) { - renderCanvas = __webpack_require__(1027); + renderCanvas = __webpack_require__(1031); } module.exports = { @@ -159289,7 +159669,7 @@ module.exports = { /***/ }), -/* 1026 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159317,14 +159697,12 @@ var Utils = __webpack_require__(10); */ var GridWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -159509,7 +159887,7 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 1027 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159698,7 +160076,7 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 1028 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159712,12 +160090,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1029); + renderWebGL = __webpack_require__(1033); } if (true) { - renderCanvas = __webpack_require__(1030); + renderCanvas = __webpack_require__(1034); } module.exports = { @@ -159729,7 +160107,7 @@ module.exports = { /***/ }), -/* 1029 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159757,14 +160135,12 @@ var Utils = __webpack_require__(10); */ var IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -159883,7 +160259,7 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 1030 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159984,7 +160360,7 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 1031 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159998,12 +160374,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1032); + renderWebGL = __webpack_require__(1036); } if (true) { - renderCanvas = __webpack_require__(1033); + renderCanvas = __webpack_require__(1037); } module.exports = { @@ -160015,7 +160391,7 @@ module.exports = { /***/ }), -/* 1032 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160043,14 +160419,12 @@ var Utils = __webpack_require__(10); */ var IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -160190,7 +160564,7 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 1033 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160304,7 +160678,7 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 1034 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160318,12 +160692,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1035); + renderWebGL = __webpack_require__(1039); } if (true) { - renderCanvas = __webpack_require__(1036); + renderCanvas = __webpack_require__(1040); } module.exports = { @@ -160335,7 +160709,7 @@ module.exports = { /***/ }), -/* 1035 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160363,13 +160737,11 @@ var Utils = __webpack_require__(10); */ var LineWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -160428,7 +160800,7 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 1036 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160485,7 +160857,7 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1037 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160499,12 +160871,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1038); + renderWebGL = __webpack_require__(1042); } if (true) { - renderCanvas = __webpack_require__(1039); + renderCanvas = __webpack_require__(1043); } module.exports = { @@ -160516,7 +160888,7 @@ module.exports = { /***/ }), -/* 1038 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160525,7 +160897,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(101); var StrokePathWebGL = __webpack_require__(72); /** @@ -160545,14 +160917,12 @@ var StrokePathWebGL = __webpack_require__(72); */ var PolygonWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -160594,7 +160964,7 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1039 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160679,7 +161049,7 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1040 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160693,12 +161063,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1041); + renderWebGL = __webpack_require__(1045); } if (true) { - renderCanvas = __webpack_require__(1042); + renderCanvas = __webpack_require__(1046); } module.exports = { @@ -160710,7 +161080,7 @@ module.exports = { /***/ }), -/* 1041 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160739,14 +161109,12 @@ var Utils = __webpack_require__(10); */ var RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -160776,7 +161144,7 @@ var RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, c { var fillTint = pipeline.fillTint; var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha); - + fillTint.TL = fillTintColor; fillTint.TR = fillTintColor; fillTint.BL = fillTintColor; @@ -160802,7 +161170,7 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1042 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160876,7 +161244,7 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1043 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160890,12 +161258,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1044); + renderWebGL = __webpack_require__(1048); } if (true) { - renderCanvas = __webpack_require__(1045); + renderCanvas = __webpack_require__(1049); } module.exports = { @@ -160907,7 +161275,7 @@ module.exports = { /***/ }), -/* 1044 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160916,7 +161284,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(101); var StrokePathWebGL = __webpack_require__(72); /** @@ -160936,14 +161304,12 @@ var StrokePathWebGL = __webpack_require__(72); */ var StarWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -160985,7 +161351,7 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1045 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161070,7 +161436,7 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1046 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161084,12 +161450,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1047); + renderWebGL = __webpack_require__(1051); } if (true) { - renderCanvas = __webpack_require__(1048); + renderCanvas = __webpack_require__(1052); } module.exports = { @@ -161101,7 +161467,7 @@ module.exports = { /***/ }), -/* 1047 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161130,14 +161496,12 @@ var Utils = __webpack_require__(10); */ var TriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; + var pipeline = renderer.pipelines.set(this.pipeline); var camMatrix = pipeline._tempMatrix1; var shapeMatrix = pipeline._tempMatrix2; var calcMatrix = pipeline._tempMatrix3; - renderer.setPipeline(pipeline); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); camMatrix.copyFrom(camera.matrix); @@ -161204,7 +161568,7 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1048 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161279,7 +161643,7 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1049 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161288,7 +161652,7 @@ module.exports = TriangleCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(197); +var Blitter = __webpack_require__(199); var GameObjectFactory = __webpack_require__(5); /** @@ -161321,7 +161685,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1050 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161331,7 +161695,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Container = __webpack_require__(198); +var Container = __webpack_require__(200); var GameObjectFactory = __webpack_require__(5); /** @@ -161355,7 +161719,7 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1051 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161364,7 +161728,7 @@ GameObjectFactory.register('container', function (x, y, children) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DOMElement = __webpack_require__(408); +var DOMElement = __webpack_require__(409); var GameObjectFactory = __webpack_require__(5); /** @@ -161444,7 +161808,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /***/ }), -/* 1052 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161453,7 +161817,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DynamicBitmapText = __webpack_require__(199); +var DynamicBitmapText = __webpack_require__(201); var GameObjectFactory = __webpack_require__(5); /** @@ -161513,7 +161877,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1053 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161522,7 +161886,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extern = __webpack_require__(410); +var Extern = __webpack_require__(411); var GameObjectFactory = __webpack_require__(5); /** @@ -161554,7 +161918,7 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1054 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161563,7 +161927,7 @@ GameObjectFactory.register('extern', function () * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Graphics = __webpack_require__(200); +var Graphics = __webpack_require__(202); var GameObjectFactory = __webpack_require__(5); /** @@ -161593,7 +161957,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1055 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161602,7 +161966,7 @@ GameObjectFactory.register('graphics', function (config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Group = __webpack_require__(99); +var Group = __webpack_require__(100); var GameObjectFactory = __webpack_require__(5); /** @@ -161625,7 +161989,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1056 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161634,7 +161998,7 @@ GameObjectFactory.register('group', function (children, config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Image = __webpack_require__(112); +var Image = __webpack_require__(114); var GameObjectFactory = __webpack_require__(5); /** @@ -161667,7 +162031,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1057 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161677,7 +162041,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var ParticleEmitterManager = __webpack_require__(203); +var ParticleEmitterManager = __webpack_require__(205); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -161708,7 +162072,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1058 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161718,7 +162082,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) */ var GameObjectFactory = __webpack_require__(5); -var PathFollower = __webpack_require__(423); +var PathFollower = __webpack_require__(424); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -161756,7 +162120,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1059 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161766,7 +162130,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var RenderTexture = __webpack_require__(204); +var RenderTexture = __webpack_require__(206); /** * Creates a new Render Texture Game Object and adds it to the Scene. @@ -161796,7 +162160,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, /***/ }), -/* 1060 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161805,7 +162169,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Rope = __webpack_require__(206); +var Rope = __webpack_require__(208); var GameObjectFactory = __webpack_require__(5); /** @@ -161846,7 +162210,7 @@ if (true) /***/ }), -/* 1061 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161892,7 +162256,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 1062 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161901,7 +162265,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(139); +var BitmapText = __webpack_require__(140); var GameObjectFactory = __webpack_require__(5); /** @@ -161956,7 +162320,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 1063 */ +/* 1067 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161965,7 +162329,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Text = __webpack_require__(207); +var Text = __webpack_require__(209); var GameObjectFactory = __webpack_require__(5); /** @@ -162021,7 +162385,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 1064 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162030,7 +162394,7 @@ GameObjectFactory.register('text', function (x, y, text, style) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileSprite = __webpack_require__(208); +var TileSprite = __webpack_require__(210); var GameObjectFactory = __webpack_require__(5); /** @@ -162065,7 +162429,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 1065 */ +/* 1069 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162074,7 +162438,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Zone = __webpack_require__(115); +var Zone = __webpack_require__(117); var GameObjectFactory = __webpack_require__(5); /** @@ -162107,7 +162471,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 1066 */ +/* 1070 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162116,7 +162480,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Video = __webpack_require__(209); +var Video = __webpack_require__(211); var GameObjectFactory = __webpack_require__(5); /** @@ -162153,7 +162517,7 @@ GameObjectFactory.register('video', function (x, y, key) /***/ }), -/* 1067 */ +/* 1071 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162162,7 +162526,7 @@ GameObjectFactory.register('video', function (x, y, key) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arc = __webpack_require__(427); +var Arc = __webpack_require__(428); var GameObjectFactory = __webpack_require__(5); /** @@ -162226,7 +162590,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /***/ }), -/* 1068 */ +/* 1072 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162236,7 +162600,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph */ var GameObjectFactory = __webpack_require__(5); -var Curve = __webpack_require__(428); +var Curve = __webpack_require__(429); /** * Creates a new Curve Shape Game Object and adds it to the Scene. @@ -162276,7 +162640,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /***/ }), -/* 1069 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162285,7 +162649,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(429); +var Ellipse = __webpack_require__(430); var GameObjectFactory = __webpack_require__(5); /** @@ -162328,7 +162692,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /***/ }), -/* 1070 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162338,7 +162702,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, */ var GameObjectFactory = __webpack_require__(5); -var Grid = __webpack_require__(430); +var Grid = __webpack_require__(431); /** * Creates a new Grid Shape Game Object and adds it to the Scene. @@ -162383,7 +162747,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /***/ }), -/* 1071 */ +/* 1075 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162393,7 +162757,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel */ var GameObjectFactory = __webpack_require__(5); -var IsoBox = __webpack_require__(431); +var IsoBox = __webpack_require__(432); /** * Creates a new IsoBox Shape Game Object and adds it to the Scene. @@ -162434,7 +162798,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /***/ }), -/* 1072 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162444,7 +162808,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill */ var GameObjectFactory = __webpack_require__(5); -var IsoTriangle = __webpack_require__(432); +var IsoTriangle = __webpack_require__(433); /** * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. @@ -162487,7 +162851,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /***/ }), -/* 1073 */ +/* 1077 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162497,7 +162861,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed */ var GameObjectFactory = __webpack_require__(5); -var Line = __webpack_require__(433); +var Line = __webpack_require__(434); /** * Creates a new Line Shape Game Object and adds it to the Scene. @@ -162538,7 +162902,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /***/ }), -/* 1074 */ +/* 1078 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162548,7 +162912,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, */ var GameObjectFactory = __webpack_require__(5); -var Polygon = __webpack_require__(434); +var Polygon = __webpack_require__(435); /** * Creates a new Polygon Shape Game Object and adds it to the Scene. @@ -162591,7 +162955,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /***/ }), -/* 1075 */ +/* 1079 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162601,7 +162965,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp */ var GameObjectFactory = __webpack_require__(5); -var Rectangle = __webpack_require__(439); +var Rectangle = __webpack_require__(440); /** * Creates a new Rectangle Shape Game Object and adds it to the Scene. @@ -162636,7 +163000,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /***/ }), -/* 1076 */ +/* 1080 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162645,7 +163009,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Star = __webpack_require__(440); +var Star = __webpack_require__(441); var GameObjectFactory = __webpack_require__(5); /** @@ -162688,7 +163052,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /***/ }), -/* 1077 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162698,7 +163062,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad */ var GameObjectFactory = __webpack_require__(5); -var Triangle = __webpack_require__(441); +var Triangle = __webpack_require__(442); /** * Creates a new Triangle Shape Game Object and adds it to the Scene. @@ -162739,7 +163103,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /***/ }), -/* 1078 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162748,7 +163112,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(197); +var Blitter = __webpack_require__(199); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -162789,7 +163153,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 1079 */ +/* 1083 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162800,7 +163164,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) */ var BuildGameObject = __webpack_require__(27); -var Container = __webpack_require__(198); +var Container = __webpack_require__(200); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -162839,7 +163203,7 @@ GameObjectCreator.register('container', function (config, addToScene) /***/ }), -/* 1080 */ +/* 1084 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162848,7 +163212,7 @@ GameObjectCreator.register('container', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(199); +var BitmapText = __webpack_require__(201); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -162890,7 +163254,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 1081 */ +/* 1085 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162900,7 +163264,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var Graphics = __webpack_require__(200); +var Graphics = __webpack_require__(202); /** * Creates a new Graphics Game Object and returns it. @@ -162938,7 +163302,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) /***/ }), -/* 1082 */ +/* 1086 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162948,7 +163312,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var Group = __webpack_require__(99); +var Group = __webpack_require__(100); /** * Creates a new Group Game Object and returns it. @@ -162971,7 +163335,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 1083 */ +/* 1087 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162983,7 +163347,7 @@ GameObjectCreator.register('group', function (config) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Image = __webpack_require__(112); +var Image = __webpack_require__(114); /** * Creates a new Image Game Object and returns it. @@ -163021,7 +163385,7 @@ GameObjectCreator.register('image', function (config, addToScene) /***/ }), -/* 1084 */ +/* 1088 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163033,7 +163397,7 @@ GameObjectCreator.register('image', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetFastValue = __webpack_require__(2); -var ParticleEmitterManager = __webpack_require__(203); +var ParticleEmitterManager = __webpack_require__(205); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -163076,7 +163440,7 @@ GameObjectCreator.register('particles', function (config, addToScene) /***/ }), -/* 1085 */ +/* 1089 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163088,7 +163452,7 @@ GameObjectCreator.register('particles', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var RenderTexture = __webpack_require__(204); +var RenderTexture = __webpack_require__(206); /** * Creates a new Render Texture Game Object and returns it. @@ -163128,7 +163492,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 1086 */ +/* 1090 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163141,7 +163505,7 @@ var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Rope = __webpack_require__(206); +var Rope = __webpack_require__(208); /** * Creates a new Rope Game Object and returns it. @@ -163183,7 +163547,7 @@ GameObjectCreator.register('rope', function (config, addToScene) /***/ }), -/* 1087 */ +/* 1091 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163193,7 +163557,7 @@ GameObjectCreator.register('rope', function (config, addToScene) */ var BuildGameObject = __webpack_require__(27); -var BuildGameObjectAnimation = __webpack_require__(405); +var BuildGameObjectAnimation = __webpack_require__(406); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var Sprite = __webpack_require__(76); @@ -163236,7 +163600,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1088 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163245,7 +163609,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(139); +var BitmapText = __webpack_require__(140); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -163289,7 +163653,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1089 */ +/* 1093 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163301,7 +163665,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Text = __webpack_require__(207); +var Text = __webpack_require__(209); /** * Creates a new Text Game Object and returns it. @@ -163376,7 +163740,7 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1090 */ +/* 1094 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163388,7 +163752,7 @@ GameObjectCreator.register('text', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var TileSprite = __webpack_require__(208); +var TileSprite = __webpack_require__(210); /** * Creates a new TileSprite Game Object and returns it. @@ -163428,7 +163792,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1091 */ +/* 1095 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163439,7 +163803,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Zone = __webpack_require__(115); +var Zone = __webpack_require__(117); /** * Creates a new Zone Game Object and returns it. @@ -163467,7 +163831,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1092 */ +/* 1096 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163479,7 +163843,7 @@ GameObjectCreator.register('zone', function (config) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Video = __webpack_require__(209); +var Video = __webpack_require__(211); /** * Creates a new Video Game Object and returns it. @@ -163516,7 +163880,7 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1093 */ +/* 1097 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163530,12 +163894,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1094); + renderWebGL = __webpack_require__(1098); } if (true) { - renderCanvas = __webpack_require__(1095); + renderCanvas = __webpack_require__(1099); } module.exports = { @@ -163547,7 +163911,7 @@ module.exports = { /***/ }), -/* 1094 */ +/* 1098 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163575,9 +163939,7 @@ var Utils = __webpack_require__(10); */ var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) { - var pipeline = this.pipeline; - - renderer.setPipeline(pipeline, src); + var pipeline = renderer.pipelines.set(this.pipeline, src); var camMatrix = pipeline._tempMatrix1; var spriteMatrix = pipeline._tempMatrix2; @@ -163663,7 +164025,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1095 */ +/* 1099 */ /***/ (function(module, exports) { /** @@ -163692,7 +164054,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1096 */ +/* 1100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163706,12 +164068,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1097); + renderWebGL = __webpack_require__(1101); } if (true) { - renderCanvas = __webpack_require__(1098); + renderCanvas = __webpack_require__(1102); } module.exports = { @@ -163723,7 +164085,7 @@ module.exports = { /***/ }), -/* 1097 */ +/* 1101 */ /***/ (function(module, exports) { /** @@ -163754,9 +164116,7 @@ var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, came return; } - var pipeline = renderer.currentPipeline; - - renderer.clearPipeline(); + renderer.pipelines.clear(); if (src.renderToTexture) { @@ -163768,16 +164128,16 @@ var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, came var camMatrix = src._tempMatrix1; var shapeMatrix = src._tempMatrix2; var calcMatrix = src._tempMatrix3; - + shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - + camMatrix.copyFrom(camera.matrix); - + if (parentMatrix) { // Multiply the camera by the parent matrix camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - + // Undo the camera scroll shapeMatrix.e = src.x; shapeMatrix.f = src.y; @@ -163787,27 +164147,27 @@ var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, came shapeMatrix.e -= camera.scrollX * src.scrollFactorX; shapeMatrix.f -= camera.scrollY * src.scrollFactorY; } - + camMatrix.multiply(shapeMatrix, calcMatrix); - + // Renderer size changed? if (renderer.width !== src._rendererWidth || renderer.height !== src._rendererHeight) { src.projOrtho(0, renderer.width, renderer.height, 0); } - + src.load(calcMatrix.matrix); src.flush(); } - renderer.rebindPipeline(pipeline); + renderer.pipelines.rebind(); }; module.exports = ShaderWebGLRenderer; /***/ }), -/* 1098 */ +/* 1102 */ /***/ (function(module, exports) { /** @@ -163836,7 +164196,7 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1099 */ +/* 1103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163845,7 +164205,7 @@ module.exports = ShaderCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(141); +var Mesh = __webpack_require__(142); var GameObjectFactory = __webpack_require__(5); /** @@ -163886,7 +164246,7 @@ if (true) /***/ }), -/* 1100 */ +/* 1104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163895,7 +164255,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Quad = __webpack_require__(212); +var Quad = __webpack_require__(214); var GameObjectFactory = __webpack_require__(5); /** @@ -163932,7 +164292,7 @@ if (true) /***/ }), -/* 1101 */ +/* 1105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163941,7 +164301,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Shader = __webpack_require__(213); +var Shader = __webpack_require__(215); var GameObjectFactory = __webpack_require__(5); /** @@ -163973,7 +164333,7 @@ if (true) /***/ }), -/* 1102 */ +/* 1106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163986,7 +164346,7 @@ var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Mesh = __webpack_require__(141); +var Mesh = __webpack_require__(142); /** * Creates a new Mesh Game Object and returns it. @@ -164028,7 +164388,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1103 */ +/* 1107 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164040,7 +164400,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Quad = __webpack_require__(212); +var Quad = __webpack_require__(214); /** * Creates a new Quad Game Object and returns it. @@ -164078,7 +164438,7 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1104 */ +/* 1108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164090,7 +164450,7 @@ GameObjectCreator.register('quad', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Shader = __webpack_require__(213); +var Shader = __webpack_require__(215); /** * Creates a new Shader Game Object and returns it. @@ -164131,7 +164491,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1105 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164141,7 +164501,7 @@ GameObjectCreator.register('shader', function (config, addToScene) */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(446); +var LightsManager = __webpack_require__(447); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); @@ -164247,7 +164607,7 @@ module.exports = LightsPlugin; /***/ }), -/* 1106 */ +/* 1110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164258,27 +164618,27 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(68); -Circle.Area = __webpack_require__(1107); -Circle.Circumference = __webpack_require__(278); -Circle.CircumferencePoint = __webpack_require__(157); -Circle.Clone = __webpack_require__(1108); +Circle.Area = __webpack_require__(1111); +Circle.Circumference = __webpack_require__(279); +Circle.CircumferencePoint = __webpack_require__(159); +Circle.Clone = __webpack_require__(1112); Circle.Contains = __webpack_require__(57); -Circle.ContainsPoint = __webpack_require__(1109); -Circle.ContainsRect = __webpack_require__(1110); -Circle.CopyFrom = __webpack_require__(1111); -Circle.Equals = __webpack_require__(1112); -Circle.GetBounds = __webpack_require__(1113); -Circle.GetPoint = __webpack_require__(276); -Circle.GetPoints = __webpack_require__(277); -Circle.Offset = __webpack_require__(1114); -Circle.OffsetPoint = __webpack_require__(1115); -Circle.Random = __webpack_require__(158); +Circle.ContainsPoint = __webpack_require__(1113); +Circle.ContainsRect = __webpack_require__(1114); +Circle.CopyFrom = __webpack_require__(1115); +Circle.Equals = __webpack_require__(1116); +Circle.GetBounds = __webpack_require__(1117); +Circle.GetPoint = __webpack_require__(277); +Circle.GetPoints = __webpack_require__(278); +Circle.Offset = __webpack_require__(1118); +Circle.OffsetPoint = __webpack_require__(1119); +Circle.Random = __webpack_require__(160); module.exports = Circle; /***/ }), -/* 1107 */ +/* 1111 */ /***/ (function(module, exports) { /** @@ -164306,7 +164666,7 @@ module.exports = Area; /***/ }), -/* 1108 */ +/* 1112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164336,7 +164696,7 @@ module.exports = Clone; /***/ }), -/* 1109 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164367,7 +164727,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1110 */ +/* 1114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164403,7 +164763,7 @@ module.exports = ContainsRect; /***/ }), -/* 1111 */ +/* 1115 */ /***/ (function(module, exports) { /** @@ -164435,7 +164795,7 @@ module.exports = CopyFrom; /***/ }), -/* 1112 */ +/* 1116 */ /***/ (function(module, exports) { /** @@ -164469,7 +164829,7 @@ module.exports = Equals; /***/ }), -/* 1113 */ +/* 1117 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164509,7 +164869,7 @@ module.exports = GetBounds; /***/ }), -/* 1114 */ +/* 1118 */ /***/ (function(module, exports) { /** @@ -164544,7 +164904,7 @@ module.exports = Offset; /***/ }), -/* 1115 */ +/* 1119 */ /***/ (function(module, exports) { /** @@ -164578,7 +164938,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1116 */ +/* 1120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164587,29 +164947,29 @@ module.exports = OffsetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(97); +var Ellipse = __webpack_require__(98); -Ellipse.Area = __webpack_require__(1117); -Ellipse.Circumference = __webpack_require__(413); -Ellipse.CircumferencePoint = __webpack_require__(202); -Ellipse.Clone = __webpack_require__(1118); -Ellipse.Contains = __webpack_require__(98); -Ellipse.ContainsPoint = __webpack_require__(1119); -Ellipse.ContainsRect = __webpack_require__(1120); -Ellipse.CopyFrom = __webpack_require__(1121); -Ellipse.Equals = __webpack_require__(1122); -Ellipse.GetBounds = __webpack_require__(1123); -Ellipse.GetPoint = __webpack_require__(411); -Ellipse.GetPoints = __webpack_require__(412); -Ellipse.Offset = __webpack_require__(1124); -Ellipse.OffsetPoint = __webpack_require__(1125); -Ellipse.Random = __webpack_require__(165); +Ellipse.Area = __webpack_require__(1121); +Ellipse.Circumference = __webpack_require__(414); +Ellipse.CircumferencePoint = __webpack_require__(204); +Ellipse.Clone = __webpack_require__(1122); +Ellipse.Contains = __webpack_require__(99); +Ellipse.ContainsPoint = __webpack_require__(1123); +Ellipse.ContainsRect = __webpack_require__(1124); +Ellipse.CopyFrom = __webpack_require__(1125); +Ellipse.Equals = __webpack_require__(1126); +Ellipse.GetBounds = __webpack_require__(1127); +Ellipse.GetPoint = __webpack_require__(412); +Ellipse.GetPoints = __webpack_require__(413); +Ellipse.Offset = __webpack_require__(1128); +Ellipse.OffsetPoint = __webpack_require__(1129); +Ellipse.Random = __webpack_require__(167); module.exports = Ellipse; /***/ }), -/* 1117 */ +/* 1121 */ /***/ (function(module, exports) { /** @@ -164643,7 +165003,7 @@ module.exports = Area; /***/ }), -/* 1118 */ +/* 1122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164652,7 +165012,7 @@ module.exports = Area; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(97); +var Ellipse = __webpack_require__(98); /** * Creates a new Ellipse instance based on the values contained in the given source. @@ -164673,7 +165033,7 @@ module.exports = Clone; /***/ }), -/* 1119 */ +/* 1123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164682,7 +165042,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(98); +var Contains = __webpack_require__(99); /** * Check to see if the Ellipse contains the given Point object. @@ -164704,7 +165064,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1120 */ +/* 1124 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164713,7 +165073,7 @@ module.exports = ContainsPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(98); +var Contains = __webpack_require__(99); /** * Check to see if the Ellipse contains all four points of the given Rectangle object. @@ -164740,7 +165100,7 @@ module.exports = ContainsRect; /***/ }), -/* 1121 */ +/* 1125 */ /***/ (function(module, exports) { /** @@ -164772,7 +165132,7 @@ module.exports = CopyFrom; /***/ }), -/* 1122 */ +/* 1126 */ /***/ (function(module, exports) { /** @@ -164807,7 +165167,7 @@ module.exports = Equals; /***/ }), -/* 1123 */ +/* 1127 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164847,7 +165207,7 @@ module.exports = GetBounds; /***/ }), -/* 1124 */ +/* 1128 */ /***/ (function(module, exports) { /** @@ -164882,7 +165242,7 @@ module.exports = Offset; /***/ }), -/* 1125 */ +/* 1129 */ /***/ (function(module, exports) { /** @@ -164916,7 +165276,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1126 */ +/* 1130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164927,7 +165287,7 @@ module.exports = OffsetPoint; */ var Point = __webpack_require__(4); -var CircleToCircle = __webpack_require__(214); +var CircleToCircle = __webpack_require__(216); /** * Checks if two Circles intersect and returns the intersection points as a Point object array. @@ -165010,7 +165370,7 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1127 */ +/* 1131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165020,8 +165380,8 @@ module.exports = GetCircleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(216); -var CircleToRectangle = __webpack_require__(215); +var GetLineToCircle = __webpack_require__(218); +var CircleToRectangle = __webpack_require__(217); /** * Checks for intersection between a circle and a rectangle, @@ -165060,7 +165420,7 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1128 */ +/* 1132 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165069,8 +165429,8 @@ module.exports = GetCircleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector4 = __webpack_require__(128); -var GetLineToPolygon = __webpack_require__(451); +var Vector4 = __webpack_require__(129); +var GetLineToPolygon = __webpack_require__(452); var Line = __webpack_require__(40); // Temp calculation segment @@ -165162,7 +165522,7 @@ module.exports = GetRaysFromPointToPolygon; /***/ }), -/* 1129 */ +/* 1133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165172,7 +165532,7 @@ module.exports = GetRaysFromPointToPolygon; */ var Rectangle = __webpack_require__(9); -var RectangleToRectangle = __webpack_require__(142); +var RectangleToRectangle = __webpack_require__(143); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -165211,7 +165571,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1130 */ +/* 1134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165221,8 +165581,8 @@ module.exports = GetRectangleIntersection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToRectangle = __webpack_require__(218); -var RectangleToRectangle = __webpack_require__(142); +var GetLineToRectangle = __webpack_require__(220); +var RectangleToRectangle = __webpack_require__(143); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -165262,7 +165622,7 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1131 */ +/* 1135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165272,8 +165632,8 @@ module.exports = GetRectangleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(453); -var GetLineToRectangle = __webpack_require__(218); +var RectangleToTriangle = __webpack_require__(454); +var GetLineToRectangle = __webpack_require__(220); /** * Checks for intersection between Rectangle shape and Triangle shape, @@ -165310,7 +165670,7 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1132 */ +/* 1136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165320,8 +165680,8 @@ module.exports = GetRectangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(216); -var TriangleToCircle = __webpack_require__(455); +var GetLineToCircle = __webpack_require__(218); +var TriangleToCircle = __webpack_require__(456); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -165359,7 +165719,7 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1133 */ +/* 1137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165369,8 +165729,8 @@ module.exports = GetTriangleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(458); -var GetTriangleToLine = __webpack_require__(456); +var TriangleToTriangle = __webpack_require__(459); +var GetTriangleToLine = __webpack_require__(457); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -165408,7 +165768,7 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1134 */ +/* 1138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165417,7 +165777,7 @@ module.exports = GetTriangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(460); +var PointToLine = __webpack_require__(461); /** * Checks if a Point is located on the given line segment. @@ -165449,7 +165809,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 1135 */ +/* 1139 */ /***/ (function(module, exports) { /** @@ -165489,7 +165849,7 @@ module.exports = RectangleToValues; /***/ }), -/* 1136 */ +/* 1140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165501,40 +165861,40 @@ module.exports = RectangleToValues; var Line = __webpack_require__(40); Line.Angle = __webpack_require__(87); -Line.BresenhamPoints = __webpack_require__(296); -Line.CenterOn = __webpack_require__(1137); -Line.Clone = __webpack_require__(1138); -Line.CopyFrom = __webpack_require__(1139); -Line.Equals = __webpack_require__(1140); -Line.Extend = __webpack_require__(1141); -Line.GetEasedPoints = __webpack_require__(1142); -Line.GetMidPoint = __webpack_require__(1143); -Line.GetNearestPoint = __webpack_require__(1144); -Line.GetNormal = __webpack_require__(1145); -Line.GetPoint = __webpack_require__(283); -Line.GetPoints = __webpack_require__(160); -Line.GetShortestDistance = __webpack_require__(1146); -Line.Height = __webpack_require__(1147); +Line.BresenhamPoints = __webpack_require__(297); +Line.CenterOn = __webpack_require__(1141); +Line.Clone = __webpack_require__(1142); +Line.CopyFrom = __webpack_require__(1143); +Line.Equals = __webpack_require__(1144); +Line.Extend = __webpack_require__(1145); +Line.GetEasedPoints = __webpack_require__(1146); +Line.GetMidPoint = __webpack_require__(1147); +Line.GetNearestPoint = __webpack_require__(1148); +Line.GetNormal = __webpack_require__(1149); +Line.GetPoint = __webpack_require__(284); +Line.GetPoints = __webpack_require__(162); +Line.GetShortestDistance = __webpack_require__(1150); +Line.Height = __webpack_require__(1151); Line.Length = __webpack_require__(58); -Line.NormalAngle = __webpack_require__(461); -Line.NormalX = __webpack_require__(1148); -Line.NormalY = __webpack_require__(1149); -Line.Offset = __webpack_require__(1150); -Line.PerpSlope = __webpack_require__(1151); -Line.Random = __webpack_require__(161); -Line.ReflectAngle = __webpack_require__(1152); -Line.Rotate = __webpack_require__(1153); -Line.RotateAroundPoint = __webpack_require__(1154); -Line.RotateAroundXY = __webpack_require__(220); -Line.SetToAngle = __webpack_require__(1155); -Line.Slope = __webpack_require__(1156); -Line.Width = __webpack_require__(1157); +Line.NormalAngle = __webpack_require__(462); +Line.NormalX = __webpack_require__(1152); +Line.NormalY = __webpack_require__(1153); +Line.Offset = __webpack_require__(1154); +Line.PerpSlope = __webpack_require__(1155); +Line.Random = __webpack_require__(163); +Line.ReflectAngle = __webpack_require__(1156); +Line.Rotate = __webpack_require__(1157); +Line.RotateAroundPoint = __webpack_require__(1158); +Line.RotateAroundXY = __webpack_require__(222); +Line.SetToAngle = __webpack_require__(1159); +Line.Slope = __webpack_require__(1160); +Line.Width = __webpack_require__(1161); module.exports = Line; /***/ }), -/* 1137 */ +/* 1141 */ /***/ (function(module, exports) { /** @@ -165574,7 +165934,7 @@ module.exports = CenterOn; /***/ }), -/* 1138 */ +/* 1142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165604,7 +165964,7 @@ module.exports = Clone; /***/ }), -/* 1139 */ +/* 1143 */ /***/ (function(module, exports) { /** @@ -165635,7 +165995,7 @@ module.exports = CopyFrom; /***/ }), -/* 1140 */ +/* 1144 */ /***/ (function(module, exports) { /** @@ -165669,7 +166029,7 @@ module.exports = Equals; /***/ }), -/* 1141 */ +/* 1145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165727,7 +166087,7 @@ module.exports = Extend; /***/ }), -/* 1142 */ +/* 1146 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165736,7 +166096,7 @@ module.exports = Extend; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DistanceBetweenPoints = __webpack_require__(332); +var DistanceBetweenPoints = __webpack_require__(333); var GetEaseFunction = __webpack_require__(71); var Point = __webpack_require__(4); @@ -165847,7 +166207,7 @@ module.exports = GetEasedPoints; /***/ }), -/* 1143 */ +/* 1147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165885,7 +166245,7 @@ module.exports = GetMidPoint; /***/ }), -/* 1144 */ +/* 1148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165940,7 +166300,7 @@ module.exports = GetNearestPoint; /***/ }), -/* 1145 */ +/* 1149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165984,7 +166344,7 @@ module.exports = GetNormal; /***/ }), -/* 1146 */ +/* 1150 */ /***/ (function(module, exports) { /** @@ -166031,7 +166391,7 @@ module.exports = GetShortestDistance; /***/ }), -/* 1147 */ +/* 1151 */ /***/ (function(module, exports) { /** @@ -166059,7 +166419,7 @@ module.exports = Height; /***/ }), -/* 1148 */ +/* 1152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166090,7 +166450,7 @@ module.exports = NormalX; /***/ }), -/* 1149 */ +/* 1153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166122,7 +166482,7 @@ module.exports = NormalY; /***/ }), -/* 1150 */ +/* 1154 */ /***/ (function(module, exports) { /** @@ -166160,7 +166520,7 @@ module.exports = Offset; /***/ }), -/* 1151 */ +/* 1155 */ /***/ (function(module, exports) { /** @@ -166188,7 +166548,7 @@ module.exports = PerpSlope; /***/ }), -/* 1152 */ +/* 1156 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166198,7 +166558,7 @@ module.exports = PerpSlope; */ var Angle = __webpack_require__(87); -var NormalAngle = __webpack_require__(461); +var NormalAngle = __webpack_require__(462); /** * Calculate the reflected angle between two lines. @@ -166222,7 +166582,7 @@ module.exports = ReflectAngle; /***/ }), -/* 1153 */ +/* 1157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166231,7 +166591,7 @@ module.exports = ReflectAngle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(220); +var RotateAroundXY = __webpack_require__(222); /** * Rotate a line around its midpoint by the given angle in radians. @@ -166258,7 +166618,7 @@ module.exports = Rotate; /***/ }), -/* 1154 */ +/* 1158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166267,7 +166627,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(220); +var RotateAroundXY = __webpack_require__(222); /** * Rotate a line around a point by the given angle in radians. @@ -166292,7 +166652,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1155 */ +/* 1159 */ /***/ (function(module, exports) { /** @@ -166332,7 +166692,7 @@ module.exports = SetToAngle; /***/ }), -/* 1156 */ +/* 1160 */ /***/ (function(module, exports) { /** @@ -166360,7 +166720,7 @@ module.exports = Slope; /***/ }), -/* 1157 */ +/* 1161 */ /***/ (function(module, exports) { /** @@ -166388,7 +166748,7 @@ module.exports = Width; /***/ }), -/* 1158 */ +/* 1162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166399,27 +166759,27 @@ module.exports = Width; var Point = __webpack_require__(4); -Point.Ceil = __webpack_require__(1159); -Point.Clone = __webpack_require__(1160); -Point.CopyFrom = __webpack_require__(1161); -Point.Equals = __webpack_require__(1162); -Point.Floor = __webpack_require__(1163); -Point.GetCentroid = __webpack_require__(1164); -Point.GetMagnitude = __webpack_require__(462); -Point.GetMagnitudeSq = __webpack_require__(463); -Point.GetRectangleFromPoints = __webpack_require__(1165); -Point.Interpolate = __webpack_require__(1166); -Point.Invert = __webpack_require__(1167); -Point.Negative = __webpack_require__(1168); -Point.Project = __webpack_require__(1169); -Point.ProjectUnit = __webpack_require__(1170); -Point.SetMagnitude = __webpack_require__(1171); +Point.Ceil = __webpack_require__(1163); +Point.Clone = __webpack_require__(1164); +Point.CopyFrom = __webpack_require__(1165); +Point.Equals = __webpack_require__(1166); +Point.Floor = __webpack_require__(1167); +Point.GetCentroid = __webpack_require__(1168); +Point.GetMagnitude = __webpack_require__(463); +Point.GetMagnitudeSq = __webpack_require__(464); +Point.GetRectangleFromPoints = __webpack_require__(1169); +Point.Interpolate = __webpack_require__(1170); +Point.Invert = __webpack_require__(1171); +Point.Negative = __webpack_require__(1172); +Point.Project = __webpack_require__(1173); +Point.ProjectUnit = __webpack_require__(1174); +Point.SetMagnitude = __webpack_require__(1175); module.exports = Point; /***/ }), -/* 1159 */ +/* 1163 */ /***/ (function(module, exports) { /** @@ -166449,7 +166809,7 @@ module.exports = Ceil; /***/ }), -/* 1160 */ +/* 1164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166479,7 +166839,7 @@ module.exports = Clone; /***/ }), -/* 1161 */ +/* 1165 */ /***/ (function(module, exports) { /** @@ -166510,7 +166870,7 @@ module.exports = CopyFrom; /***/ }), -/* 1162 */ +/* 1166 */ /***/ (function(module, exports) { /** @@ -166539,7 +166899,7 @@ module.exports = Equals; /***/ }), -/* 1163 */ +/* 1167 */ /***/ (function(module, exports) { /** @@ -166569,7 +166929,7 @@ module.exports = Floor; /***/ }), -/* 1164 */ +/* 1168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166633,7 +166993,7 @@ module.exports = GetCentroid; /***/ }), -/* 1165 */ +/* 1169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166703,7 +167063,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1166 */ +/* 1170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166744,7 +167104,7 @@ module.exports = Interpolate; /***/ }), -/* 1167 */ +/* 1171 */ /***/ (function(module, exports) { /** @@ -166774,7 +167134,7 @@ module.exports = Invert; /***/ }), -/* 1168 */ +/* 1172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166809,7 +167169,7 @@ module.exports = Negative; /***/ }), -/* 1169 */ +/* 1173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166819,7 +167179,7 @@ module.exports = Negative; */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(463); +var GetMagnitudeSq = __webpack_require__(464); /** * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the @@ -166856,7 +167216,7 @@ module.exports = Project; /***/ }), -/* 1170 */ +/* 1174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166901,7 +167261,7 @@ module.exports = ProjectUnit; /***/ }), -/* 1171 */ +/* 1175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166910,7 +167270,7 @@ module.exports = ProjectUnit; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(462); +var GetMagnitude = __webpack_require__(463); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -166945,7 +167305,7 @@ module.exports = SetMagnitude; /***/ }), -/* 1172 */ +/* 1176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166954,26 +167314,26 @@ module.exports = SetMagnitude; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(210); +var Polygon = __webpack_require__(212); -Polygon.Clone = __webpack_require__(1173); -Polygon.Contains = __webpack_require__(211); -Polygon.ContainsPoint = __webpack_require__(1174); +Polygon.Clone = __webpack_require__(1177); +Polygon.Contains = __webpack_require__(213); +Polygon.ContainsPoint = __webpack_require__(1178); Polygon.Earcut = __webpack_require__(60); -Polygon.GetAABB = __webpack_require__(435); -Polygon.GetNumberArray = __webpack_require__(1175); -Polygon.GetPoints = __webpack_require__(436); -Polygon.Perimeter = __webpack_require__(437); -Polygon.Reverse = __webpack_require__(1176); -Polygon.Simplify = __webpack_require__(1177); -Polygon.Smooth = __webpack_require__(438); -Polygon.Translate = __webpack_require__(1178); +Polygon.GetAABB = __webpack_require__(436); +Polygon.GetNumberArray = __webpack_require__(1179); +Polygon.GetPoints = __webpack_require__(437); +Polygon.Perimeter = __webpack_require__(438); +Polygon.Reverse = __webpack_require__(1180); +Polygon.Simplify = __webpack_require__(1181); +Polygon.Smooth = __webpack_require__(439); +Polygon.Translate = __webpack_require__(1182); module.exports = Polygon; /***/ }), -/* 1173 */ +/* 1177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166982,7 +167342,7 @@ module.exports = Polygon; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(210); +var Polygon = __webpack_require__(212); /** * Create a new polygon which is a copy of the specified polygon @@ -167003,7 +167363,7 @@ module.exports = Clone; /***/ }), -/* 1174 */ +/* 1178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167012,7 +167372,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(211); +var Contains = __webpack_require__(213); /** * Checks the given Point again the Polygon to see if the Point lays within its vertices. @@ -167034,7 +167394,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1175 */ +/* 1179 */ /***/ (function(module, exports) { /** @@ -167077,7 +167437,7 @@ module.exports = GetNumberArray; /***/ }), -/* 1176 */ +/* 1180 */ /***/ (function(module, exports) { /** @@ -167109,7 +167469,7 @@ module.exports = Reverse; /***/ }), -/* 1177 */ +/* 1181 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -167319,7 +167679,7 @@ module.exports = Simplify; /***/ }), -/* 1178 */ +/* 1182 */ /***/ (function(module, exports) { /** @@ -167359,7 +167719,7 @@ module.exports = Translate; /***/ }), -/* 1179 */ +/* 1183 */ /***/ (function(module, exports) { /** @@ -167387,7 +167747,7 @@ module.exports = Area; /***/ }), -/* 1180 */ +/* 1184 */ /***/ (function(module, exports) { /** @@ -167420,7 +167780,7 @@ module.exports = Ceil; /***/ }), -/* 1181 */ +/* 1185 */ /***/ (function(module, exports) { /** @@ -167455,7 +167815,7 @@ module.exports = CeilAll; /***/ }), -/* 1182 */ +/* 1186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167485,7 +167845,7 @@ module.exports = Clone; /***/ }), -/* 1183 */ +/* 1187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167516,7 +167876,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1184 */ +/* 1188 */ /***/ (function(module, exports) { /** @@ -167547,7 +167907,7 @@ module.exports = CopyFrom; /***/ }), -/* 1185 */ +/* 1189 */ /***/ (function(module, exports) { /** @@ -167581,7 +167941,7 @@ module.exports = Equals; /***/ }), -/* 1186 */ +/* 1190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167590,7 +167950,7 @@ module.exports = Equals; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(221); +var GetAspectRatio = __webpack_require__(223); /** * Adjusts the target rectangle, changing its width, height and position, @@ -167634,7 +167994,7 @@ module.exports = FitInside; /***/ }), -/* 1187 */ +/* 1191 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167643,7 +168003,7 @@ module.exports = FitInside; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(221); +var GetAspectRatio = __webpack_require__(223); /** * Adjusts the target rectangle, changing its width, height and position, @@ -167687,7 +168047,7 @@ module.exports = FitOutside; /***/ }), -/* 1188 */ +/* 1192 */ /***/ (function(module, exports) { /** @@ -167720,7 +168080,7 @@ module.exports = Floor; /***/ }), -/* 1189 */ +/* 1193 */ /***/ (function(module, exports) { /** @@ -167755,7 +168115,7 @@ module.exports = FloorAll; /***/ }), -/* 1190 */ +/* 1194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167798,7 +168158,7 @@ module.exports = FromXY; /***/ }), -/* 1191 */ +/* 1195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167836,7 +168196,7 @@ module.exports = GetCenter; /***/ }), -/* 1192 */ +/* 1196 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167876,7 +168236,7 @@ module.exports = GetSize; /***/ }), -/* 1193 */ +/* 1197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167885,7 +168245,7 @@ module.exports = GetSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(176); +var CenterOn = __webpack_require__(178); /** @@ -167918,7 +168278,7 @@ module.exports = Inflate; /***/ }), -/* 1194 */ +/* 1198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167928,7 +168288,7 @@ module.exports = Inflate; */ var Rectangle = __webpack_require__(9); -var Intersects = __webpack_require__(142); +var Intersects = __webpack_require__(143); /** * Takes two Rectangles and first checks to see if they intersect. @@ -167969,7 +168329,7 @@ module.exports = Intersection; /***/ }), -/* 1195 */ +/* 1199 */ /***/ (function(module, exports) { /** @@ -168018,7 +168378,7 @@ module.exports = MergePoints; /***/ }), -/* 1196 */ +/* 1200 */ /***/ (function(module, exports) { /** @@ -168065,7 +168425,7 @@ module.exports = MergeRect; /***/ }), -/* 1197 */ +/* 1201 */ /***/ (function(module, exports) { /** @@ -168109,7 +168469,7 @@ module.exports = MergeXY; /***/ }), -/* 1198 */ +/* 1202 */ /***/ (function(module, exports) { /** @@ -168144,7 +168504,7 @@ module.exports = Offset; /***/ }), -/* 1199 */ +/* 1203 */ /***/ (function(module, exports) { /** @@ -168178,7 +168538,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1200 */ +/* 1204 */ /***/ (function(module, exports) { /** @@ -168212,7 +168572,7 @@ module.exports = Overlaps; /***/ }), -/* 1201 */ +/* 1205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168269,7 +168629,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 1202 */ +/* 1206 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168278,8 +168638,8 @@ module.exports = PerimeterPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(180); -var ContainsRect = __webpack_require__(465); +var Between = __webpack_require__(182); +var ContainsRect = __webpack_require__(466); var Point = __webpack_require__(4); /** @@ -168340,7 +168700,7 @@ module.exports = RandomOutside; /***/ }), -/* 1203 */ +/* 1207 */ /***/ (function(module, exports) { /** @@ -168369,7 +168729,7 @@ module.exports = SameDimensions; /***/ }), -/* 1204 */ +/* 1208 */ /***/ (function(module, exports) { /** @@ -168408,7 +168768,7 @@ module.exports = Scale; /***/ }), -/* 1205 */ +/* 1209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168419,36 +168779,36 @@ module.exports = Scale; var Triangle = __webpack_require__(73); -Triangle.Area = __webpack_require__(1206); -Triangle.BuildEquilateral = __webpack_require__(1207); -Triangle.BuildFromPolygon = __webpack_require__(1208); -Triangle.BuildRight = __webpack_require__(1209); -Triangle.CenterOn = __webpack_require__(1210); -Triangle.Centroid = __webpack_require__(466); -Triangle.CircumCenter = __webpack_require__(1211); -Triangle.CircumCircle = __webpack_require__(1212); -Triangle.Clone = __webpack_require__(1213); +Triangle.Area = __webpack_require__(1210); +Triangle.BuildEquilateral = __webpack_require__(1211); +Triangle.BuildFromPolygon = __webpack_require__(1212); +Triangle.BuildRight = __webpack_require__(1213); +Triangle.CenterOn = __webpack_require__(1214); +Triangle.Centroid = __webpack_require__(467); +Triangle.CircumCenter = __webpack_require__(1215); +Triangle.CircumCircle = __webpack_require__(1216); +Triangle.Clone = __webpack_require__(1217); Triangle.Contains = __webpack_require__(85); -Triangle.ContainsArray = __webpack_require__(219); -Triangle.ContainsPoint = __webpack_require__(1214); -Triangle.CopyFrom = __webpack_require__(1215); -Triangle.Decompose = __webpack_require__(459); -Triangle.Equals = __webpack_require__(1216); -Triangle.GetPoint = __webpack_require__(442); -Triangle.GetPoints = __webpack_require__(443); -Triangle.InCenter = __webpack_require__(468); -Triangle.Perimeter = __webpack_require__(1217); -Triangle.Offset = __webpack_require__(467); -Triangle.Random = __webpack_require__(166); -Triangle.Rotate = __webpack_require__(1218); -Triangle.RotateAroundPoint = __webpack_require__(1219); -Triangle.RotateAroundXY = __webpack_require__(222); +Triangle.ContainsArray = __webpack_require__(221); +Triangle.ContainsPoint = __webpack_require__(1218); +Triangle.CopyFrom = __webpack_require__(1219); +Triangle.Decompose = __webpack_require__(460); +Triangle.Equals = __webpack_require__(1220); +Triangle.GetPoint = __webpack_require__(443); +Triangle.GetPoints = __webpack_require__(444); +Triangle.InCenter = __webpack_require__(469); +Triangle.Perimeter = __webpack_require__(1221); +Triangle.Offset = __webpack_require__(468); +Triangle.Random = __webpack_require__(168); +Triangle.Rotate = __webpack_require__(1222); +Triangle.RotateAroundPoint = __webpack_require__(1223); +Triangle.RotateAroundXY = __webpack_require__(224); module.exports = Triangle; /***/ }), -/* 1206 */ +/* 1210 */ /***/ (function(module, exports) { /** @@ -168487,7 +168847,7 @@ module.exports = Area; /***/ }), -/* 1207 */ +/* 1211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168531,7 +168891,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 1208 */ +/* 1212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168607,7 +168967,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1209 */ +/* 1213 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168656,7 +169016,7 @@ module.exports = BuildRight; /***/ }), -/* 1210 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168665,8 +169025,8 @@ module.exports = BuildRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(466); -var Offset = __webpack_require__(467); +var Centroid = __webpack_require__(467); +var Offset = __webpack_require__(468); /** * @callback CenterFunction @@ -168709,7 +169069,7 @@ module.exports = CenterOn; /***/ }), -/* 1211 */ +/* 1215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168785,7 +169145,7 @@ module.exports = CircumCenter; /***/ }), -/* 1212 */ +/* 1216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168868,7 +169228,7 @@ module.exports = CircumCircle; /***/ }), -/* 1213 */ +/* 1217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168898,7 +169258,7 @@ module.exports = Clone; /***/ }), -/* 1214 */ +/* 1218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168929,7 +169289,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1215 */ +/* 1219 */ /***/ (function(module, exports) { /** @@ -168960,7 +169320,7 @@ module.exports = CopyFrom; /***/ }), -/* 1216 */ +/* 1220 */ /***/ (function(module, exports) { /** @@ -168996,7 +169356,7 @@ module.exports = Equals; /***/ }), -/* 1217 */ +/* 1221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169031,7 +169391,7 @@ module.exports = Perimeter; /***/ }), -/* 1218 */ +/* 1222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169040,8 +169400,8 @@ module.exports = Perimeter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(222); -var InCenter = __webpack_require__(468); +var RotateAroundXY = __webpack_require__(224); +var InCenter = __webpack_require__(469); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -169067,7 +169427,7 @@ module.exports = Rotate; /***/ }), -/* 1219 */ +/* 1223 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169076,7 +169436,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(222); +var RotateAroundXY = __webpack_require__(224); /** * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties. @@ -169101,7 +169461,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1220 */ +/* 1224 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169110,7 +169470,7 @@ module.exports = RotateAroundPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(187); +var CONST = __webpack_require__(189); var Extend = __webpack_require__(19); /** @@ -169119,17 +169479,17 @@ var Extend = __webpack_require__(19); var Input = { - CreatePixelPerfectHandler: __webpack_require__(469), - CreateInteractiveObject: __webpack_require__(470), + CreatePixelPerfectHandler: __webpack_require__(470), + CreateInteractiveObject: __webpack_require__(471), Events: __webpack_require__(56), - Gamepad: __webpack_require__(1221), - InputManager: __webpack_require__(375), - InputPlugin: __webpack_require__(1233), - InputPluginCache: __webpack_require__(143), - Keyboard: __webpack_require__(1234), - Mouse: __webpack_require__(1251), - Pointer: __webpack_require__(378), - Touch: __webpack_require__(1252) + Gamepad: __webpack_require__(1225), + InputManager: __webpack_require__(376), + InputPlugin: __webpack_require__(1237), + InputPluginCache: __webpack_require__(144), + Keyboard: __webpack_require__(1238), + Mouse: __webpack_require__(1255), + Pointer: __webpack_require__(379), + Touch: __webpack_require__(1256) }; @@ -169140,7 +169500,7 @@ module.exports = Input; /***/ }), -/* 1221 */ +/* 1225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169155,18 +169515,18 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(471), - Button: __webpack_require__(472), - Events: __webpack_require__(223), - Gamepad: __webpack_require__(473), - GamepadPlugin: __webpack_require__(1228), + Axis: __webpack_require__(472), + Button: __webpack_require__(473), + Events: __webpack_require__(225), + Gamepad: __webpack_require__(474), + GamepadPlugin: __webpack_require__(1232), - Configs: __webpack_require__(1229) + Configs: __webpack_require__(1233) }; /***/ }), -/* 1222 */ +/* 1226 */ /***/ (function(module, exports) { /** @@ -169195,7 +169555,7 @@ module.exports = 'down'; /***/ }), -/* 1223 */ +/* 1227 */ /***/ (function(module, exports) { /** @@ -169224,7 +169584,7 @@ module.exports = 'up'; /***/ }), -/* 1224 */ +/* 1228 */ /***/ (function(module, exports) { /** @@ -169255,7 +169615,7 @@ module.exports = 'connected'; /***/ }), -/* 1225 */ +/* 1229 */ /***/ (function(module, exports) { /** @@ -169281,7 +169641,7 @@ module.exports = 'disconnected'; /***/ }), -/* 1226 */ +/* 1230 */ /***/ (function(module, exports) { /** @@ -169313,7 +169673,7 @@ module.exports = 'down'; /***/ }), -/* 1227 */ +/* 1231 */ /***/ (function(module, exports) { /** @@ -169345,7 +169705,7 @@ module.exports = 'up'; /***/ }), -/* 1228 */ +/* 1232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169356,10 +169716,10 @@ module.exports = 'up'; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(223); -var Gamepad = __webpack_require__(473); +var Events = __webpack_require__(225); +var Gamepad = __webpack_require__(474); var GetValue = __webpack_require__(6); -var InputPluginCache = __webpack_require__(143); +var InputPluginCache = __webpack_require__(144); var InputEvents = __webpack_require__(56); /** @@ -169983,7 +170343,7 @@ module.exports = GamepadPlugin; /***/ }), -/* 1229 */ +/* 1233 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169998,15 +170358,15 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1230), - SNES_USB: __webpack_require__(1231), - XBOX_360: __webpack_require__(1232) + DUALSHOCK_4: __webpack_require__(1234), + SNES_USB: __webpack_require__(1235), + XBOX_360: __webpack_require__(1236) }; /***/ }), -/* 1230 */ +/* 1234 */ /***/ (function(module, exports) { /** @@ -170056,7 +170416,7 @@ module.exports = { /***/ }), -/* 1231 */ +/* 1235 */ /***/ (function(module, exports) { /** @@ -170095,7 +170455,7 @@ module.exports = { /***/ }), -/* 1232 */ +/* 1236 */ /***/ (function(module, exports) { /** @@ -170146,7 +170506,7 @@ module.exports = { /***/ }), -/* 1233 */ +/* 1237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170158,17 +170518,17 @@ module.exports = { var Circle = __webpack_require__(68); var CircleContains = __webpack_require__(57); var Class = __webpack_require__(0); -var CONST = __webpack_require__(187); -var CreateInteractiveObject = __webpack_require__(470); -var CreatePixelPerfectHandler = __webpack_require__(469); +var CONST = __webpack_require__(189); +var CreateInteractiveObject = __webpack_require__(471); +var CreatePixelPerfectHandler = __webpack_require__(470); var DistanceBetween = __webpack_require__(55); -var Ellipse = __webpack_require__(97); -var EllipseContains = __webpack_require__(98); +var Ellipse = __webpack_require__(98); +var EllipseContains = __webpack_require__(99); var Events = __webpack_require__(56); var EventEmitter = __webpack_require__(12); var GetFastValue = __webpack_require__(2); var GEOM_CONST = __webpack_require__(49); -var InputPluginCache = __webpack_require__(143); +var InputPluginCache = __webpack_require__(144); var IsPlainObject = __webpack_require__(7); var PluginCache = __webpack_require__(23); var Rectangle = __webpack_require__(9); @@ -173327,7 +173687,7 @@ module.exports = InputPlugin; /***/ }), -/* 1234 */ +/* 1238 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173342,26 +173702,26 @@ module.exports = InputPlugin; module.exports = { - Events: __webpack_require__(144), + Events: __webpack_require__(145), - KeyboardManager: __webpack_require__(376), - KeyboardPlugin: __webpack_require__(1242), + KeyboardManager: __webpack_require__(377), + KeyboardPlugin: __webpack_require__(1246), - Key: __webpack_require__(474), - KeyCodes: __webpack_require__(131), + Key: __webpack_require__(475), + KeyCodes: __webpack_require__(132), - KeyCombo: __webpack_require__(475), + KeyCombo: __webpack_require__(476), - JustDown: __webpack_require__(1247), - JustUp: __webpack_require__(1248), - DownDuration: __webpack_require__(1249), - UpDuration: __webpack_require__(1250) + JustDown: __webpack_require__(1251), + JustUp: __webpack_require__(1252), + DownDuration: __webpack_require__(1253), + UpDuration: __webpack_require__(1254) }; /***/ }), -/* 1235 */ +/* 1239 */ /***/ (function(module, exports) { /** @@ -173397,7 +173757,7 @@ module.exports = 'keydown'; /***/ }), -/* 1236 */ +/* 1240 */ /***/ (function(module, exports) { /** @@ -173426,7 +173786,7 @@ module.exports = 'keyup'; /***/ }), -/* 1237 */ +/* 1241 */ /***/ (function(module, exports) { /** @@ -173460,7 +173820,7 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1238 */ +/* 1242 */ /***/ (function(module, exports) { /** @@ -173494,7 +173854,7 @@ module.exports = 'down'; /***/ }), -/* 1239 */ +/* 1243 */ /***/ (function(module, exports) { /** @@ -173533,7 +173893,7 @@ module.exports = 'keydown-'; /***/ }), -/* 1240 */ +/* 1244 */ /***/ (function(module, exports) { /** @@ -173565,7 +173925,7 @@ module.exports = 'keyup-'; /***/ }), -/* 1241 */ +/* 1245 */ /***/ (function(module, exports) { /** @@ -173599,7 +173959,7 @@ module.exports = 'up'; /***/ }), -/* 1242 */ +/* 1246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173610,17 +173970,17 @@ module.exports = 'up'; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(144); +var Events = __webpack_require__(145); var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(6); var InputEvents = __webpack_require__(56); -var InputPluginCache = __webpack_require__(143); -var Key = __webpack_require__(474); -var KeyCodes = __webpack_require__(131); -var KeyCombo = __webpack_require__(475); -var KeyMap = __webpack_require__(1246); +var InputPluginCache = __webpack_require__(144); +var Key = __webpack_require__(475); +var KeyCodes = __webpack_require__(132); +var KeyCombo = __webpack_require__(476); +var KeyMap = __webpack_require__(1250); var SceneEvents = __webpack_require__(20); -var SnapFloor = __webpack_require__(94); +var SnapFloor = __webpack_require__(95); /** * @classdesc @@ -174534,7 +174894,7 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1243 */ +/* 1247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174543,7 +174903,7 @@ module.exports = KeyboardPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1244); +var AdvanceKeyCombo = __webpack_require__(1248); /** * Used internally by the KeyCombo class. @@ -174615,7 +174975,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1244 */ +/* 1248 */ /***/ (function(module, exports) { /** @@ -174657,7 +175017,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1245 */ +/* 1249 */ /***/ (function(module, exports) { /** @@ -174692,7 +175052,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1246 */ +/* 1250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174701,7 +175061,7 @@ module.exports = ResetKeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(131); +var KeyCodes = __webpack_require__(132); var KeyMap = {}; @@ -174714,7 +175074,7 @@ module.exports = KeyMap; /***/ }), -/* 1247 */ +/* 1251 */ /***/ (function(module, exports) { /** @@ -174756,7 +175116,7 @@ module.exports = JustDown; /***/ }), -/* 1248 */ +/* 1252 */ /***/ (function(module, exports) { /** @@ -174798,7 +175158,7 @@ module.exports = JustUp; /***/ }), -/* 1249 */ +/* 1253 */ /***/ (function(module, exports) { /** @@ -174832,7 +175192,7 @@ module.exports = DownDuration; /***/ }), -/* 1250 */ +/* 1254 */ /***/ (function(module, exports) { /** @@ -174866,7 +175226,7 @@ module.exports = UpDuration; /***/ }), -/* 1251 */ +/* 1255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174882,14 +175242,14 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(377) + MouseManager: __webpack_require__(378) }; /* eslint-enable */ /***/ }), -/* 1252 */ +/* 1256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174905,14 +175265,14 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(379) + TouchManager: __webpack_require__(380) }; /* eslint-enable */ /***/ }), -/* 1253 */ +/* 1257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174932,16 +175292,16 @@ var Loader = { Events: __webpack_require__(84), - FileTypes: __webpack_require__(1254), + FileTypes: __webpack_require__(1258), File: __webpack_require__(22), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(145), - LoaderPlugin: __webpack_require__(1278), - MergeXHRSettings: __webpack_require__(224), + GetURL: __webpack_require__(146), + LoaderPlugin: __webpack_require__(1282), + MergeXHRSettings: __webpack_require__(226), MultiFile: __webpack_require__(63), - XHRLoader: __webpack_require__(476), - XHRSettings: __webpack_require__(146) + XHRLoader: __webpack_require__(477), + XHRSettings: __webpack_require__(147) }; @@ -174952,7 +175312,7 @@ module.exports = Loader; /***/ }), -/* 1254 */ +/* 1258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174967,42 +175327,42 @@ module.exports = Loader; module.exports = { - AnimationJSONFile: __webpack_require__(1255), - AtlasJSONFile: __webpack_require__(1256), - AtlasXMLFile: __webpack_require__(1257), - AudioFile: __webpack_require__(477), - AudioSpriteFile: __webpack_require__(1258), - BinaryFile: __webpack_require__(1259), - BitmapFontFile: __webpack_require__(1260), - CSSFile: __webpack_require__(1261), - GLSLFile: __webpack_require__(1262), - HTML5AudioFile: __webpack_require__(478), - HTMLFile: __webpack_require__(1263), - HTMLTextureFile: __webpack_require__(1264), + AnimationJSONFile: __webpack_require__(1259), + AtlasJSONFile: __webpack_require__(1260), + AtlasXMLFile: __webpack_require__(1261), + AudioFile: __webpack_require__(478), + AudioSpriteFile: __webpack_require__(1262), + BinaryFile: __webpack_require__(1263), + BitmapFontFile: __webpack_require__(1264), + CSSFile: __webpack_require__(1265), + GLSLFile: __webpack_require__(1266), + HTML5AudioFile: __webpack_require__(479), + HTMLFile: __webpack_require__(1267), + HTMLTextureFile: __webpack_require__(1268), ImageFile: __webpack_require__(74), JSONFile: __webpack_require__(62), - MultiAtlasFile: __webpack_require__(1265), - MultiScriptFile: __webpack_require__(1266), - PackFile: __webpack_require__(1267), - PluginFile: __webpack_require__(1268), - SceneFile: __webpack_require__(1269), - ScenePluginFile: __webpack_require__(1270), - ScriptFile: __webpack_require__(479), - SpriteSheetFile: __webpack_require__(1271), - SVGFile: __webpack_require__(1272), - TextFile: __webpack_require__(480), - TilemapCSVFile: __webpack_require__(1273), - TilemapImpactFile: __webpack_require__(1274), - TilemapJSONFile: __webpack_require__(1275), - UnityAtlasFile: __webpack_require__(1276), - VideoFile: __webpack_require__(1277), - XMLFile: __webpack_require__(225) + MultiAtlasFile: __webpack_require__(1269), + MultiScriptFile: __webpack_require__(1270), + PackFile: __webpack_require__(1271), + PluginFile: __webpack_require__(1272), + SceneFile: __webpack_require__(1273), + ScenePluginFile: __webpack_require__(1274), + ScriptFile: __webpack_require__(480), + SpriteSheetFile: __webpack_require__(1275), + SVGFile: __webpack_require__(1276), + TextFile: __webpack_require__(481), + TilemapCSVFile: __webpack_require__(1277), + TilemapImpactFile: __webpack_require__(1278), + TilemapJSONFile: __webpack_require__(1279), + UnityAtlasFile: __webpack_require__(1280), + VideoFile: __webpack_require__(1281), + XMLFile: __webpack_require__(227) }; /***/ }), -/* 1255 */ +/* 1259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175203,7 +175563,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1256 */ +/* 1260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175452,7 +175812,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1257 */ +/* 1261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175467,7 +175827,7 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(63); -var XMLFile = __webpack_require__(225); +var XMLFile = __webpack_require__(227); /** * @classdesc @@ -175695,7 +176055,7 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1258 */ +/* 1262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175704,7 +176064,7 @@ module.exports = AtlasXMLFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(477); +var AudioFile = __webpack_require__(478); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -175985,7 +176345,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1259 */ +/* 1263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176167,7 +176527,7 @@ module.exports = BinaryFile; /***/ }), -/* 1260 */ +/* 1264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176182,8 +176542,8 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(63); -var ParseXMLBitmapFont = __webpack_require__(196); -var XMLFile = __webpack_require__(225); +var ParseXMLBitmapFont = __webpack_require__(198); +var XMLFile = __webpack_require__(227); /** * @classdesc @@ -176414,7 +176774,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 1261 */ +/* 1265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176582,7 +176942,7 @@ module.exports = CSSFile; /***/ }), -/* 1262 */ +/* 1266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176597,7 +176957,7 @@ var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var Shader = __webpack_require__(362); +var Shader = __webpack_require__(363); /** * @classdesc @@ -176993,7 +177353,7 @@ module.exports = GLSLFile; /***/ }), -/* 1263 */ +/* 1267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177168,7 +177528,7 @@ module.exports = HTMLFile; /***/ }), -/* 1264 */ +/* 1268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177426,7 +177786,7 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1265 */ +/* 1269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177759,7 +178119,7 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1266 */ +/* 1270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177773,7 +178133,7 @@ var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(63); -var ScriptFile = __webpack_require__(479); +var ScriptFile = __webpack_require__(480); /** * @classdesc @@ -177976,7 +178336,7 @@ module.exports = MultiScriptFile; /***/ }), -/* 1267 */ +/* 1271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178194,7 +178554,7 @@ module.exports = PackFile; /***/ }), -/* 1268 */ +/* 1272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178406,7 +178766,7 @@ module.exports = PluginFile; /***/ }), -/* 1269 */ +/* 1273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178627,7 +178987,7 @@ module.exports = SceneFile; /***/ }), -/* 1270 */ +/* 1274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178833,7 +179193,7 @@ module.exports = ScenePluginFile; /***/ }), -/* 1271 */ +/* 1275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179024,7 +179384,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1272 */ +/* 1276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179363,7 +179723,7 @@ module.exports = SVGFile; /***/ }), -/* 1273 */ +/* 1277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179558,7 +179918,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1274 */ +/* 1278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179714,7 +180074,7 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1275 */ +/* 1279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179870,7 +180230,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1276 */ +/* 1280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179885,7 +180245,7 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(63); -var TextFile = __webpack_require__(480); +var TextFile = __webpack_require__(481); /** * @classdesc @@ -180112,7 +180472,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1277 */ +/* 1281 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180125,7 +180485,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(145); +var GetURL = __webpack_require__(146); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -180506,7 +180866,7 @@ module.exports = VideoFile; /***/ }), -/* 1278 */ +/* 1282 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180517,14 +180877,14 @@ module.exports = VideoFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var CustomSet = __webpack_require__(140); +var CustomSet = __webpack_require__(141); var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(84); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); -var XHRSettings = __webpack_require__(146); +var XHRSettings = __webpack_require__(147); /** * @classdesc @@ -181589,7 +181949,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 1279 */ +/* 1283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181607,23 +181967,23 @@ var Extend = __webpack_require__(19); var Arcade = { - ArcadePhysics: __webpack_require__(1280), - Body: __webpack_require__(487), - Collider: __webpack_require__(488), - Components: __webpack_require__(226), - Events: __webpack_require__(228), - Factory: __webpack_require__(481), - GetOverlapX: __webpack_require__(229), - GetOverlapY: __webpack_require__(230), - SeparateX: __webpack_require__(496), - SeparateY: __webpack_require__(497), - Group: __webpack_require__(484), - Image: __webpack_require__(482), - Sprite: __webpack_require__(147), - StaticBody: __webpack_require__(498), - StaticGroup: __webpack_require__(485), - Tilemap: __webpack_require__(1301), - World: __webpack_require__(486) + ArcadePhysics: __webpack_require__(1284), + Body: __webpack_require__(488), + Collider: __webpack_require__(489), + Components: __webpack_require__(228), + Events: __webpack_require__(230), + Factory: __webpack_require__(482), + GetOverlapX: __webpack_require__(231), + GetOverlapY: __webpack_require__(232), + SeparateX: __webpack_require__(497), + SeparateY: __webpack_require__(498), + Group: __webpack_require__(485), + Image: __webpack_require__(483), + Sprite: __webpack_require__(148), + StaticBody: __webpack_require__(499), + StaticGroup: __webpack_require__(486), + Tilemap: __webpack_require__(1305), + World: __webpack_require__(487) }; @@ -181634,7 +181994,7 @@ module.exports = Arcade; /***/ }), -/* 1280 */ +/* 1284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181646,16 +182006,16 @@ module.exports = Arcade; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(41); var DistanceBetween = __webpack_require__(55); -var DistanceSquared = __webpack_require__(333); -var Factory = __webpack_require__(481); +var DistanceSquared = __webpack_require__(334); +var Factory = __webpack_require__(482); var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(133); -var OverlapCirc = __webpack_require__(483); -var OverlapRect = __webpack_require__(227); +var Merge = __webpack_require__(134); +var OverlapCirc = __webpack_require__(484); +var OverlapRect = __webpack_require__(229); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(486); +var World = __webpack_require__(487); /** * @classdesc @@ -182359,7 +182719,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 1281 */ +/* 1285 */ /***/ (function(module, exports) { /** @@ -182434,7 +182794,7 @@ module.exports = Acceleration; /***/ }), -/* 1282 */ +/* 1286 */ /***/ (function(module, exports) { /** @@ -182516,7 +182876,7 @@ module.exports = Angular; /***/ }), -/* 1283 */ +/* 1287 */ /***/ (function(module, exports) { /** @@ -182615,7 +182975,7 @@ module.exports = Bounce; /***/ }), -/* 1284 */ +/* 1288 */ /***/ (function(module, exports) { /** @@ -182742,7 +183102,7 @@ module.exports = Debug; /***/ }), -/* 1285 */ +/* 1289 */ /***/ (function(module, exports) { /** @@ -182875,7 +183235,7 @@ module.exports = Drag; /***/ }), -/* 1286 */ +/* 1290 */ /***/ (function(module, exports) { /** @@ -182999,7 +183359,7 @@ module.exports = Enable; /***/ }), -/* 1287 */ +/* 1291 */ /***/ (function(module, exports) { /** @@ -183087,7 +183447,7 @@ module.exports = Friction; /***/ }), -/* 1288 */ +/* 1292 */ /***/ (function(module, exports) { /** @@ -183165,7 +183525,7 @@ module.exports = Gravity; /***/ }), -/* 1289 */ +/* 1293 */ /***/ (function(module, exports) { /** @@ -183207,7 +183567,7 @@ module.exports = Immovable; /***/ }), -/* 1290 */ +/* 1294 */ /***/ (function(module, exports) { /** @@ -183247,7 +183607,7 @@ module.exports = Mass; /***/ }), -/* 1291 */ +/* 1295 */ /***/ (function(module, exports) { /** @@ -183350,7 +183710,7 @@ module.exports = Size; /***/ }), -/* 1292 */ +/* 1296 */ /***/ (function(module, exports) { /** @@ -183449,7 +183809,7 @@ module.exports = Velocity; /***/ }), -/* 1293 */ +/* 1297 */ /***/ (function(module, exports) { /** @@ -183482,7 +183842,7 @@ module.exports = 'collide'; /***/ }), -/* 1294 */ +/* 1298 */ /***/ (function(module, exports) { /** @@ -183515,7 +183875,7 @@ module.exports = 'overlap'; /***/ }), -/* 1295 */ +/* 1299 */ /***/ (function(module, exports) { /** @@ -183538,7 +183898,7 @@ module.exports = 'pause'; /***/ }), -/* 1296 */ +/* 1300 */ /***/ (function(module, exports) { /** @@ -183561,7 +183921,7 @@ module.exports = 'resume'; /***/ }), -/* 1297 */ +/* 1301 */ /***/ (function(module, exports) { /** @@ -183593,7 +183953,7 @@ module.exports = 'tilecollide'; /***/ }), -/* 1298 */ +/* 1302 */ /***/ (function(module, exports) { /** @@ -183625,7 +183985,7 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1299 */ +/* 1303 */ /***/ (function(module, exports) { /** @@ -183657,7 +184017,7 @@ module.exports = 'worldbounds'; /***/ }), -/* 1300 */ +/* 1304 */ /***/ (function(module, exports) { /** @@ -183683,7 +184043,7 @@ module.exports = 'worldstep'; /***/ }), -/* 1301 */ +/* 1305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183698,13 +184058,13 @@ module.exports = 'worldstep'; var Tilemap = { - ProcessTileCallbacks: __webpack_require__(489), - ProcessTileSeparationX: __webpack_require__(493), - ProcessTileSeparationY: __webpack_require__(495), - SeparateTile: __webpack_require__(491), - TileCheckX: __webpack_require__(492), - TileCheckY: __webpack_require__(494), - TileIntersectsBody: __webpack_require__(231) + ProcessTileCallbacks: __webpack_require__(490), + ProcessTileSeparationX: __webpack_require__(494), + ProcessTileSeparationY: __webpack_require__(496), + SeparateTile: __webpack_require__(492), + TileCheckX: __webpack_require__(493), + TileCheckY: __webpack_require__(495), + TileIntersectsBody: __webpack_require__(233) }; @@ -183712,7 +184072,7 @@ module.exports = Tilemap; /***/ }), -/* 1302 */ +/* 1306 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183723,7 +184083,7 @@ module.exports = Tilemap; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(114); +var Bodies = __webpack_require__(116); var Body = __webpack_require__(64); var Common = __webpack_require__(44); var GetFastValue = __webpack_require__(2); @@ -183854,7 +184214,7 @@ module.exports = PhysicsEditorParser; /***/ }), -/* 1303 */ +/* 1307 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183863,7 +184223,7 @@ module.exports = PhysicsEditorParser; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(114); +var Bodies = __webpack_require__(116); var Body = __webpack_require__(64); /** @@ -183971,7 +184331,7 @@ module.exports = PhysicsJSONParser; /***/ }), -/* 1304 */ +/* 1308 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183987,11 +184347,11 @@ var Composites = {}; module.exports = Composites; -var Composite = __webpack_require__(156); -var Constraint = __webpack_require__(232); +var Composite = __webpack_require__(158); +var Constraint = __webpack_require__(234); var Common = __webpack_require__(44); var Body = __webpack_require__(64); -var Bodies = __webpack_require__(114); +var Bodies = __webpack_require__(116); (function() { @@ -184304,7 +184664,7 @@ var Bodies = __webpack_require__(114); /***/ }), -/* 1305 */ +/* 1309 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184321,7 +184681,7 @@ var Svg = {}; module.exports = Svg; -var Bounds = __webpack_require__(102); +var Bounds = __webpack_require__(103); var Common = __webpack_require__(44); (function() { @@ -184535,7 +184895,7 @@ var Common = __webpack_require__(44); })(); /***/ }), -/* 1306 */ +/* 1310 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184544,13 +184904,13 @@ var Common = __webpack_require__(44); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(114); +var Bodies = __webpack_require__(116); var Body = __webpack_require__(64); var Class = __webpack_require__(0); -var Components = __webpack_require__(499); +var Components = __webpack_require__(500); var EventEmitter = __webpack_require__(12); var GetFastValue = __webpack_require__(2); -var HasValue = __webpack_require__(113); +var HasValue = __webpack_require__(115); var Vertices = __webpack_require__(88); /** @@ -184855,7 +185215,7 @@ module.exports = MatterTileBody; /***/ }), -/* 1307 */ +/* 1311 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184868,35 +185228,35 @@ module.exports = MatterTileBody; * @namespace Phaser.Physics.Matter.Matter */ -var Matter = __webpack_require__(1406); +var Matter = __webpack_require__(1410); Matter.Body = __webpack_require__(64); -Matter.Composite = __webpack_require__(156); -Matter.World = __webpack_require__(1309); +Matter.Composite = __webpack_require__(158); +Matter.World = __webpack_require__(1313); -Matter.Detector = __webpack_require__(542); -Matter.Grid = __webpack_require__(1310); -Matter.Pairs = __webpack_require__(1311); -Matter.Pair = __webpack_require__(500); -Matter.Query = __webpack_require__(1407); -Matter.Resolver = __webpack_require__(1312); -Matter.SAT = __webpack_require__(543); +Matter.Detector = __webpack_require__(544); +Matter.Grid = __webpack_require__(1314); +Matter.Pairs = __webpack_require__(1315); +Matter.Pair = __webpack_require__(501); +Matter.Query = __webpack_require__(1411); +Matter.Resolver = __webpack_require__(1316); +Matter.SAT = __webpack_require__(545); -Matter.Constraint = __webpack_require__(232); +Matter.Constraint = __webpack_require__(234); Matter.Common = __webpack_require__(44); -Matter.Engine = __webpack_require__(1408); -Matter.Events = __webpack_require__(250); -Matter.Sleeping = __webpack_require__(249); -Matter.Plugin = __webpack_require__(1308); +Matter.Engine = __webpack_require__(1412); +Matter.Events = __webpack_require__(251); +Matter.Sleeping = __webpack_require__(250); +Matter.Plugin = __webpack_require__(1312); -Matter.Bodies = __webpack_require__(114); -Matter.Composites = __webpack_require__(1304); +Matter.Bodies = __webpack_require__(116); +Matter.Composites = __webpack_require__(1308); -Matter.Axes = __webpack_require__(540); -Matter.Bounds = __webpack_require__(102); -Matter.Svg = __webpack_require__(1305); -Matter.Vector = __webpack_require__(101); +Matter.Axes = __webpack_require__(542); +Matter.Bounds = __webpack_require__(103); +Matter.Svg = __webpack_require__(1309); +Matter.Vector = __webpack_require__(102); Matter.Vertices = __webpack_require__(88); // aliases @@ -184912,7 +185272,7 @@ module.exports = Matter; /***/ }), -/* 1308 */ +/* 1312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185262,7 +185622,7 @@ var Common = __webpack_require__(44); /***/ }), -/* 1309 */ +/* 1313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185282,8 +185642,8 @@ var World = {}; module.exports = World; -var Composite = __webpack_require__(156); -var Constraint = __webpack_require__(232); +var Composite = __webpack_require__(158); +var Constraint = __webpack_require__(234); var Common = __webpack_require__(44); (function() { @@ -185415,7 +185775,7 @@ var Common = __webpack_require__(44); /***/ }), -/* 1310 */ +/* 1314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185428,8 +185788,8 @@ var Grid = {}; module.exports = Grid; -var Pair = __webpack_require__(500); -var Detector = __webpack_require__(542); +var Pair = __webpack_require__(501); +var Detector = __webpack_require__(544); var Common = __webpack_require__(44); (function() { @@ -185742,7 +186102,7 @@ var Common = __webpack_require__(44); /***/ }), -/* 1311 */ +/* 1315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185755,7 +186115,7 @@ var Pairs = {}; module.exports = Pairs; -var Pair = __webpack_require__(500); +var Pair = __webpack_require__(501); var Common = __webpack_require__(44); (function() { @@ -185907,7 +186267,7 @@ var Common = __webpack_require__(44); /***/ }), -/* 1312 */ +/* 1316 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185921,9 +186281,9 @@ var Resolver = {}; module.exports = Resolver; var Vertices = __webpack_require__(88); -var Vector = __webpack_require__(101); +var Vector = __webpack_require__(102); var Common = __webpack_require__(44); -var Bounds = __webpack_require__(102); +var Bounds = __webpack_require__(103); (function() { @@ -186263,7 +186623,7 @@ var Bounds = __webpack_require__(102); /***/ }), -/* 1313 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186278,17 +186638,17 @@ var Bounds = __webpack_require__(102); module.exports = { - BasePlugin: __webpack_require__(501), - DefaultPlugins: __webpack_require__(182), + BasePlugin: __webpack_require__(502), + DefaultPlugins: __webpack_require__(184), PluginCache: __webpack_require__(23), - PluginManager: __webpack_require__(380), - ScenePlugin: __webpack_require__(1314) + PluginManager: __webpack_require__(381), + ScenePlugin: __webpack_require__(1318) }; /***/ }), -/* 1314 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186297,7 +186657,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(501); +var BasePlugin = __webpack_require__(502); var Class = __webpack_require__(0); var SceneEvents = __webpack_require__(20); @@ -186416,7 +186776,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1315 */ +/* 1319 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186426,7 +186786,7 @@ module.exports = ScenePlugin; */ var Extend = __webpack_require__(19); -var CONST = __webpack_require__(185); +var CONST = __webpack_require__(187); /** * @namespace Phaser.Scale @@ -186454,12 +186814,12 @@ var CONST = __webpack_require__(185); var Scale = { - Center: __webpack_require__(369), - Events: __webpack_require__(93), - Orientation: __webpack_require__(370), - ScaleManager: __webpack_require__(381), - ScaleModes: __webpack_require__(371), - Zoom: __webpack_require__(372) + Center: __webpack_require__(370), + Events: __webpack_require__(94), + Orientation: __webpack_require__(371), + ScaleManager: __webpack_require__(382), + ScaleModes: __webpack_require__(372), + Zoom: __webpack_require__(373) }; @@ -186472,7 +186832,7 @@ module.exports = Scale; /***/ }), -/* 1316 */ +/* 1320 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186481,7 +186841,7 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(132); +var CONST = __webpack_require__(133); var Extend = __webpack_require__(19); /** @@ -186491,12 +186851,12 @@ var Extend = __webpack_require__(19); var Scene = { Events: __webpack_require__(20), - GetPhysicsPlugins: __webpack_require__(385), - GetScenePlugins: __webpack_require__(386), - SceneManager: __webpack_require__(383), - ScenePlugin: __webpack_require__(1317), - Settings: __webpack_require__(387), - Systems: __webpack_require__(188) + GetPhysicsPlugins: __webpack_require__(386), + GetScenePlugins: __webpack_require__(387), + SceneManager: __webpack_require__(384), + ScenePlugin: __webpack_require__(1321), + Settings: __webpack_require__(388), + Systems: __webpack_require__(190) }; @@ -186507,7 +186867,7 @@ module.exports = Scene; /***/ }), -/* 1317 */ +/* 1321 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187517,7 +187877,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1318 */ +/* 1322 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187532,19 +187892,19 @@ module.exports = ScenePlugin; module.exports = { - Events: __webpack_require__(404), - List: __webpack_require__(136), - Map: __webpack_require__(121), - ProcessQueue: __webpack_require__(195), - RTree: __webpack_require__(490), - Set: __webpack_require__(140), - Size: __webpack_require__(382) + Events: __webpack_require__(405), + List: __webpack_require__(137), + Map: __webpack_require__(92), + ProcessQueue: __webpack_require__(197), + RTree: __webpack_require__(491), + Set: __webpack_require__(141), + Size: __webpack_require__(383) }; /***/ }), -/* 1319 */ +/* 1323 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187554,7 +187914,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var FilterMode = __webpack_require__(1320); +var FilterMode = __webpack_require__(1324); /** * @namespace Phaser.Textures @@ -187580,14 +187940,14 @@ var FilterMode = __webpack_require__(1320); var Textures = { - CanvasTexture: __webpack_require__(389), - Events: __webpack_require__(129), + CanvasTexture: __webpack_require__(390), + Events: __webpack_require__(130), FilterMode: FilterMode, - Frame: __webpack_require__(96), - Parsers: __webpack_require__(391), - Texture: __webpack_require__(190), - TextureManager: __webpack_require__(388), - TextureSource: __webpack_require__(390) + Frame: __webpack_require__(97), + Parsers: __webpack_require__(392), + Texture: __webpack_require__(192), + TextureManager: __webpack_require__(389), + TextureSource: __webpack_require__(391) }; @@ -187597,7 +187957,7 @@ module.exports = Textures; /***/ }), -/* 1320 */ +/* 1324 */ /***/ (function(module, exports) { /** @@ -187641,7 +188001,7 @@ module.exports = CONST; /***/ }), -/* 1321 */ +/* 1325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187656,30 +188016,30 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(148), - Parsers: __webpack_require__(1351), + Components: __webpack_require__(149), + Parsers: __webpack_require__(1355), Formats: __webpack_require__(33), - ImageCollection: __webpack_require__(512), - ParseToTilemap: __webpack_require__(238), + ImageCollection: __webpack_require__(513), + ParseToTilemap: __webpack_require__(240), Tile: __webpack_require__(75), - Tilemap: __webpack_require__(521), - TilemapCreator: __webpack_require__(1365), - TilemapFactory: __webpack_require__(1366), - Tileset: __webpack_require__(106), + Tilemap: __webpack_require__(522), + TilemapCreator: __webpack_require__(1369), + TilemapFactory: __webpack_require__(1370), + Tileset: __webpack_require__(107), - LayerData: __webpack_require__(104), - MapData: __webpack_require__(105), - ObjectLayer: __webpack_require__(515), + LayerData: __webpack_require__(105), + MapData: __webpack_require__(106), + ObjectLayer: __webpack_require__(516), - DynamicTilemapLayer: __webpack_require__(522), - StaticTilemapLayer: __webpack_require__(523) + DynamicTilemapLayer: __webpack_require__(523), + StaticTilemapLayer: __webpack_require__(524) }; /***/ }), -/* 1322 */ +/* 1326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187744,7 +188104,7 @@ module.exports = Copy; /***/ }), -/* 1323 */ +/* 1327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187753,10 +188113,10 @@ module.exports = Copy; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(150); -var TileToWorldY = __webpack_require__(151); +var TileToWorldX = __webpack_require__(151); +var TileToWorldY = __webpack_require__(152); var GetTilesWithin = __webpack_require__(24); -var ReplaceByIndex = __webpack_require__(502); +var ReplaceByIndex = __webpack_require__(503); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -187831,7 +188191,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 1324 */ +/* 1328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187840,8 +188200,8 @@ module.exports = CreateFromTiles; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SnapFloor = __webpack_require__(94); -var SnapCeil = __webpack_require__(342); +var SnapFloor = __webpack_require__(95); +var SnapCeil = __webpack_require__(343); /** * Returns the tiles in the given layer that are within the camera's viewport. This is used internally. @@ -187987,7 +188347,7 @@ module.exports = CullTiles; /***/ }), -/* 1325 */ +/* 1329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188040,7 +188400,7 @@ module.exports = Fill; /***/ }), -/* 1326 */ +/* 1330 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188086,7 +188446,7 @@ module.exports = FilterTiles; /***/ }), -/* 1327 */ +/* 1331 */ /***/ (function(module, exports) { /** @@ -188173,7 +188533,7 @@ module.exports = FindByIndex; /***/ }), -/* 1328 */ +/* 1332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188226,7 +188586,7 @@ module.exports = FindTile; /***/ }), -/* 1329 */ +/* 1333 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188275,7 +188635,7 @@ module.exports = ForEachTile; /***/ }), -/* 1330 */ +/* 1334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188284,7 +188644,7 @@ module.exports = ForEachTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(149); +var GetTileAt = __webpack_require__(150); var WorldToTileX = __webpack_require__(66); var WorldToTileY = __webpack_require__(67); @@ -188315,7 +188675,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1331 */ +/* 1335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188324,12 +188684,12 @@ module.exports = GetTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Geom = __webpack_require__(447); +var Geom = __webpack_require__(448); var GetTilesWithin = __webpack_require__(24); -var Intersects = __webpack_require__(448); +var Intersects = __webpack_require__(449); var NOOP = __webpack_require__(1); -var TileToWorldX = __webpack_require__(150); -var TileToWorldY = __webpack_require__(151); +var TileToWorldX = __webpack_require__(151); +var TileToWorldY = __webpack_require__(152); var WorldToTileX = __webpack_require__(66); var WorldToTileY = __webpack_require__(67); @@ -188438,7 +188798,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1332 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188487,7 +188847,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1333 */ +/* 1337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188496,7 +188856,7 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(503); +var HasTileAt = __webpack_require__(504); var WorldToTileX = __webpack_require__(66); var WorldToTileY = __webpack_require__(67); @@ -188526,7 +188886,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1334 */ +/* 1338 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188535,7 +188895,7 @@ module.exports = HasTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PutTileAt = __webpack_require__(234); +var PutTileAt = __webpack_require__(236); var WorldToTileX = __webpack_require__(66); var WorldToTileY = __webpack_require__(67); @@ -188569,7 +188929,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1335 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188579,7 +188939,7 @@ module.exports = PutTileAtWorldXY; */ var CalculateFacesWithin = __webpack_require__(53); -var PutTileAt = __webpack_require__(234); +var PutTileAt = __webpack_require__(236); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -188632,7 +188992,7 @@ module.exports = PutTilesAt; /***/ }), -/* 1336 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188642,7 +189002,7 @@ module.exports = PutTilesAt; */ var GetTilesWithin = __webpack_require__(24); -var GetRandom = __webpack_require__(194); +var GetRandom = __webpack_require__(196); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -188690,7 +189050,7 @@ module.exports = Randomize; /***/ }), -/* 1337 */ +/* 1341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188699,7 +189059,7 @@ module.exports = Randomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(504); +var RemoveTileAt = __webpack_require__(505); var WorldToTileX = __webpack_require__(66); var WorldToTileY = __webpack_require__(67); @@ -188731,7 +189091,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1338 */ +/* 1342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188741,7 +189101,7 @@ module.exports = RemoveTileAtWorldXY; */ var GetTilesWithin = __webpack_require__(24); -var Color = __webpack_require__(363); +var Color = __webpack_require__(364); var defaultTileColor = new Color(105, 210, 231, 150); var defaultCollidingTileColor = new Color(243, 134, 48, 200); @@ -188819,7 +189179,7 @@ module.exports = RenderDebug; /***/ }), -/* 1339 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188830,7 +189190,7 @@ module.exports = RenderDebug; var SetTileCollision = __webpack_require__(65); var CalculateFacesWithin = __webpack_require__(53); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(153); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -188887,7 +189247,7 @@ module.exports = SetCollision; /***/ }), -/* 1340 */ +/* 1344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188898,7 +189258,7 @@ module.exports = SetCollision; var SetTileCollision = __webpack_require__(65); var CalculateFacesWithin = __webpack_require__(53); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(153); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -188961,7 +189321,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1341 */ +/* 1345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188972,7 +189332,7 @@ module.exports = SetCollisionBetween; var SetTileCollision = __webpack_require__(65); var CalculateFacesWithin = __webpack_require__(53); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(153); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -189017,7 +189377,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1342 */ +/* 1346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189028,7 +189388,7 @@ module.exports = SetCollisionByExclusion; var SetTileCollision = __webpack_require__(65); var CalculateFacesWithin = __webpack_require__(53); -var HasValue = __webpack_require__(113); +var HasValue = __webpack_require__(115); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -189091,7 +189451,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1343 */ +/* 1347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189150,7 +189510,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1344 */ +/* 1348 */ /***/ (function(module, exports) { /** @@ -189196,7 +189556,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1345 */ +/* 1349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189237,7 +189597,7 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 1346 */ +/* 1350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189247,7 +189607,7 @@ module.exports = SetTileLocationCallback; */ var GetTilesWithin = __webpack_require__(24); -var ShuffleArray = __webpack_require__(119); +var ShuffleArray = __webpack_require__(121); /** * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given @@ -189282,7 +189642,7 @@ module.exports = Shuffle; /***/ }), -/* 1347 */ +/* 1351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189333,7 +189693,7 @@ module.exports = SwapByIndex; /***/ }), -/* 1348 */ +/* 1352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189342,8 +189702,8 @@ module.exports = SwapByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(150); -var TileToWorldY = __webpack_require__(151); +var TileToWorldX = __webpack_require__(151); +var TileToWorldY = __webpack_require__(152); var Vector2 = __webpack_require__(3); /** @@ -189376,7 +189736,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 1349 */ +/* 1353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189458,7 +189818,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 1350 */ +/* 1354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189502,7 +189862,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 1351 */ +/* 1355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189517,18 +189877,18 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(505), - Parse2DArray: __webpack_require__(235), - ParseCSV: __webpack_require__(506), + Parse: __webpack_require__(506), + Parse2DArray: __webpack_require__(237), + ParseCSV: __webpack_require__(507), - Impact: __webpack_require__(1352), - Tiled: __webpack_require__(1353) + Impact: __webpack_require__(1356), + Tiled: __webpack_require__(1357) }; /***/ }), -/* 1352 */ +/* 1356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189543,15 +189903,15 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(519), - ParseTilesets: __webpack_require__(520), - ParseWeltmeister: __webpack_require__(518) + ParseTileLayers: __webpack_require__(520), + ParseTilesets: __webpack_require__(521), + ParseWeltmeister: __webpack_require__(519) }; /***/ }), -/* 1353 */ +/* 1357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189566,23 +189926,23 @@ module.exports = { module.exports = { - AssignTileProperties: __webpack_require__(517), - Base64Decode: __webpack_require__(509), - BuildTilesetIndex: __webpack_require__(516), - CreateGroupLayer: __webpack_require__(153), - ParseGID: __webpack_require__(236), - ParseImageLayers: __webpack_require__(510), - ParseJSONTiled: __webpack_require__(507), - ParseObject: __webpack_require__(237), - ParseObjectLayers: __webpack_require__(514), - ParseTileLayers: __webpack_require__(508), - ParseTilesets: __webpack_require__(511) + AssignTileProperties: __webpack_require__(518), + Base64Decode: __webpack_require__(510), + BuildTilesetIndex: __webpack_require__(517), + CreateGroupLayer: __webpack_require__(154), + ParseGID: __webpack_require__(238), + ParseImageLayers: __webpack_require__(511), + ParseJSONTiled: __webpack_require__(508), + ParseObject: __webpack_require__(239), + ParseObjectLayers: __webpack_require__(515), + ParseTileLayers: __webpack_require__(509), + ParseTilesets: __webpack_require__(512) }; /***/ }), -/* 1354 */ +/* 1358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189596,12 +189956,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1355); + renderWebGL = __webpack_require__(1359); } if (true) { - renderCanvas = __webpack_require__(1356); + renderCanvas = __webpack_require__(1360); } module.exports = { @@ -189613,7 +189973,7 @@ module.exports = { /***/ }), -/* 1355 */ +/* 1359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189652,7 +190012,7 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer } var gidMap = src.gidMap; - var pipeline = src.pipeline; + var pipeline = renderer.pipelines.set(src.pipeline); var getTint = Utils.getTintAppendFloatAlphaAndSwap; @@ -189667,8 +190027,6 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer var tilesets = src.tileset; - renderer.setPipeline(pipeline); - // Loop through each tileset in this layer, drawing just the tiles that are in that set each time // Doing it this way around allows us to batch tiles using the same tileset for (var c = 0; c < tilesets.length; c++) @@ -189734,7 +190092,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1356 */ +/* 1360 */ /***/ (function(module, exports) { /** @@ -189866,7 +190224,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1357 */ +/* 1361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189880,12 +190238,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1358); + renderWebGL = __webpack_require__(1362); } if (true) { - renderCanvas = __webpack_require__(1364); + renderCanvas = __webpack_require__(1368); } module.exports = { @@ -189897,7 +190255,7 @@ module.exports = { /***/ }), -/* 1358 */ +/* 1362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189906,10 +190264,10 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Identity = __webpack_require__(1359); -var Scale = __webpack_require__(1361); -var Translate = __webpack_require__(1362); -var ViewLoad2D = __webpack_require__(1363); +var Identity = __webpack_require__(1363); +var Scale = __webpack_require__(1365); +var Translate = __webpack_require__(1366); +var ViewLoad2D = __webpack_require__(1367); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -189943,7 +190301,7 @@ var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPerc Scale(src, src.scaleX, src.scaleY, 1); ViewLoad2D(src, camera.matrix.matrix); - renderer.setPipeline(pipeline); + renderer.pipelines.set(pipeline); // The above alters the uniforms, so make sure we call it _after_ setting the MVP stuff above renderer.setMatrix4(pipeline.program, 'uModelMatrix', false, src.modelMatrix); @@ -189992,7 +190350,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1359 */ +/* 1363 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190001,7 +190359,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetIdentity = __webpack_require__(1360); +var SetIdentity = __webpack_require__(1364); /** * Loads an identity matrix into the model matrix. @@ -190026,7 +190384,7 @@ module.exports = Identity; /***/ }), -/* 1360 */ +/* 1364 */ /***/ (function(module, exports) { /** @@ -190067,7 +190425,7 @@ module.exports = SetIdentity; /***/ }), -/* 1361 */ +/* 1365 */ /***/ (function(module, exports) { /** @@ -190115,7 +190473,7 @@ module.exports = Scale; /***/ }), -/* 1362 */ +/* 1366 */ /***/ (function(module, exports) { /** @@ -190155,7 +190513,7 @@ module.exports = Translate; /***/ }), -/* 1363 */ +/* 1367 */ /***/ (function(module, exports) { /** @@ -190205,7 +190563,7 @@ module.exports = ViewLoad2D; /***/ }), -/* 1364 */ +/* 1368 */ /***/ (function(module, exports) { /** @@ -190339,7 +190697,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1365 */ +/* 1369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190349,7 +190707,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; */ var GameObjectCreator = __webpack_require__(16); -var ParseToTilemap = __webpack_require__(238); +var ParseToTilemap = __webpack_require__(240); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -190383,7 +190741,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1366 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190393,7 +190751,7 @@ GameObjectCreator.register('tilemap', function (config) */ var GameObjectFactory = __webpack_require__(5); -var ParseToTilemap = __webpack_require__(238); +var ParseToTilemap = __webpack_require__(240); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -190449,7 +190807,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1367 */ +/* 1371 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190464,14 +190822,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1368), - TimerEvent: __webpack_require__(524) + Clock: __webpack_require__(1372), + TimerEvent: __webpack_require__(525) }; /***/ }), -/* 1368 */ +/* 1372 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190483,8 +190841,8 @@ module.exports = { var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); -var TimerEvent = __webpack_require__(524); -var Remove = __webpack_require__(95); +var TimerEvent = __webpack_require__(525); +var Remove = __webpack_require__(96); /** * @classdesc @@ -190927,7 +191285,7 @@ module.exports = Clock; /***/ }), -/* 1369 */ +/* 1373 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190945,13 +191303,13 @@ var Extend = __webpack_require__(19); var Tweens = { - Builders: __webpack_require__(1370), - Events: __webpack_require__(243), + Builders: __webpack_require__(1374), + Events: __webpack_require__(245), - TweenManager: __webpack_require__(1386), - Tween: __webpack_require__(242), - TweenData: __webpack_require__(244), - Timeline: __webpack_require__(530) + TweenManager: __webpack_require__(1390), + Tween: __webpack_require__(244), + TweenData: __webpack_require__(246), + Timeline: __webpack_require__(531) }; @@ -190962,7 +191320,7 @@ module.exports = Tweens; /***/ }), -/* 1370 */ +/* 1374 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190979,21 +191337,21 @@ module.exports = { GetBoolean: __webpack_require__(90), GetEaseFunction: __webpack_require__(71), - GetNewValue: __webpack_require__(154), - GetProps: __webpack_require__(525), - GetTargets: __webpack_require__(239), - GetTweens: __webpack_require__(526), - GetValueOp: __webpack_require__(240), - NumberTweenBuilder: __webpack_require__(527), - StaggerBuilder: __webpack_require__(528), - TimelineBuilder: __webpack_require__(529), - TweenBuilder: __webpack_require__(155) + GetNewValue: __webpack_require__(155), + GetProps: __webpack_require__(526), + GetTargets: __webpack_require__(241), + GetTweens: __webpack_require__(527), + GetValueOp: __webpack_require__(242), + NumberTweenBuilder: __webpack_require__(528), + StaggerBuilder: __webpack_require__(529), + TimelineBuilder: __webpack_require__(530), + TweenBuilder: __webpack_require__(156) }; /***/ }), -/* 1371 */ +/* 1375 */ /***/ (function(module, exports) { /** @@ -191071,7 +191429,7 @@ module.exports = [ /***/ }), -/* 1372 */ +/* 1376 */ /***/ (function(module, exports) { /** @@ -191107,7 +191465,7 @@ module.exports = 'complete'; /***/ }), -/* 1373 */ +/* 1377 */ /***/ (function(module, exports) { /** @@ -191144,7 +191502,7 @@ module.exports = 'loop'; /***/ }), -/* 1374 */ +/* 1378 */ /***/ (function(module, exports) { /** @@ -191181,7 +191539,7 @@ module.exports = 'pause'; /***/ }), -/* 1375 */ +/* 1379 */ /***/ (function(module, exports) { /** @@ -191218,7 +191576,7 @@ module.exports = 'resume'; /***/ }), -/* 1376 */ +/* 1380 */ /***/ (function(module, exports) { /** @@ -191254,7 +191612,7 @@ module.exports = 'start'; /***/ }), -/* 1377 */ +/* 1381 */ /***/ (function(module, exports) { /** @@ -191291,7 +191649,7 @@ module.exports = 'update'; /***/ }), -/* 1378 */ +/* 1382 */ /***/ (function(module, exports) { /** @@ -191331,7 +191689,7 @@ module.exports = 'active'; /***/ }), -/* 1379 */ +/* 1383 */ /***/ (function(module, exports) { /** @@ -191372,7 +191730,7 @@ module.exports = 'complete'; /***/ }), -/* 1380 */ +/* 1384 */ /***/ (function(module, exports) { /** @@ -191416,7 +191774,7 @@ module.exports = 'loop'; /***/ }), -/* 1381 */ +/* 1385 */ /***/ (function(module, exports) { /** @@ -191461,7 +191819,7 @@ module.exports = 'repeat'; /***/ }), -/* 1382 */ +/* 1386 */ /***/ (function(module, exports) { /** @@ -191501,7 +191859,7 @@ module.exports = 'start'; /***/ }), -/* 1383 */ +/* 1387 */ /***/ (function(module, exports) { /** @@ -191537,7 +191895,7 @@ module.exports = 'stop'; /***/ }), -/* 1384 */ +/* 1388 */ /***/ (function(module, exports) { /** @@ -191580,7 +191938,7 @@ module.exports = 'update'; /***/ }), -/* 1385 */ +/* 1389 */ /***/ (function(module, exports) { /** @@ -191626,7 +191984,7 @@ module.exports = 'yoyo'; /***/ }), -/* 1386 */ +/* 1390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -191635,15 +191993,15 @@ module.exports = 'yoyo'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(95); +var ArrayRemove = __webpack_require__(96); var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(527); +var NumberTweenBuilder = __webpack_require__(528); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(20); -var StaggerBuilder = __webpack_require__(528); -var TimelineBuilder = __webpack_require__(529); +var StaggerBuilder = __webpack_require__(529); +var TimelineBuilder = __webpack_require__(530); var TWEEN_CONST = __webpack_require__(91); -var TweenBuilder = __webpack_require__(155); +var TweenBuilder = __webpack_require__(156); /** * @classdesc @@ -192415,7 +192773,7 @@ module.exports = TweenManager; /***/ }), -/* 1387 */ +/* 1391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192430,17 +192788,17 @@ module.exports = TweenManager; module.exports = { - Array: __webpack_require__(192), - Base64: __webpack_require__(1388), - Objects: __webpack_require__(1390), - String: __webpack_require__(1394), + Array: __webpack_require__(194), + Base64: __webpack_require__(1392), + Objects: __webpack_require__(1394), + String: __webpack_require__(1398), NOOP: __webpack_require__(1) }; /***/ }), -/* 1388 */ +/* 1392 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192455,14 +192813,14 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1389), - Base64ToArrayBuffer: __webpack_require__(399) + ArrayBufferToBase64: __webpack_require__(1393), + Base64ToArrayBuffer: __webpack_require__(400) }; /***/ }), -/* 1389 */ +/* 1393 */ /***/ (function(module, exports) { /** @@ -192520,7 +192878,7 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1390 */ +/* 1394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192539,22 +192897,22 @@ module.exports = { Extend: __webpack_require__(19), GetAdvancedValue: __webpack_require__(15), GetFastValue: __webpack_require__(2), - GetMinMaxValue: __webpack_require__(1391), + GetMinMaxValue: __webpack_require__(1395), GetValue: __webpack_require__(6), - HasAll: __webpack_require__(1392), - HasAny: __webpack_require__(421), - HasValue: __webpack_require__(113), + HasAll: __webpack_require__(1396), + HasAny: __webpack_require__(422), + HasValue: __webpack_require__(115), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(133), - MergeRight: __webpack_require__(1393), - Pick: __webpack_require__(513), - SetValue: __webpack_require__(444) + Merge: __webpack_require__(134), + MergeRight: __webpack_require__(1397), + Pick: __webpack_require__(514), + SetValue: __webpack_require__(445) }; /***/ }), -/* 1391 */ +/* 1395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192593,7 +192951,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1392 */ +/* 1396 */ /***/ (function(module, exports) { /** @@ -192630,7 +192988,7 @@ module.exports = HasAll; /***/ }), -/* 1393 */ +/* 1397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192673,7 +193031,7 @@ module.exports = MergeRight; /***/ }), -/* 1394 */ +/* 1398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192688,18 +193046,18 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1395), - Pad: __webpack_require__(171), - RemoveAt: __webpack_require__(1396), - Reverse: __webpack_require__(1397), - UppercaseFirst: __webpack_require__(189), - UUID: __webpack_require__(205) + Format: __webpack_require__(1399), + Pad: __webpack_require__(173), + RemoveAt: __webpack_require__(1400), + Reverse: __webpack_require__(1401), + UppercaseFirst: __webpack_require__(191), + UUID: __webpack_require__(207) }; /***/ }), -/* 1395 */ +/* 1399 */ /***/ (function(module, exports) { /** @@ -192734,7 +193092,7 @@ module.exports = Format; /***/ }), -/* 1396 */ +/* 1400 */ /***/ (function(module, exports) { /** @@ -192770,7 +193128,7 @@ module.exports = RemoveAt; /***/ }), -/* 1397 */ +/* 1401 */ /***/ (function(module, exports) { /** @@ -192799,7 +193157,7 @@ module.exports = Reverse; /***/ }), -/* 1398 */ +/* 1402 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192815,27 +193173,27 @@ module.exports = Reverse; module.exports = { - SoundManagerCreator: __webpack_require__(392), + SoundManagerCreator: __webpack_require__(393), Events: __webpack_require__(61), - BaseSound: __webpack_require__(135), - BaseSoundManager: __webpack_require__(134), + BaseSound: __webpack_require__(136), + BaseSoundManager: __webpack_require__(135), - WebAudioSound: __webpack_require__(400), - WebAudioSoundManager: __webpack_require__(398), + WebAudioSound: __webpack_require__(401), + WebAudioSoundManager: __webpack_require__(399), - HTML5AudioSound: __webpack_require__(395), - HTML5AudioSoundManager: __webpack_require__(393), + HTML5AudioSound: __webpack_require__(396), + HTML5AudioSoundManager: __webpack_require__(394), - NoAudioSound: __webpack_require__(397), - NoAudioSoundManager: __webpack_require__(396) + NoAudioSound: __webpack_require__(398), + NoAudioSoundManager: __webpack_require__(397) }; /***/ }), -/* 1399 */ +/* 1403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -193241,7 +193599,7 @@ module.exports = BodyBounds; /***/ }), -/* 1400 */ +/* 1404 */ /***/ (function(module, exports) { /** @@ -193911,7 +194269,7 @@ function points_eq(a,b,precision){ /***/ }), -/* 1401 */ +/* 1405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -193920,18 +194278,18 @@ function points_eq(a,b,precision){ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(114); +var Bodies = __webpack_require__(116); var Class = __webpack_require__(0); -var Composites = __webpack_require__(1304); -var Constraint = __webpack_require__(232); -var Svg = __webpack_require__(1305); -var MatterGameObject = __webpack_require__(1402); -var MatterImage = __webpack_require__(1403); -var MatterSprite = __webpack_require__(1404); -var MatterTileBody = __webpack_require__(1306); -var PhysicsEditorParser = __webpack_require__(1302); -var PhysicsJSONParser = __webpack_require__(1303); -var PointerConstraint = __webpack_require__(1405); +var Composites = __webpack_require__(1308); +var Constraint = __webpack_require__(234); +var Svg = __webpack_require__(1309); +var MatterGameObject = __webpack_require__(1406); +var MatterImage = __webpack_require__(1407); +var MatterSprite = __webpack_require__(1408); +var MatterTileBody = __webpack_require__(1310); +var PhysicsEditorParser = __webpack_require__(1306); +var PhysicsJSONParser = __webpack_require__(1307); +var PointerConstraint = __webpack_require__(1409); var Vertices = __webpack_require__(88); /** @@ -194841,7 +195199,7 @@ module.exports = Factory; /***/ }), -/* 1402 */ +/* 1406 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -194850,7 +195208,7 @@ module.exports = Factory; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Components = __webpack_require__(499); +var Components = __webpack_require__(500); var GetFastValue = __webpack_require__(2); var Vector2 = __webpack_require__(3); @@ -194967,7 +195325,7 @@ module.exports = MatterGameObject; /***/ }), -/* 1403 */ +/* 1407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -194977,11 +195335,11 @@ module.exports = MatterGameObject; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(499); +var Components = __webpack_require__(500); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); -var Image = __webpack_require__(112); -var Pipeline = __webpack_require__(163); +var Image = __webpack_require__(114); +var Pipeline = __webpack_require__(165); var Vector2 = __webpack_require__(3); /** @@ -195104,7 +195462,7 @@ var MatterImage = new Class({ this.setPosition(x, y); - this.initPipeline('MultiPipeline'); + this.initPipeline(); } }); @@ -195113,7 +195471,7 @@ module.exports = MatterImage; /***/ }), -/* 1404 */ +/* 1408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -195122,12 +195480,12 @@ module.exports = MatterImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AnimationState = __webpack_require__(248); +var AnimationState = __webpack_require__(157); var Class = __webpack_require__(0); -var Components = __webpack_require__(499); +var Components = __webpack_require__(500); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); -var Pipeline = __webpack_require__(163); +var Pipeline = __webpack_require__(165); var Sprite = __webpack_require__(76); var Vector2 = __webpack_require__(3); @@ -195256,7 +195614,7 @@ var MatterSprite = new Class({ this.setPosition(x, y); - this.initPipeline('MultiPipeline'); + this.initPipeline(); } }); @@ -195265,7 +195623,7 @@ module.exports = MatterSprite; /***/ }), -/* 1405 */ +/* 1409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -195274,15 +195632,15 @@ module.exports = MatterSprite; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bounds = __webpack_require__(102); +var Bounds = __webpack_require__(103); var Class = __webpack_require__(0); -var Composite = __webpack_require__(156); -var Constraint = __webpack_require__(232); -var Detector = __webpack_require__(542); -var Events = __webpack_require__(541); +var Composite = __webpack_require__(158); +var Constraint = __webpack_require__(234); +var Detector = __webpack_require__(544); +var Events = __webpack_require__(543); var InputEvents = __webpack_require__(56); -var Merge = __webpack_require__(133); -var Sleeping = __webpack_require__(249); +var Merge = __webpack_require__(134); +var Sleeping = __webpack_require__(250); var Vector2 = __webpack_require__(3); var Vertices = __webpack_require__(88); @@ -195653,7 +196011,7 @@ module.exports = PointerConstraint; /***/ }), -/* 1406 */ +/* 1410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -195666,7 +196024,7 @@ var Matter = {}; module.exports = Matter; -var Plugin = __webpack_require__(1308); +var Plugin = __webpack_require__(1312); var Common = __webpack_require__(44); (function() { @@ -195745,7 +196103,7 @@ var Common = __webpack_require__(44); /***/ }), -/* 1407 */ +/* 1411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -195760,10 +196118,10 @@ var Query = {}; module.exports = Query; -var Vector = __webpack_require__(101); -var SAT = __webpack_require__(543); -var Bounds = __webpack_require__(102); -var Bodies = __webpack_require__(114); +var Vector = __webpack_require__(102); +var SAT = __webpack_require__(545); +var Bounds = __webpack_require__(103); +var Bodies = __webpack_require__(116); var Vertices = __webpack_require__(88); (function() { @@ -195887,7 +196245,7 @@ var Vertices = __webpack_require__(88); /***/ }), -/* 1408 */ +/* 1412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -195904,15 +196262,15 @@ var Engine = {}; module.exports = Engine; -var World = __webpack_require__(1309); -var Sleeping = __webpack_require__(249); -var Resolver = __webpack_require__(1312); -var Pairs = __webpack_require__(1311); -var Metrics = __webpack_require__(1441); -var Grid = __webpack_require__(1310); -var Events = __webpack_require__(250); -var Composite = __webpack_require__(156); -var Constraint = __webpack_require__(232); +var World = __webpack_require__(1313); +var Sleeping = __webpack_require__(250); +var Resolver = __webpack_require__(1316); +var Pairs = __webpack_require__(1315); +var Metrics = __webpack_require__(1445); +var Grid = __webpack_require__(1314); +var Events = __webpack_require__(251); +var Composite = __webpack_require__(158); +var Constraint = __webpack_require__(234); var Common = __webpack_require__(44); var Body = __webpack_require__(64); @@ -196380,7 +196738,7 @@ var Body = __webpack_require__(64); /***/ }), -/* 1409 */ +/* 1413 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196389,21 +196747,21 @@ var Body = __webpack_require__(64); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(114); +var Bodies = __webpack_require__(116); var Body = __webpack_require__(64); var Class = __webpack_require__(0); var Common = __webpack_require__(44); -var Composite = __webpack_require__(156); -var Engine = __webpack_require__(1408); +var Composite = __webpack_require__(158); +var Engine = __webpack_require__(1412); var EventEmitter = __webpack_require__(12); -var Events = __webpack_require__(541); +var Events = __webpack_require__(543); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MatterBody = __webpack_require__(64); -var MatterEvents = __webpack_require__(250); -var MatterTileBody = __webpack_require__(1306); -var MatterWorld = __webpack_require__(1309); -var Vector = __webpack_require__(101); +var MatterEvents = __webpack_require__(251); +var MatterTileBody = __webpack_require__(1310); +var MatterWorld = __webpack_require__(1313); +var Vector = __webpack_require__(102); /** * @classdesc @@ -198601,16 +198959,16 @@ module.exports = World; /***/ }), -/* 1410 */ +/* 1414 */ /***/ (function(module, exports, __webpack_require__) { -/** +/* WEBPACK VAR INJECTION */(function(global) {/** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(544); +__webpack_require__(547); var CONST = __webpack_require__(34); var Extend = __webpack_require__(19); @@ -198621,38 +198979,38 @@ var Extend = __webpack_require__(19); var Phaser = { - Actions: __webpack_require__(251), - Animations: __webpack_require__(648), + Actions: __webpack_require__(252), + Animations: __webpack_require__(651), BlendModes: __webpack_require__(54), - Cache: __webpack_require__(659), - Cameras: __webpack_require__(662), - Core: __webpack_require__(750), + Cache: __webpack_require__(663), + Cameras: __webpack_require__(666), + Core: __webpack_require__(754), Class: __webpack_require__(0), - Create: __webpack_require__(815), - Curves: __webpack_require__(821), - Data: __webpack_require__(823), - Display: __webpack_require__(825), - DOM: __webpack_require__(843), - Events: __webpack_require__(844), - Game: __webpack_require__(846), - GameObjects: __webpack_require__(936), - Geom: __webpack_require__(447), - Input: __webpack_require__(1220), - Loader: __webpack_require__(1253), - Math: __webpack_require__(178), - Physics: __webpack_require__(1411), - Plugins: __webpack_require__(1313), - Renderer: __webpack_require__(1446), - Scale: __webpack_require__(1315), - ScaleModes: __webpack_require__(245), - Scene: __webpack_require__(384), - Scenes: __webpack_require__(1316), - Structs: __webpack_require__(1318), - Textures: __webpack_require__(1319), - Tilemaps: __webpack_require__(1321), - Time: __webpack_require__(1367), - Tweens: __webpack_require__(1369), - Utils: __webpack_require__(1387) + Create: __webpack_require__(819), + Curves: __webpack_require__(825), + Data: __webpack_require__(827), + Display: __webpack_require__(829), + DOM: __webpack_require__(847), + Events: __webpack_require__(848), + Game: __webpack_require__(850), + GameObjects: __webpack_require__(940), + Geom: __webpack_require__(448), + Input: __webpack_require__(1224), + Loader: __webpack_require__(1257), + Math: __webpack_require__(180), + Physics: __webpack_require__(1415), + Plugins: __webpack_require__(1317), + Renderer: __webpack_require__(1450), + Scale: __webpack_require__(1319), + ScaleModes: __webpack_require__(247), + Scene: __webpack_require__(385), + Scenes: __webpack_require__(1320), + Structs: __webpack_require__(1322), + Textures: __webpack_require__(1323), + Tilemaps: __webpack_require__(1325), + Time: __webpack_require__(1371), + Tweens: __webpack_require__(1373), + Utils: __webpack_require__(1391) }; @@ -198660,7 +199018,7 @@ var Phaser = { if (true) { - Phaser.Sound = __webpack_require__(1398); + Phaser.Sound = __webpack_require__(1402); } if (false) @@ -198684,15 +199042,18 @@ Phaser = Extend(false, Phaser, CONST); module.exports = Phaser; +global.Phaser = Phaser; + /* * "Documentation is like pizza: when it is good, it is very, very good; * and when it is bad, it is better than nothing." * -- Dick Brandon */ +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(546))) /***/ }), -/* 1411 */ +/* 1415 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198711,14 +199072,14 @@ module.exports = Phaser; module.exports = { - Arcade: __webpack_require__(1279), - Matter: __webpack_require__(1412) + Arcade: __webpack_require__(1283), + Matter: __webpack_require__(1416) }; /***/ }), -/* 1412 */ +/* 1416 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198733,27 +199094,27 @@ module.exports = { module.exports = { - BodyBounds: __webpack_require__(1399), - Components: __webpack_require__(499), - Events: __webpack_require__(541), - Factory: __webpack_require__(1401), - MatterGameObject: __webpack_require__(1402), - Image: __webpack_require__(1403), - Matter: __webpack_require__(1307), - MatterPhysics: __webpack_require__(1442), - PolyDecomp: __webpack_require__(1400), - Sprite: __webpack_require__(1404), - TileBody: __webpack_require__(1306), - PhysicsEditorParser: __webpack_require__(1302), - PhysicsJSONParser: __webpack_require__(1303), - PointerConstraint: __webpack_require__(1405), - World: __webpack_require__(1409) + BodyBounds: __webpack_require__(1403), + Components: __webpack_require__(500), + Events: __webpack_require__(543), + Factory: __webpack_require__(1405), + MatterGameObject: __webpack_require__(1406), + Image: __webpack_require__(1407), + Matter: __webpack_require__(1311), + MatterPhysics: __webpack_require__(1446), + PolyDecomp: __webpack_require__(1404), + Sprite: __webpack_require__(1408), + TileBody: __webpack_require__(1310), + PhysicsEditorParser: __webpack_require__(1306), + PhysicsJSONParser: __webpack_require__(1307), + PointerConstraint: __webpack_require__(1409), + World: __webpack_require__(1413) }; /***/ }), -/* 1413 */ +/* 1417 */ /***/ (function(module, exports) { /** @@ -198793,7 +199154,7 @@ module.exports = Bounce; /***/ }), -/* 1414 */ +/* 1418 */ /***/ (function(module, exports) { /** @@ -198979,7 +199340,7 @@ module.exports = Collision; /***/ }), -/* 1415 */ +/* 1419 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199135,7 +199496,7 @@ module.exports = Force; /***/ }), -/* 1416 */ +/* 1420 */ /***/ (function(module, exports) { /** @@ -199225,7 +199586,7 @@ module.exports = Friction; /***/ }), -/* 1417 */ +/* 1421 */ /***/ (function(module, exports) { /** @@ -199265,7 +199626,7 @@ module.exports = Gravity; /***/ }), -/* 1418 */ +/* 1422 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199347,7 +199708,7 @@ module.exports = Mass; /***/ }), -/* 1419 */ +/* 1423 */ /***/ (function(module, exports) { /** @@ -199401,7 +199762,7 @@ module.exports = Sensor; /***/ }), -/* 1420 */ +/* 1424 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199410,12 +199771,12 @@ module.exports = Sensor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(114); +var Bodies = __webpack_require__(116); var Body = __webpack_require__(64); -var FuzzyEquals = __webpack_require__(108); +var FuzzyEquals = __webpack_require__(109); var GetFastValue = __webpack_require__(2); -var PhysicsEditorParser = __webpack_require__(1302); -var PhysicsJSONParser = __webpack_require__(1303); +var PhysicsEditorParser = __webpack_require__(1306); +var PhysicsJSONParser = __webpack_require__(1307); var Vertices = __webpack_require__(88); /** @@ -199691,7 +200052,7 @@ module.exports = SetBody; /***/ }), -/* 1421 */ +/* 1425 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199700,9 +200061,9 @@ module.exports = SetBody; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(541); -var Sleeping = __webpack_require__(249); -var MatterEvents = __webpack_require__(250); +var Events = __webpack_require__(543); +var Sleeping = __webpack_require__(250); +var MatterEvents = __webpack_require__(251); /** * Enables a Matter-enabled Game Object to be able to go to sleep. Should be used as a mixin and not directly. @@ -199845,7 +200206,7 @@ module.exports = Sleep; /***/ }), -/* 1422 */ +/* 1426 */ /***/ (function(module, exports) { /** @@ -199879,7 +200240,7 @@ module.exports = 'afteradd'; /***/ }), -/* 1423 */ +/* 1427 */ /***/ (function(module, exports) { /** @@ -199913,7 +200274,7 @@ module.exports = 'afterremove'; /***/ }), -/* 1424 */ +/* 1428 */ /***/ (function(module, exports) { /** @@ -199946,7 +200307,7 @@ module.exports = 'afterupdate'; /***/ }), -/* 1425 */ +/* 1429 */ /***/ (function(module, exports) { /** @@ -199980,7 +200341,7 @@ module.exports = 'beforeadd'; /***/ }), -/* 1426 */ +/* 1430 */ /***/ (function(module, exports) { /** @@ -200014,7 +200375,7 @@ module.exports = 'beforeremove'; /***/ }), -/* 1427 */ +/* 1431 */ /***/ (function(module, exports) { /** @@ -200047,7 +200408,7 @@ module.exports = 'beforeupdate'; /***/ }), -/* 1428 */ +/* 1432 */ /***/ (function(module, exports) { /** @@ -200084,7 +200445,7 @@ module.exports = 'collisionactive'; /***/ }), -/* 1429 */ +/* 1433 */ /***/ (function(module, exports) { /** @@ -200121,7 +200482,7 @@ module.exports = 'collisionend'; /***/ }), -/* 1430 */ +/* 1434 */ /***/ (function(module, exports) { /** @@ -200158,7 +200519,7 @@ module.exports = 'collisionstart'; /***/ }), -/* 1431 */ +/* 1435 */ /***/ (function(module, exports) { /** @@ -200185,7 +200546,7 @@ module.exports = 'dragend'; /***/ }), -/* 1432 */ +/* 1436 */ /***/ (function(module, exports) { /** @@ -200212,7 +200573,7 @@ module.exports = 'drag'; /***/ }), -/* 1433 */ +/* 1437 */ /***/ (function(module, exports) { /** @@ -200240,7 +200601,7 @@ module.exports = 'dragstart'; /***/ }), -/* 1434 */ +/* 1438 */ /***/ (function(module, exports) { /** @@ -200263,7 +200624,7 @@ module.exports = 'pause'; /***/ }), -/* 1435 */ +/* 1439 */ /***/ (function(module, exports) { /** @@ -200286,7 +200647,7 @@ module.exports = 'resume'; /***/ }), -/* 1436 */ +/* 1440 */ /***/ (function(module, exports) { /** @@ -200319,7 +200680,7 @@ module.exports = 'sleepend'; /***/ }), -/* 1437 */ +/* 1441 */ /***/ (function(module, exports) { /** @@ -200352,7 +200713,7 @@ module.exports = 'sleepstart'; /***/ }), -/* 1438 */ +/* 1442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200407,7 +200768,7 @@ module.exports = Static; /***/ }), -/* 1439 */ +/* 1443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200418,8 +200779,8 @@ module.exports = Static; var Body = __webpack_require__(64); var MATH_CONST = __webpack_require__(13); -var WrapAngle = __webpack_require__(246); -var WrapAngleDegrees = __webpack_require__(247); +var WrapAngle = __webpack_require__(248); +var WrapAngleDegrees = __webpack_require__(249); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -200722,7 +201083,7 @@ module.exports = Transform; /***/ }), -/* 1440 */ +/* 1444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200823,7 +201184,7 @@ module.exports = Velocity; /***/ }), -/* 1441 */ +/* 1445 */ /***/ (function(module, exports, __webpack_require__) { // @if DEBUG @@ -200836,7 +201197,7 @@ var Metrics = {}; module.exports = Metrics; -var Composite = __webpack_require__(156); +var Composite = __webpack_require__(158); var Common = __webpack_require__(44); (function() { @@ -200922,7 +201283,7 @@ var Common = __webpack_require__(44); /***/ }), -/* 1442 */ +/* 1446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200931,39 +201292,39 @@ var Common = __webpack_require__(44); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(107); -var Axes = __webpack_require__(540); -var Bodies = __webpack_require__(114); +var ALIGN_CONST = __webpack_require__(108); +var Axes = __webpack_require__(542); +var Bodies = __webpack_require__(116); var Body = __webpack_require__(64); -var BodyBounds = __webpack_require__(1399); -var Bounds = __webpack_require__(102); +var BodyBounds = __webpack_require__(1403); +var Bounds = __webpack_require__(103); var Class = __webpack_require__(0); -var Composite = __webpack_require__(156); -var Composites = __webpack_require__(1304); -var Constraint = __webpack_require__(232); -var Detector = __webpack_require__(542); +var Composite = __webpack_require__(158); +var Composites = __webpack_require__(1308); +var Constraint = __webpack_require__(234); +var Detector = __webpack_require__(544); var DistanceBetween = __webpack_require__(55); -var Factory = __webpack_require__(1401); +var Factory = __webpack_require__(1405); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -var Grid = __webpack_require__(1310); -var MatterAttractors = __webpack_require__(1443); -var MatterCollisionEvents = __webpack_require__(1444); -var MatterLib = __webpack_require__(1406); -var MatterWrap = __webpack_require__(1445); -var Merge = __webpack_require__(133); -var Pair = __webpack_require__(500); -var Pairs = __webpack_require__(1311); -var Plugin = __webpack_require__(1308); +var Grid = __webpack_require__(1314); +var MatterAttractors = __webpack_require__(1447); +var MatterCollisionEvents = __webpack_require__(1448); +var MatterLib = __webpack_require__(1410); +var MatterWrap = __webpack_require__(1449); +var Merge = __webpack_require__(134); +var Pair = __webpack_require__(501); +var Pairs = __webpack_require__(1315); +var Plugin = __webpack_require__(1312); var PluginCache = __webpack_require__(23); -var Query = __webpack_require__(1407); -var Resolver = __webpack_require__(1312); -var SAT = __webpack_require__(543); +var Query = __webpack_require__(1411); +var Resolver = __webpack_require__(1316); +var SAT = __webpack_require__(545); var SceneEvents = __webpack_require__(20); -var Svg = __webpack_require__(1305); -var Vector = __webpack_require__(101); +var Svg = __webpack_require__(1309); +var Vector = __webpack_require__(102); var Vertices = __webpack_require__(88); -var World = __webpack_require__(1409); +var World = __webpack_require__(1413); /** * @classdesc @@ -202391,10 +202752,10 @@ module.exports = MatterPhysics; /***/ }), -/* 1443 */ +/* 1447 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(1307); +var Matter = __webpack_require__(1311); /** * An attractors plugin for matter.js. @@ -202550,7 +202911,7 @@ module.exports = MatterAttractors; /***/ }), -/* 1444 */ +/* 1448 */ /***/ (function(module, exports) { /** @@ -202683,10 +203044,10 @@ module.exports = MatterCollisionEvents; /***/ }), -/* 1445 */ +/* 1449 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(1307); +var Matter = __webpack_require__(1311); /** * A coordinate wrapping plugin for matter.js. @@ -202865,7 +203226,7 @@ module.exports = MatterWrap; */ /***/ }), -/* 1446 */ +/* 1450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202884,15 +203245,15 @@ module.exports = MatterWrap; module.exports = { - Canvas: __webpack_require__(1447), - Snapshot: __webpack_require__(1448), - WebGL: __webpack_require__(1449) + Canvas: __webpack_require__(1451), + Snapshot: __webpack_require__(1452), + WebGL: __webpack_require__(1453) }; /***/ }), -/* 1447 */ +/* 1451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202907,15 +203268,15 @@ module.exports = { module.exports = { - CanvasRenderer: __webpack_require__(531), - GetBlendModes: __webpack_require__(533), + CanvasRenderer: __webpack_require__(532), + GetBlendModes: __webpack_require__(534), SetTransform: __webpack_require__(28) }; /***/ }), -/* 1448 */ +/* 1452 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202930,14 +203291,14 @@ module.exports = { module.exports = { - Canvas: __webpack_require__(532), - WebGL: __webpack_require__(535) + Canvas: __webpack_require__(533), + WebGL: __webpack_require__(541) }; /***/ }), -/* 1449 */ +/* 1453 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202952,16 +203313,17 @@ module.exports = { module.exports = { + PipelineManager: __webpack_require__(536), + Pipelines: __webpack_require__(1454), Utils: __webpack_require__(10), - WebGLPipeline: __webpack_require__(109), - WebGLRenderer: __webpack_require__(534), - Pipelines: __webpack_require__(1450) + WebGLPipeline: __webpack_require__(111), + WebGLRenderer: __webpack_require__(535) }; /***/ }), -/* 1450 */ +/* 1454 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202970,21 +203332,32 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var CONST = __webpack_require__(110); +var Extend = __webpack_require__(19); + /** * @namespace Phaser.Renderer.WebGL.Pipelines */ -module.exports = { +var Pipelines = { - BitmapMaskPipeline: __webpack_require__(536), - LightPipeline: __webpack_require__(537), - SinglePipeline: __webpack_require__(539), - MultiPipeline: __webpack_require__(110), - RopePipeline: __webpack_require__(538), - ModelViewProjection: __webpack_require__(111) + BitmapMaskPipeline: __webpack_require__(537), + LightPipeline: __webpack_require__(538), + SinglePipeline: __webpack_require__(540), + MultiPipeline: __webpack_require__(112), + RopePipeline: __webpack_require__(539), + ModelViewProjection: __webpack_require__(113) }; +// Merge in the consts + +Pipelines = Extend(false, Pipelines, CONST); + +// Export it + +module.exports = Pipelines; + /***/ }) /******/ ]); diff --git a/dist/phaser.min.js b/dist/phaser.min.js index 7fc13c2b8..6cf9c1147 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 n={},s.m=i=[function(t,e){function r(t,e,i,n){for(var s in e)if(e.hasOwnProperty(s)){var r=(l=e,u=s,f=d=void 0,f=(c=i)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&f.value&&"object"==typeof f.value&&(f=f.value),!(!f||!((d=f).get&&"function"==typeof d.get||d.set&&"function"==typeof d.set))&&(void 0===f.enumerable&&(f.enumerable=!0),void 0===f.configurable&&(f.configurable=!0),f));if(!1!==r){if(o=(n||t).prototype,a=s,h=void 0,(h=Object.getOwnPropertyDescriptor(o,a))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,s,r)}else t.prototype[s]=e[s]}var o,a,h,l,u,c,d,f}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i=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){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;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var l=[],u=e;uthis.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(667),FADE_IN_COMPLETE:i(668),FADE_IN_START:i(669),FADE_OUT_COMPLETE:i(670),FADE_OUT_START:i(671),FLASH_COMPLETE:i(672),FLASH_START:i(673),PAN_COMPLETE:i(674),PAN_START:i(675),POST_RENDER:i(676),PRE_RENDER:i(677),ROTATE_COMPLETE:i(678),ROTATE_START:i(679),SHAKE_COMPLETE:i(680),SHAKE_START:i(681),ZOOM_COMPLETE:i(682),ZOOM_START:i(683)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e){var h={};t.exports=h,function(){h._nextId=0,h._seed=0,h._nowStartTime=+new Date,h.extend=function(t,e){for(var i,n="boolean"==typeof e?(i=2,e):(i=1,!0),s=i;s=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var d=i(149),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,l=f(t,e,i,n,null,s),u=0;u=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,s,r,o,a,h,l,u=e&&e.length,c=u?e[0]*i:t.length,d=g(t,0,c,i,!0),f=[];if(!d||d.next===d.prev)return f;if(u&&(d=function(t,e,i,n){var s,r,o,a,h,l=[];for(s=0,r=e.length;s=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&&o=n.x&&n.x>=u&&s!==n.x&&T(ri.x||n.x===i.x&&function(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}(i,n)))&&(i=n,d=h)),n=n.next,n!==l;);return i}(t,e))&&(i=E(e,t),v(e,e.next),v(i,i.next))}}(l[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.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=x(a,h,e,i,n),d=x(l,u,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,l=h.next;else if((t=h)===l){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!u(s,r)&&c(s,n,n.next,r)&&b(s,r)&&b(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return v(n)}(v(t),e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;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,i!==t;);return n}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||u(t,e)&&0=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function l(t){return 0=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(18),c=i(22),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,u),o&&((l=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return 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),this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e,i){var r=i(248),n=i(0),s=i(11),o=i(14),a=i(29),h=i(987),l=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,h],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=l},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return 0=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>l)?(u=Math.max(a.x,e),c=Math.max(a.y,i),b=d=Math.min(a.r,h)-u,E=f=Math.min(a.b,l)-c,T=r?p+(v-(u-a.x)-d):p+(u-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=u,i=c,n=d,s=f):E=b=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var _=this.source.width,A=this.source.height;return t.u0=Math.max(0,T/_),t.v0=Math.max(0,w/A),t.u1=Math.min(1,(T+b)/_),t.v1=Math.min(1,(w+E)/A),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=b,t.ch=E,t.width=n,t.height=s,t.flipX=r,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new 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.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(98),r=i(411),o=i(412),a=i(49),h=i(165),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var U=i(251),n=i(0),r=i(29),s=i(191),z=i(2),G=i(6),o=i(7),W=i(403),a=i(140),h=i(76),l=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?o(e[0])&&(i=e,e=null):o(e)&&(i=e,e=null),this.scene=t,this.children=new a,this.isParent=!0,this.type="Group",this.classType=z(i,"classType",h),this.name=z(i,"name",""),this.active=z(i,"active",!0),this.maxSize=z(i,"maxSize",-1),this.defaultKey=z(i,"defaultKey",null),this.defaultFrame=z(i,"defaultFrame",null),this.runChildUpdate=z(i,"runChildUpdate",!1),this.createCallback=z(i,"createCallback",null),this.removeCallback=z(i,"removeCallback",null),this.createMultipleCallback=z(i,"createMultipleCallback",null),this.internalCreateCallback=z(i,"internalCreateCallback",null),this.internalRemoveCallback=z(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;it.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e){t.exports=function(t,e,i){return 0<=t&&t=this.firstgid&&t=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(t){void 0===t&&(t=!1);var e=this.vertexBuffer,i=this.program,n=this.renderer;return n.setProgram(i),n.setVertexBuffer(e),this.setAttribPointers(t),this},setAttribPointers:function(t){void 0===t&&(t=!1);for(var e=this.gl,i=this.attributes,n=this.vertexSize,s=this.program,r=0;rthis.vertexCapacity&&this.flush();var N=this.setGameObject(t),Y=t._isTinted&&t.tintFill;this.batchQuad(A,C,M,P,O,R,L,F,l,u,c,d,D,k,I,B,Y,h,N)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,E,S,_,A,C,M,P,O,R){this.renderer.setPipeline(this,t);var L,F,D,k=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,N=m/i+A,Y=y/n+C,X=(m+x)/i+A,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,F=m=L.x,D=y=L.y,c&&(F=x-L.x-L.width),d&&!e.isRenderTexture&&(D=T-L.y-L.height),N=F/i+A,Y=D/n+C,X=(F+L.width)/i+A,U=(D+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!O&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,u,h,l),k.copyFrom(M.matrix),P?(k.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),k.multiply(I,B);var q=B.getX(W,V),K=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(q=Math.round(q),K=Math.round(K),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===R&&(R=this.renderer.setTexture2D(e)),this.batchQuad(q,K,Z,J,Q,$,tt,et,N,Y,X,U,w,b,E,S,_,e,R)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,u=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,u),p=h.getY(e,u),g=h.getX(l,u),v=h.getY(l,u),m=h.getX(l,i),y=h.getY(l,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,l=this.renderer.setTexture2D(h),u=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,u,u,u,u,2,h,l)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,b=this.fillTint;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,b.TL,b.TR,b.BL,b.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,c=this.tintEffect,d=0;d>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(292),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var l=i(6),u={},n={register:function(t,e,i,n,s){u[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return u[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in u){var r=u[s].plugin,o=u[s].mapping,a=u[s].settingsKey,h=u[s].configKey;l(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){u.hasOwnProperty(t)&&delete u[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1235),ANY_KEY_UP:i(1236),COMBO_MATCH:i(1237),DOWN:i(1238),KEY_DOWN:i(1239),KEY_UP:i(1240),UP:i(1241)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(226),r=i(76),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(233),CalculateFacesWithin:i(53),Copy:i(1322),CreateFromTiles:i(1323),CullTiles:i(1324),Fill:i(1325),FilterTiles:i(1326),FindByIndex:i(1327),FindTile:i(1328),ForEachTile:i(1329),GetTileAt:i(149),GetTileAtWorldXY:i(1330),GetTilesWithin:i(24),GetTilesWithinShape:i(1331),GetTilesWithinWorldXY:i(1332),HasTileAt:i(503),HasTileAtWorldXY:i(1333),IsInLayerBounds:i(103),PutTileAt:i(234),PutTileAtWorldXY:i(1334),PutTilesAt:i(1335),Randomize:i(1336),RemoveTileAt:i(504),RemoveTileAtWorldXY:i(1337),RenderDebug:i(1338),ReplaceByIndex:i(502),SetCollision:i(1339),SetCollisionBetween:i(1340),SetCollisionByExclusion:i(1341),SetCollisionByProperty:i(1342),SetCollisionFromCollisionGroup:i(1343),SetLayerCollisionIndex:i(152),SetTileCollision:i(65),SetTileIndexCallback:i(1344),SetTileLocationCallback:i(1345),Shuffle:i(1346),SwapByIndex:i(1347),TileToWorldX:i(150),TileToWorldXY:i(1348),TileToWorldY:i(151),WeightedRandomize:i(1349),WorldToTileX:i(66),WorldToTileXY:i(1350),WorldToTileY:i(67)}},function(t,e,i){var r=i(103);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var r=i(2);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=e.x+r(e,"startx",0)*t.tilewidth+r(e,"offsetx",0),s=e.y+r(e,"starty",0)*t.tileheight+r(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+s}}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var R=i(241),L=i(15),F=i(90),D=i(71),k=i(154),I=i(525),B=i(239),N=i(6),Y=i(240),X=i(242),U=i(244);t.exports=function(t,e,i){void 0===i&&(i=R);for(var n=i.targets?i.targets:B(e),s=I(e),r=k(e,"delay",i.delay),o=k(e,"duration",i.duration),a=N(e,"easeParams",i.easeParams),h=D(N(e,"ease",i.ease),a),l=k(e,"hold",i.hold),u=k(e,"repeat",i.repeat),c=k(e,"repeatDelay",i.repeatDelay),d=F(e,"yoyo",i.yoyo),f=F(e,"flipX",i.flipX),p=F(e,"flipY",i.flipY),g=[],v=0;v=(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(1+(s-r)).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(306),s=i(309),r=i(311),o=i(312);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var a=i(173);function h(t,e,i,n){var s=(t+6*e)%6,r=Math.min(s,4-s,1);return Math.round(255*(n-n*i*Math.max(0,r)))}t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=h(5,t,e,i),r=h(3,t,e,i),o=h(1,t,e,i);return n?n.setTo?n.setTo(s,r,o,n.alpha,!1):(n.r=s,n.g=r,n.b=o,n.color=a(s,r,o),n):{r:s,g:r,b:o,color:a(s,r,o)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.gl,a=this.frame,h=this.texture,l=this.camera,u=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=a.cutWidth),void 0===r&&(r=a.cutHeight);var c,d,f,p,g,v,m,y,x,T,w=255&(t>>16|0),b=255&(t>>8|0),E=255&(0|t);return l.preRender(1,1),o?(c=l._cx,d=l._cy,f=l._cw,p=l._ch,u.resetTextures(!0),u.pushScissor(c,d,f,-p),u.setFramebuffer(this.framebuffer,!1),g=this.pipeline,v=h.width,m=h.height,y=g.width/v,x=g.height/m,g.drawFillRect(i*y,(m-r-n)*x,s*y,r*x,S.getTintFromFloats(w/255,b/255,E/255,1),e),g.flush(),u.setFramebuffer(null,!1),u.popScissor()):(T=this.context,u.setContext(T),T.fillStyle="rgba("+w+","+b+","+E+","+e+")",T.fillRect(i+a.cutX,n+a.cutY,s,r),u.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,l,u=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),u?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),l=this.pipeline,g(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),g(l,0,l.width,l.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,l,u,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,l=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,l,l),u=this.pipeline,g(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),u.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),u.flush(),f.setFramebuffer(null,!1),f.popScissor(),g(u,0,u.width,u.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0e._dx?r<(s=t.right-e.x)&&!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,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!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,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.right||e.position.y>=t.bottom)}},function(t,e,i){var w={};t.exports=w;var o=i(88),b=i(101),a=i(249),h=i(102),l=i(540),u=i(44);w._warming=.4,w._torqueDampen=1,w._minLength=1e-6,w.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?b.add(e.bodyA.position,e.pointA):e.pointA,n=e.bodyB?b.add(e.bodyB.position,e.pointB):e.pointB,s=b.magnitude(b.sub(i,n));e.length=void 0!==e.length?e.length:s,e.id=e.id||u.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(0t&&(t=s.totalDuration),s.delayh.getTotalFrames()&&(s=0),r=h.frames[s],0!==s||this.forward||(r=h.getLastFrame()),this.currentFrame=r):console.warn("Missing animation: "+a),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){var i,n;return this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e):(this.delayCounter=e,this.play(t,!0)),this.parent},playAfterRepeat:function(t,e){var i,n;return void 0===e&&(e=1),this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e):this.play(t),this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent,s="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===s)return n;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(0this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick))for(var n=0;this.forward?i.nextFrame(this):i.previousFrame(this),n++,this.accumulator>this.nextTick&&n<60;);}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(r.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims&&this.anims.get(t)},exists:function(t){return this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new o(this,e,t),this.anims||(this.anims=new s),this.anims.set(e,i))),i},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=a},function(t,e,i){var u={};t.exports=u;var n=i(250);u._motionWakeThreshold=.18,u._motionSleepThreshold=.08,u._minBias=.9,u.update=function(t,e){for(var i=e*e*e,n=0;n=o.sleepThreshold&&u.set(o,!0)):0u._motionWakeThreshold*i&&u.set(a,!1)))}},u.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||n.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&n.trigger(t,"sleepEnd"))}},function(t,e,i){var n={};t.exports=n;var u=i(44);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;ne.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e){t.exports=function(t){var i=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(i,""),10)-parseInt(e.replace(i,""),10)}),t}},function(t,e,i){var n=i(170),s=i(0),r=i(121),o=i(12),a=i(120),h=i(21),T=i(2),d=i(6),f=i(171),p=i(301),l=new s({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var n,s=this.anims,r=this.mixes,o="string"==typeof t?t:t.key,a="string"==typeof e?e:e.key;return s.has(o)&&s.has(a)&&((n=(n=r.get(o))||{})[a]=i,r.set(o,n)),this},removeMix:function(t,e){var i,n=this.mixes,s="string"==typeof t?t:t.key,r=n.get(s);return r&&(e?(i="string"==typeof e?e:e.key,r.hasOwnProperty(i)&&delete r[i]):e||n.delete(s)),this},getMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s="string"==typeof e?e:e.key,r=i.get(n);return r&&r.hasOwnProperty(s)?r[s]:0},add:function(t,e){return this.anims.has(t)?console.warn("Animation key exists: "+t):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e)),this},exists:function(t){return this.anims.has(t)},createFromAseprite:function(g,v){var m=[],t=this.game.cache.json.get(g);if(!t)return m;var y=this,e=d(t,"meta",null),x=d(t,"frames",null);return e&&x&&d(e,"frameTags",[]).forEach(function(t){var e=[],i=T(t,"name",null),n=T(t,"from",0),s=T(t,"to",0),r=T(t,"direction","forward");if(i&&(!v||v&&-1d.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-l,this.lerp.x),p=T(p,i-u,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(l=Math.round(l),u=Math.round(u));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+l,this.y+u,this.rotation,a,a),h.translate(-l,-u),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=u(i,0,1),n=u(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,l=t.y-r;return this.midPoint.set(h,l),this.scrollX=h-o,this.scrollY=l-a,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(32);t.exports=function(t){var e=new o;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,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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(32);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(32);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(684),Flash:i(685),Pan:i(686),Shake:i(719),RotateTo:i(720),Zoom:i(721)}},function(t,e,i){t.exports={In:i(687),Out:i(688),InOut:i(689)}},function(t,e,i){t.exports={In:i(690),Out:i(691),InOut:i(692)}},function(t,e,i){t.exports={In:i(693),Out:i(694),InOut:i(695)}},function(t,e,i){t.exports={In:i(696),Out:i(697),InOut:i(698)}},function(t,e,i){t.exports={In:i(699),Out:i(700),InOut:i(701)}},function(t,e,i){t.exports={In:i(702),Out:i(703),InOut:i(704)}},function(t,e,i){t.exports=i(705)},function(t,e,i){t.exports={In:i(706),Out:i(707),InOut:i(708)}},function(t,e,i){t.exports={In:i(709),Out:i(710),InOut:i(711)}},function(t,e,i){t.exports={In:i(712),Out:i(713),InOut:i(714)}},function(t,e,i){t.exports={In:i(715),Out:i(716),InOut:i(717)}},function(t,e,i){t.exports=i(718)},function(t,e,i){var n=i(0),a=i(34),h=i(327),l=i(2),u=i(6),c=i(7),d=i(178),f=i(1),p=i(182),g=i(172),s=new n({initialize:function(t){void 0===t&&(t={});this.width=u(t,"width",1024),this.height=u(t,"height",768),this.zoom=u(t,"zoom",1),this.resolution=u(t,"resolution",1),this.parent=u(t,"parent",void 0),this.scaleMode=u(t,"scaleMode",0),this.expandParent=u(t,"expandParent",!0),this.autoRound=u(t,"autoRound",!1),this.autoCenter=u(t,"autoCenter",0),this.resizeInterval=u(t,"resizeInterval",500),this.fullscreenTarget=u(t,"fullscreenTarget",null),this.minWidth=u(t,"minWidth",0),this.maxWidth=u(t,"maxWidth",0),this.minHeight=u(t,"minHeight",0),this.maxHeight=u(t,"maxHeight",0);var e=u(t,"scale",null);e&&(this.width=u(e,"width",this.width),this.height=u(e,"height",this.height),this.zoom=u(e,"zoom",this.zoom),this.resolution=u(e,"resolution",this.resolution),this.parent=u(e,"parent",this.parent),this.scaleMode=u(e,"mode",this.scaleMode),this.expandParent=u(e,"expandParent",this.expandParent),this.autoRound=u(e,"autoRound",this.autoRound),this.autoCenter=u(e,"autoCenter",this.autoCenter),this.resizeInterval=u(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=u(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=u(e,"min.width",this.minWidth),this.maxWidth=u(e,"max.width",this.maxWidth),this.minHeight=u(e,"min.height",this.minHeight),this.maxHeight=u(e,"max.height",this.maxHeight)),this.renderType=u(t,"type",a.AUTO),this.canvas=u(t,"canvas",null),this.context=u(t,"context",null),this.canvasStyle=u(t,"canvasStyle",null),this.customEnvironment=u(t,"customEnvironment",!1),this.sceneConfig=u(t,"scene",null),this.seed=u(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=u(t,"title",""),this.gameURL=u(t,"url","https://phaser.io"),this.gameVersion=u(t,"version",""),this.autoFocus=u(t,"autoFocus",!0),this.domCreateContainer=u(t,"dom.createContainer",!1),this.domBehindCanvas=u(t,"dom.behindCanvas",!1),this.inputKeyboard=u(t,"input.keyboard",!0),this.inputKeyboardEventTarget=u(t,"input.keyboard.target",window),this.inputKeyboardCapture=u(t,"input.keyboard.capture",[]),this.inputMouse=u(t,"input.mouse",!0),this.inputMouseEventTarget=u(t,"input.mouse.target",null),this.inputMouseCapture=u(t,"input.mouse.capture",!0),this.inputTouch=u(t,"input.touch",h.input.touch),this.inputTouchEventTarget=u(t,"input.touch.target",null),this.inputTouchCapture=u(t,"input.touch.capture",!0),this.inputActivePointers=u(t,"input.activePointers",1),this.inputSmoothFactor=u(t,"input.smoothFactor",0),this.inputWindowEvents=u(t,"input.windowEvents",!0),this.inputGamepad=u(t,"input.gamepad",!1),this.inputGamepadEventTarget=u(t,"input.gamepad.target",window),this.disableContextMenu=u(t,"disableContextMenu",!1),this.audio=u(t,"audio"),this.hideBanner=!1===u(t,"banner",null),this.hidePhaser=u(t,"banner.hidePhaser",!1),this.bannerTextColor=u(t,"banner.text","#ffffff"),this.bannerBackgroundColor=u(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=u(t,"fps",null);var i=u(t,"render",t);this.antialias=u(i,"antialias",!0),this.antialiasGL=u(i,"antialiasGL",!0),this.mipmapFilter=u(i,"mipmapFilter","LINEAR"),this.desynchronized=u(i,"desynchronized",!1),this.roundPixels=u(i,"roundPixels",!1),this.pixelArt=u(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=u(i,"transparent",!1),this.clearBeforeRender=u(i,"clearBeforeRender",!0),this.premultipliedAlpha=u(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=u(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=u(i,"powerPreference","default"),this.batchSize=u(i,"batchSize",4096),this.maxTextures=u(i,"maxTextures",-1),this.maxLights=u(i,"maxLights",10);var n=u(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=u(t,"callbacks.preBoot",f),this.postBoot=u(t,"callbacks.postBoot",f),this.physics=u(t,"physics",{}),this.defaultPhysicsSystem=u(this.physics,"default",!1),this.loaderBaseURL=u(t,"loader.baseURL",""),this.loaderPath=u(t,"loader.path",""),this.loaderMaxParallelDownloads=u(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=u(t,"loader.crossOrigin",void 0),this.loaderResponseType=u(t,"loader.responseType",""),this.loaderAsync=u(t,"loader.async",!0),this.loaderUser=u(t,"loader.user",""),this.loaderPassword=u(t,"loader.password",""),this.loaderTimeout=u(t,"loader.timeout",0),this.loaderWithCredentials=u(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=u(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=l(s,"global",[]),this.installScenePlugins=l(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=u(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=u(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(124),browser:i(125),features:i(177),input:i(752),audio:i(753),video:i(754),fullscreen:i(755),canvasFeatures:i(328)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(349),l=a(26),u=a(34),c=a(177);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===u.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==u.HEADLESS)if(e.renderType===u.CANVAS||e.renderType!==u.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=u.CANVAS}else e.renderType=u.WEBGL;e.antialias||l.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=l.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==u.HEADLESS&&(i=a(531),n=a(534),e.renderType===u.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var l=i(34);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===l.CANVAS?e="Canvas":h.renderType===l.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+l.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+l.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(352),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(21);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(355),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),l=x(t,"postRender",null),u=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,u,c),a=o=!1),o&&(i.width=u,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,u,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],l=i[s>i.length-3?i.length-1:s+2];return e.set(u(r,o.x,a.x,h.x,l.x),u(r,o.y,a.y,h.y,l.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(94),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,l[a++]=(15&i)<<4|n>>2,l[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(135),s=i(0),r=i(61),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,l.strokeStyle="rgba("+g+","+v+","+m+","+u+")",l.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,l.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:l.beginPath();break;case x.CLOSE_PATH:l.closePath();break;case x.FILL_PATH:o||l.fill();break;case x.STROKE_PATH:o||l.stroke();break;case x.FILL_RECT:o?l.rect(a[y+1],a[y+2],a[y+3],a[y+4]):l.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.fill(),y+=6;break;case x.STROKE_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.stroke(),y+=6;break;case x.LINE_TO:l.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:l.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:l.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:l.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:l.save();break;case x.RESTORE:l.restore();break;case x.TRANSLATE:l.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:l.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:l.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}l.restore()}}},function(t,e,i){var n=i(0),s=i(126),r=i(71),o=i(2),a=i(59),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t,e,i,n=this.propertyValue,s=typeof n;return"number"==s?(this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate):Array.isArray(n)?this.onEmit=this.randomStaticValueEmit:"function"==s?this.emitOnly?this.onEmit=n:this.onUpdate=n:"object"==s&&(this.has(n,"random")||this.hasBoth(n,"start","end")||this.hasBoth(n,"min","max"))?(this.start=this.has(n,"start")?n.start:n.min,this.end=this.has(n,"end")?n.end:n.max,(t=this.hasBoth(n,"min","max")||!!n.random)&&(e=n.random,Array.isArray(e)&&(this.start=e[0],this.end=e[1]),this.onEmit=this.randomRangedValueEmit),this.has(n,"steps")?(this.steps=n.steps,this.counter=this.start,this.onEmit=this.steppedEmit):(i=this.has(n,"ease")?n.ease:"Linear",this.ease=r(i),t||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate)):"object"==s&&this.hasEither(n,"onEmit","onUpdate")&&(this.has(n,"onEmit")&&(this.onEmit=n.onEmit),this.has(n,"onUpdate")&&(this.onUpdate=n.onUpdate)),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){var i;return t&&t.data[e]&&((i=t.data[e]).min=this.start,i.max=this.end),this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=u(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1019),r=i(60),o=i(9),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(471),h=i(472),n=i(0),l=i(12),u=i(3),s=new n({Extends:l,initialize:function(t,e){l.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xu))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=A(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,u+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,l,u,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,u={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return 0=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,n,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!l(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._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=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,l,u,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),l=n,u=s,p=f=d=c=void 0,c=Math.max(l.minX,u.minX),d=Math.max(l.minY,u.minY),f=Math.min(l.maxX,u.maxX),p=Math.min(l.maxY,u.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),l=i(153);t.exports=function(t){for(var e=[],i=[],n=l(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=l(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(106),T=i(512),w=i(237);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],l=0;ln&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=l(e,i),o.tilesets=u(e),o}},function(t,e,i){var d=i(104),f=i(75);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(l=0;lx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(l=d-1;0<=l;l--)!(a=v[h][l])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,u=h/2,c=l/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+l)/s,v=this._tempMatrix,m=-u,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(l*=-1,y+=i.tileHeight);var x=m+h,T=y+l;v.applyITRS(u+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),b=v.getX(m,y),E=v.getY(m,y),S=v.getX(m,T),_=v.getY(m,T),A=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),P=v.getY(x,y);r.roundPixels&&(b=Math.round(b),E=Math.round(E),S=Math.round(S),_=Math.round(_),A=Math.round(A),C=Math.round(C),M=Math.round(M),P=Math.round(P));var O=this.vertexViewF32[o],R=this.vertexViewU32[o];return O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=S,O[++t]=_,O[++t]=d,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=M,O[++t]=P,O[++t]=p,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;ethis.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},bind:function(t){return void 0===t&&(t=!1),l.prototype.bind.call(this,t),this}});t.exports=u},function(t,e,i){var n={};t.exports=n;var r=i(101),o=i(44);n.fromVertices=function(t){for(var e={},i=0;i>>0;if("function"!=typeof t)throw new TypeError;for(var n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001)))},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(305),BaseCamera:i(92),CameraManager:i(722),Effects:i(313),Events:i(42)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),l=i(42),r=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?l.FADE_OUT_START:l.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(u=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:uMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(126);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(126);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(331);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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=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;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new r([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(32),l=i(365);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=l(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=l(s,n,t),a=l(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(174);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(s(n/359,t,e));return i}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:l(t,n,h),g:l(e,s,h),b:l(i,r,h)}}var l=i(123);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(180),s=i(32);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(364);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(286),GeometryMask:i(287)}},function(t,e,i){var n={AddToDOM:i(130),DOMContentLoaded:i(366),GetInnerHeight:i(367),GetScreenOrientation:i(368),GetTarget:i(373),ParseXML:i(374),RemoveFromDOM:i(186),RequestAnimationFrame:i(352)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(845)}},function(t,e,i){var n=i(0),s=i(12),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(130),s=i(300),r=i(304),o=i(26),a=i(0),h=i(326),l=i(847),u=i(348),c=i(118),d=i(350),f=i(327),p=i(366),g=i(12),v=i(21),m=i(375),y=i(23),x=i(380),T=i(381),w=i(383),b=i(129),E=i(388),S=i(351),_=i(353),A=i(392),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),_(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(130);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=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,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var l=i(70);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),l(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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 T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),l=T(e,"offset.y",0),u=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=l,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(176);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(142);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(41);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;it._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){l.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(s.data),s.onProcessError()},l.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r=n[2];if("^"===i.operator)return 0=i.number:0=n[2]:r[2]===n[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(156),r=(i(232),i(44));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var y={};t.exports=y;var a=i(500),n=i(542),r=i(44);y.create=function(t){var e={controller:y,detector:n.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return r.extend(e,t)},y.update=function(t,e,i,n){for(var s,r,o,a=i.world,h=t.buckets,l=!1,u=i.metrics,c=u.broadphaseTests=0;ca.bounds.max.x||d.bounds.max.ya.bounds.max.y)){var f=y._getRegion(t,d);if(!d.region||f.id!==d.region.id||n){u.broadphaseTests+=1,d.region&&!n||(d.region=f);for(var p=y._regionUnion(f,d.region),g=p.startCol;g<=p.endCol;g++)for(s=p.startRow;s<=p.endRow;s++){r=h[o=y._getBucketId(g,s)];var v=g>=f.startCol&&g<=f.endCol&&s>=f.startRow&&s<=f.endRow,m=g>=d.region.startCol&&g<=d.region.endCol&&s>=d.region.startRow&&s<=d.region.endRow;!v&&m&&m&&r&&y._bucketRemoveBody(t,r,d),(d.region===f||v&&!m||n)&&(r=r||y._createBucket(h,o),y._bucketAddBody(t,r,d))}d.region=f,l=!0}}}l&&(t.pairsList=y._createActivePairsList(t))},y.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},y._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),n=Math.max(t.endCol,e.endCol),s=Math.min(t.startRow,e.startRow),r=Math.max(t.endRow,e.endRow);return y._createRegion(i,n,s,r)},y._getRegion=function(t,e){var i=e.bounds,n=Math.floor(i.min.x/t.bucketWidth),s=Math.floor(i.max.x/t.bucketWidth),r=Math.floor(i.min.y/t.bucketHeight),o=Math.floor(i.max.y/t.bucketHeight);return y._createRegion(n,s,r,o)},y._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},y._getBucketId=function(t,e){return"C"+t+"R"+e},y._createBucket=function(t,e){return t[e]=[]},y._bucketAddBody=function(t,e,i){for(var n=0;nl._pairMaxIdleLife&&a.push(h);for(h=0;hu.friction*u.frictionStatic*R*i&&(F=M,L=U.clamp(u.friction*P*i,-F,F));var D,k,I=X.cross(w,p),B=X.cross(b,p),N=m/(d.inverseMass+f.inverseMass+d.inverseInertia*I*I+f.inverseInertia*B*B);O*=N,L*=N,A<0&&A*A>Y._restingThresh*i?x.normalImpulse=0:(D=x.normalImpulse,x.normalImpulse=Math.min(x.normalImpulse+O,0),O=x.normalImpulse-D),C*C>Y._restingThreshTangent*i?x.tangentImpulse=0:(k=x.tangentImpulse,x.tangentImpulse=U.clamp(x.tangentImpulse+L,-F,F),L=x.tangentImpulse-k),n.x=p.x*O+g.x*L,n.y=p.y*O+g.y*L,d.isStatic||d.isSleeping||(d.positionPrev.x+=n.x*d.inverseMass,d.positionPrev.y+=n.y*d.inverseMass,d.anglePrev+=X.cross(w,n)*d.inverseInertia),f.isStatic||f.isSleeping||(f.positionPrev.x-=n.x*f.inverseMass,f.positionPrev.y-=n.y*f.inverseMass,f.anglePrev-=X.cross(b,n)*f.inverseInertia)}}}}},function(t,e,i){t.exports={BasePlugin:i(501),DefaultPlugins:i(182),PluginCache:i(23),PluginManager:i(380),ScenePlugin:i(1314)}},function(t,e,i){var n=i(501),s=i(0),r=i(20),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){var n=i(19),s=i(185),r=n(!1,r={Center:i(369),Events:i(93),Orientation:i(370),ScaleManager:i(381),ScaleModes:i(371),Zoom:i(372)},s.CENTER);r=n(!1,r,s.ORIENTATION),r=n(!1,r,s.SCALE_MODE),r=n(!1,r,s.ZOOM),t.exports=r},function(t,e,i){var n=i(132),s=i(19)(!1,s={Events:i(20),GetPhysicsPlugins:i(385),GetScenePlugins:i(386),SceneManager:i(383),ScenePlugin:i(1317),Settings:i(387),Systems:i(188)},n);t.exports=s},function(t,e,i){var n=i(17),s=i(0),a=i(20),h=i(2),r=i(23),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.pluginStart,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(a.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=h(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=h(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=h(t,"sleep",!1),this._willRemove=h(t,"remove",!1);var s=h(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=h(t,"onUpdateScope",this.scene));var r=h(t,"allowInput",!1);this.settings.transitionAllowInput=r;var o=i.sys.settings;return o.isTransition=!0,o.transitionFrom=this.scene,o.transitionDuration=n,o.transitionAllowInput=r,h(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):h(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(h(t,"data")):this.manager.start(e,h(t,"data")),this.systems.events.emit(a.TRANSITION_OUT,i,n),this.systems.events.on(a.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(a.UPDATE,this.step,this),t.events.emit(a.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={Events:i(404),List:i(136),Map:i(121),ProcessQueue:i(195),RTree:i(490),Set:i(140),Size:i(382)}},function(t,e,i){var n=i(19),s=i(1320),r=n(!1,r={CanvasTexture:i(389),Events:i(129),FilterMode:s,Frame:i(96),Parsers:i(391),Texture:i(190),TextureManager:i(388),TextureSource:i(390)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(148),Parsers:i(1351),Formats:i(33),ImageCollection:i(512),ParseToTilemap:i(238),Tile:i(75),Tilemap:i(521),TilemapCreator:i(1365),TilemapFactory:i(1366),Tileset:i(106),LayerData:i(104),MapData:i(105),ObjectLayer:i(515),DynamicTilemapLayer:i(522),StaticTilemapLayer:i(523)}},function(t,e,i){var p=i(24),g=i(53);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),l=s-t,u=r-e,c=0;c=t&&l.index<=e&&u(l,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(65),h=i(53),l=i(152);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(69),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1391),GetValue:i(6),HasAll:i(1392),HasAny:i(421),HasValue:i(113),IsPlainObject:i(7),Merge:i(133),MergeRight:i(1393),Pick:i(513),SetValue:i(444)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;ii[e][0])&&(e=n);return!S(P(t,e-1),P(t,e),P(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var u=[],c=[];function M(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function P(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function O(t,e,i,n){for(var s=i;sn.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,1e3<=t-n.counterTimestamp&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),T.update(i,e,r))},step:function(t,e){T.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==u.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return u.allBodies(this.localWorld)},getAllConstraints:function(){return u.allConstraints(this.localWorld)},getAllComposites:function(){return u.allComposites(this.localWorld)},postUpdate:function(){var t,e,i,n;this.drawDebug&&(t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=u.allBodies(this.localWorld),this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor))},renderGrid:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=y.keys(t.buckets),r=0;re.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y=this.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){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;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var l=[],u=e;uthis.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(671),FADE_IN_COMPLETE:i(672),FADE_IN_START:i(673),FADE_OUT_COMPLETE:i(674),FADE_OUT_START:i(675),FLASH_COMPLETE:i(676),FLASH_START:i(677),PAN_COMPLETE:i(678),PAN_START:i(679),POST_RENDER:i(680),PRE_RENDER:i(681),ROTATE_COMPLETE:i(682),ROTATE_START:i(683),SHAKE_COMPLETE:i(684),SHAKE_START:i(685),ZOOM_COMPLETE:i(686),ZOOM_START:i(687)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e){var h={};t.exports=h,function(){h._nextId=0,h._seed=0,h._nowStartTime=+new Date,h.extend=function(t,e){for(var i,n="boolean"==typeof e?(i=2,e):(i=1,!0),s=i;s=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var d=i(150),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,l=f(t,e,i,n,null,s),u=0;u=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,s,r,o,a,h,l,u=e&&e.length,c=u?e[0]*i:t.length,d=g(t,0,c,i,!0),f=[];if(!d||d.next===d.prev)return f;if(u&&(d=function(t,e,i,n){var s,r,o,a,h,l=[];for(s=0,r=e.length;s=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&&o=n.x&&n.x>=u&&s!==n.x&&T(ri.x||n.x===i.x&&function(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}(i,n)))&&(i=n,d=h)),n=n.next,n!==l;);return i}(t,e))&&(i=E(e,t),v(e,e.next),v(i,i.next))}}(l[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.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=x(a,h,e,i,n),d=x(l,u,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,l=h.next;else if((t=h)===l){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!u(s,r)&&c(s,n,n.next,r)&&b(s,r)&&b(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return v(n)}(v(t),e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;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,i!==t;);return n}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||u(t,e)&&0=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function l(t){return 0=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(18),c=i(22),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,u),o&&((l=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return 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),this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e,i){var r=i(157),n=i(0),s=i(11),o=i(14),a=i(29),h=i(991),l=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,h],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=l},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return 0=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>l)?(u=Math.max(a.x,e),c=Math.max(a.y,i),b=d=Math.min(a.r,h)-u,E=f=Math.min(a.b,l)-c,T=r?p+(v-(u-a.x)-d):p+(u-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=u,i=c,n=d,s=f):E=b=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var _=this.source.width,A=this.source.height;return t.u0=Math.max(0,T/_),t.v0=Math.max(0,w/A),t.u1=Math.min(1,(T+b)/_),t.v1=Math.min(1,(w+E)/A),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=b,t.ch=E,t.width=n,t.height=s,t.flipX=r,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new 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.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(99),r=i(412),o=i(413),a=i(49),h=i(167),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var U=i(252),n=i(0),r=i(29),s=i(193),z=i(2),G=i(6),o=i(7),W=i(404),a=i(141),h=i(76),l=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?o(e[0])&&(i=e,e=null):o(e)&&(i=e,e=null),this.scene=t,this.children=new a,this.isParent=!0,this.type="Group",this.classType=z(i,"classType",h),this.name=z(i,"name",""),this.active=z(i,"active",!0),this.maxSize=z(i,"maxSize",-1),this.defaultKey=z(i,"defaultKey",null),this.defaultFrame=z(i,"defaultFrame",null),this.runChildUpdate=z(i,"runChildUpdate",!1),this.createCallback=z(i,"createCallback",null),this.removeCallback=z(i,"removeCallback",null),this.createMultipleCallback=z(i,"createMultipleCallback",null),this.internalCreateCallback=z(i,"internalCreateCallback",null),this.internalRemoveCallback=z(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;it.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e){t.exports=function(t,e,i){return 0<=t&&t=this.firstgid&&t=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(t){void 0===t&&(t=!1);var e=this.vertexBuffer,i=this.program,n=this.renderer;return n.setProgram(i),n.setVertexBuffer(e),this.setAttribPointers(t),this},setAttribPointers:function(t){void 0===t&&(t=!1);for(var e=this.gl,i=this.attributes,n=this.vertexSize,s=this.program,r=0;rthis.vertexCapacity&&this.flush();var N=this.setGameObject(t),Y=t._isTinted&&t.tintFill;this.batchQuad(A,C,M,O,P,R,L,F,l,u,c,d,D,k,I,B,Y,h,N)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,E,S,_,A,C,M,O,P,R){this.renderer.pipelines.set(this,t);var L,F,D,k=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,N=m/i+A,Y=y/n+C,X=(m+x)/i+A,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,F=m=L.x,D=y=L.y,c&&(F=x-L.x-L.width),d&&!e.isRenderTexture&&(D=T-L.y-L.height),N=F/i+A,Y=D/n+C,X=(F+L.width)/i+A,U=(D+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!P&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,u,h,l),k.copyFrom(M.matrix),O?(k.multiplyWithOffset(O,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),k.multiply(I,B);var q=B.getX(W,V),K=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(q=Math.round(q),K=Math.round(K),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===R&&(R=this.renderer.setTexture2D(e)),this.batchQuad(q,K,Z,J,Q,$,tt,et,N,Y,X,U,w,b,E,S,_,e,R)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.pipelines.set(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,u=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,u),p=h.getY(e,u),g=h.getX(l,u),v=h.getY(l,u),m=h.getX(l,i),y=h.getY(l,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,l=this.renderer.setTexture2D(h),u=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,u,u,u,u,2,h,l)},batchFillRect:function(t,e,i,n,s,r){this.renderer.pipelines.set(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,b=this.fillTint;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,b.TL,b.TR,b.BL,b.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.pipelines.set(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,c=this.tintEffect,d=0;d>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(293),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var l=i(6),u={},n={register:function(t,e,i,n,s){u[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return u[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in u){var r=u[s].plugin,o=u[s].mapping,a=u[s].settingsKey,h=u[s].configKey;l(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){u.hasOwnProperty(t)&&delete u[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1239),ANY_KEY_UP:i(1240),COMBO_MATCH:i(1241),DOWN:i(1242),KEY_DOWN:i(1243),KEY_UP:i(1244),UP:i(1245)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(228),r=i(76),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(235),CalculateFacesWithin:i(53),Copy:i(1326),CreateFromTiles:i(1327),CullTiles:i(1328),Fill:i(1329),FilterTiles:i(1330),FindByIndex:i(1331),FindTile:i(1332),ForEachTile:i(1333),GetTileAt:i(150),GetTileAtWorldXY:i(1334),GetTilesWithin:i(24),GetTilesWithinShape:i(1335),GetTilesWithinWorldXY:i(1336),HasTileAt:i(504),HasTileAtWorldXY:i(1337),IsInLayerBounds:i(104),PutTileAt:i(236),PutTileAtWorldXY:i(1338),PutTilesAt:i(1339),Randomize:i(1340),RemoveTileAt:i(505),RemoveTileAtWorldXY:i(1341),RenderDebug:i(1342),ReplaceByIndex:i(503),SetCollision:i(1343),SetCollisionBetween:i(1344),SetCollisionByExclusion:i(1345),SetCollisionByProperty:i(1346),SetCollisionFromCollisionGroup:i(1347),SetLayerCollisionIndex:i(153),SetTileCollision:i(65),SetTileIndexCallback:i(1348),SetTileLocationCallback:i(1349),Shuffle:i(1350),SwapByIndex:i(1351),TileToWorldX:i(151),TileToWorldXY:i(1352),TileToWorldY:i(152),WeightedRandomize:i(1353),WorldToTileX:i(66),WorldToTileXY:i(1354),WorldToTileY:i(67)}},function(t,e,i){var r=i(104);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var r=i(2);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=e.x+r(e,"startx",0)*t.tilewidth+r(e,"offsetx",0),s=e.y+r(e,"starty",0)*t.tileheight+r(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+s}}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var R=i(243),L=i(15),F=i(90),D=i(71),k=i(155),I=i(526),B=i(241),N=i(6),Y=i(242),X=i(244),U=i(246);t.exports=function(t,e,i){void 0===i&&(i=R);for(var n=i.targets?i.targets:B(e),s=I(e),r=k(e,"delay",i.delay),o=k(e,"duration",i.duration),a=N(e,"easeParams",i.easeParams),h=D(N(e,"ease",i.ease),a),l=k(e,"hold",i.hold),u=k(e,"repeat",i.repeat),c=k(e,"repeatDelay",i.repeatDelay),d=F(e,"yoyo",i.yoyo),f=F(e,"flipX",i.flipX),p=F(e,"flipY",i.flipY),g=[],v=0;vh.getTotalFrames()&&(s=0),r=h.frames[s],0!==s||this.forward||(r=h.getLastFrame()),this.currentFrame=r):console.warn("Missing animation: "+a),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){var i,n;return this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e):(this.delayCounter=e,this.play(t,!0)),this.parent},playAfterRepeat:function(t,e){var i,n;return void 0===e&&(e=1),this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e):this.play(t),this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent,s="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===s)return n;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(0this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick))for(var n=0;this.forward?i.nextFrame(this):i.previousFrame(this),n++,this.accumulator>this.nextTick&&n<60;);}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(r.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims&&this.anims.get(t)},exists:function(t){return this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new o(this,e,t),this.anims||(this.anims=new s),this.anims.set(e,i))),i},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=a},function(t,e,i){var c={};t.exports=c;var o=i(251),r=i(44),a=i(103),d=i(64);c.create=function(t){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},t)},c.setModified=function(t,e,i,n){if(o.trigger(t,"compositeModified",t),t.isModified=e,i&&t.parent&&c.setModified(t.parent,e,i,n),n)for(var s=0;s=(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(1+(s-r)).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(307),s=i(310),r=i(312),o=i(313);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var a=i(175);function h(t,e,i,n){var s=(t+6*e)%6,r=Math.min(s,4-s,1);return Math.round(255*(n-n*i*Math.max(0,r)))}t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=h(5,t,e,i),r=h(3,t,e,i),o=h(1,t,e,i);return n?n.setTo?n.setTo(s,r,o,n.alpha,!1):(n.r=s,n.g=r,n.b=o,n.color=a(s,r,o),n):{r:s,g:r,b:o,color:a(s,r,o)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.gl,a=this.frame,h=this.texture,l=this.camera,u=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=a.cutWidth),void 0===r&&(r=a.cutHeight);var c,d,f,p,g,v,m,y,x,T,w=255&(t>>16|0),b=255&(t>>8|0),E=255&(0|t);return l.preRender(1,1),o?(c=l._cx,d=l._cy,f=l._cw,p=l._ch,u.resetTextures(!0),u.pushScissor(c,d,f,-p),u.setFramebuffer(this.framebuffer,!1),g=this.pipeline,v=h.width,m=h.height,y=g.width/v,x=g.height/m,g.drawFillRect(i*y,(m-r-n)*x,s*y,r*x,S.getTintFromFloats(w/255,b/255,E/255,1),e),g.flush(),u.setFramebuffer(null,!1),u.popScissor()):(T=this.context,u.setContext(T),T.fillStyle="rgba("+w+","+b+","+E+","+e+")",T.fillRect(i+a.cutX,n+a.cutY,s,r),u.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,l,u=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),u?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),l=this.pipeline,g(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),g(l,0,l.width,l.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,l,u,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,l=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,l,l),u=this.pipeline,g(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),u.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),u.flush(),f.setFramebuffer(null,!1),f.popScissor(),g(u,0,u.width,u.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0e._dx?r<(s=t.right-e.x)&&!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,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!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,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.right||e.position.y>=t.bottom)}},function(t,e,i){var w={};t.exports=w;var o=i(88),b=i(102),a=i(250),h=i(103),l=i(542),u=i(44);w._warming=.4,w._torqueDampen=1,w._minLength=1e-6,w.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?b.add(e.bodyA.position,e.pointA):e.pointA,n=e.bodyB?b.add(e.bodyB.position,e.pointB):e.pointB,s=b.magnitude(b.sub(i,n));e.length=void 0!==e.length?e.length:s,e.id=e.id||u.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(0t&&(t=s.totalDuration),s.delay=o.sleepThreshold&&u.set(o,!0)):0u._motionWakeThreshold*i&&u.set(a,!1)))}},u.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||n.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&n.trigger(t,"sleepEnd"))}},function(t,e,i){var n={};t.exports=n;var u=i(44);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;ne.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e){t.exports=function(t){var i=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(i,""),10)-parseInt(e.replace(i,""),10)}),t}},function(t,e,i){var n=i(172),s=i(0),r=i(92),o=i(12),a=i(122),h=i(21),T=i(2),d=i(6),f=i(173),p=i(302),l=new s({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var n,s=this.anims,r=this.mixes,o="string"==typeof t?t:t.key,a="string"==typeof e?e:e.key;return s.has(o)&&s.has(a)&&((n=(n=r.get(o))||{})[a]=i,r.set(o,n)),this},removeMix:function(t,e){var i,n=this.mixes,s="string"==typeof t?t:t.key,r=n.get(s);return r&&(e?(i="string"==typeof e?e:e.key,r.hasOwnProperty(i)&&delete r[i]):e||n.delete(s)),this},getMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s="string"==typeof e?e:e.key,r=i.get(n);return r&&r.hasOwnProperty(s)?r[s]:0},add:function(t,e){return this.anims.has(t)?console.warn("Animation key exists: "+t):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e)),this},exists:function(t){return this.anims.has(t)},createFromAseprite:function(g,v){var m=[],t=this.game.cache.json.get(g);if(!t)return m;var y=this,e=d(t,"meta",null),x=d(t,"frames",null);return e&&x&&d(e,"frameTags",[]).forEach(function(t){var e=[],i=T(t,"name",null),n=T(t,"from",0),s=T(t,"to",0),r=T(t,"direction","forward");if(i&&(!v||v&&-1d.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-l,this.lerp.x),p=T(p,i-u,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(l=Math.round(l),u=Math.round(u));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+l,this.y+u,this.rotation,a,a),h.translate(-l,-u),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=u(i,0,1),n=u(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,l=t.y-r;return this.midPoint.set(h,l),this.scrollX=h-o,this.scrollY=l-a,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(32);t.exports=function(t){var e=new o;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,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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(32);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(32);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(688),Flash:i(689),Pan:i(690),Shake:i(723),RotateTo:i(724),Zoom:i(725)}},function(t,e,i){t.exports={In:i(691),Out:i(692),InOut:i(693)}},function(t,e,i){t.exports={In:i(694),Out:i(695),InOut:i(696)}},function(t,e,i){t.exports={In:i(697),Out:i(698),InOut:i(699)}},function(t,e,i){t.exports={In:i(700),Out:i(701),InOut:i(702)}},function(t,e,i){t.exports={In:i(703),Out:i(704),InOut:i(705)}},function(t,e,i){t.exports={In:i(706),Out:i(707),InOut:i(708)}},function(t,e,i){t.exports=i(709)},function(t,e,i){t.exports={In:i(710),Out:i(711),InOut:i(712)}},function(t,e,i){t.exports={In:i(713),Out:i(714),InOut:i(715)}},function(t,e,i){t.exports={In:i(716),Out:i(717),InOut:i(718)}},function(t,e,i){t.exports={In:i(719),Out:i(720),InOut:i(721)}},function(t,e,i){t.exports=i(722)},function(t,e,i){var n=i(0),a=i(34),h=i(328),l=i(2),u=i(6),c=i(7),d=i(180),f=i(1),p=i(184),g=i(174),s=new n({initialize:function(t){void 0===t&&(t={});this.width=u(t,"width",1024),this.height=u(t,"height",768),this.zoom=u(t,"zoom",1),this.resolution=u(t,"resolution",1),this.parent=u(t,"parent",void 0),this.scaleMode=u(t,"scaleMode",0),this.expandParent=u(t,"expandParent",!0),this.autoRound=u(t,"autoRound",!1),this.autoCenter=u(t,"autoCenter",0),this.resizeInterval=u(t,"resizeInterval",500),this.fullscreenTarget=u(t,"fullscreenTarget",null),this.minWidth=u(t,"minWidth",0),this.maxWidth=u(t,"maxWidth",0),this.minHeight=u(t,"minHeight",0),this.maxHeight=u(t,"maxHeight",0);var e=u(t,"scale",null);e&&(this.width=u(e,"width",this.width),this.height=u(e,"height",this.height),this.zoom=u(e,"zoom",this.zoom),this.resolution=u(e,"resolution",this.resolution),this.parent=u(e,"parent",this.parent),this.scaleMode=u(e,"mode",this.scaleMode),this.expandParent=u(e,"expandParent",this.expandParent),this.autoRound=u(e,"autoRound",this.autoRound),this.autoCenter=u(e,"autoCenter",this.autoCenter),this.resizeInterval=u(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=u(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=u(e,"min.width",this.minWidth),this.maxWidth=u(e,"max.width",this.maxWidth),this.minHeight=u(e,"min.height",this.minHeight),this.maxHeight=u(e,"max.height",this.maxHeight)),this.renderType=u(t,"type",a.AUTO),this.canvas=u(t,"canvas",null),this.context=u(t,"context",null),this.canvasStyle=u(t,"canvasStyle",null),this.customEnvironment=u(t,"customEnvironment",!1),this.sceneConfig=u(t,"scene",null),this.seed=u(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=u(t,"title",""),this.gameURL=u(t,"url","https://phaser.io"),this.gameVersion=u(t,"version",""),this.autoFocus=u(t,"autoFocus",!0),this.domCreateContainer=u(t,"dom.createContainer",!1),this.domBehindCanvas=u(t,"dom.behindCanvas",!1),this.inputKeyboard=u(t,"input.keyboard",!0),this.inputKeyboardEventTarget=u(t,"input.keyboard.target",window),this.inputKeyboardCapture=u(t,"input.keyboard.capture",[]),this.inputMouse=u(t,"input.mouse",!0),this.inputMouseEventTarget=u(t,"input.mouse.target",null),this.inputMouseCapture=u(t,"input.mouse.capture",!0),this.inputTouch=u(t,"input.touch",h.input.touch),this.inputTouchEventTarget=u(t,"input.touch.target",null),this.inputTouchCapture=u(t,"input.touch.capture",!0),this.inputActivePointers=u(t,"input.activePointers",1),this.inputSmoothFactor=u(t,"input.smoothFactor",0),this.inputWindowEvents=u(t,"input.windowEvents",!0),this.inputGamepad=u(t,"input.gamepad",!1),this.inputGamepadEventTarget=u(t,"input.gamepad.target",window),this.disableContextMenu=u(t,"disableContextMenu",!1),this.audio=u(t,"audio"),this.hideBanner=!1===u(t,"banner",null),this.hidePhaser=u(t,"banner.hidePhaser",!1),this.bannerTextColor=u(t,"banner.text","#ffffff"),this.bannerBackgroundColor=u(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=u(t,"fps",null);var i=u(t,"render",t);this.antialias=u(i,"antialias",!0),this.antialiasGL=u(i,"antialiasGL",!0),this.mipmapFilter=u(i,"mipmapFilter","LINEAR"),this.desynchronized=u(i,"desynchronized",!1),this.roundPixels=u(i,"roundPixels",!1),this.pixelArt=u(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=u(i,"transparent",!1),this.clearBeforeRender=u(i,"clearBeforeRender",!0),this.premultipliedAlpha=u(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=u(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=u(i,"powerPreference","default"),this.batchSize=u(i,"batchSize",4096),this.maxTextures=u(i,"maxTextures",-1),this.maxLights=u(i,"maxLights",10);var n=u(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=u(t,"callbacks.preBoot",f),this.postBoot=u(t,"callbacks.postBoot",f),this.physics=u(t,"physics",{}),this.defaultPhysicsSystem=u(this.physics,"default",!1),this.loaderBaseURL=u(t,"loader.baseURL",""),this.loaderPath=u(t,"loader.path",""),this.loaderMaxParallelDownloads=u(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=u(t,"loader.crossOrigin",void 0),this.loaderResponseType=u(t,"loader.responseType",""),this.loaderAsync=u(t,"loader.async",!0),this.loaderUser=u(t,"loader.user",""),this.loaderPassword=u(t,"loader.password",""),this.loaderTimeout=u(t,"loader.timeout",0),this.loaderWithCredentials=u(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=u(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=l(s,"global",[]),this.installScenePlugins=l(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=u(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=u(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(125),browser:i(126),features:i(179),input:i(756),audio:i(757),video:i(758),fullscreen:i(759),canvasFeatures:i(329)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(350),l=a(26),u=a(34),c=a(179);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===u.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==u.HEADLESS)if(e.renderType===u.CANVAS||e.renderType!==u.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=u.CANVAS}else e.renderType=u.WEBGL;e.antialias||l.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=l.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==u.HEADLESS&&(i=a(532),n=a(535),e.renderType===u.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var l=i(34);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===l.CANVAS?e="Canvas":h.renderType===l.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+l.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+l.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(353),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(21);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(356),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),l=x(t,"postRender",null),u=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,u,c),a=o=!1),o&&(i.width=u,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,u,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],l=i[s>i.length-3?i.length-1:s+2];return e.set(u(r,o.x,a.x,h.x,l.x),u(r,o.y,a.y,h.y,l.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(95),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,l[a++]=(15&i)<<4|n>>2,l[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(136),s=i(0),r=i(61),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,l.strokeStyle="rgba("+g+","+v+","+m+","+u+")",l.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,l.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:l.beginPath();break;case x.CLOSE_PATH:l.closePath();break;case x.FILL_PATH:o||l.fill();break;case x.STROKE_PATH:o||l.stroke();break;case x.FILL_RECT:o?l.rect(a[y+1],a[y+2],a[y+3],a[y+4]):l.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.fill(),y+=6;break;case x.STROKE_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.stroke(),y+=6;break;case x.LINE_TO:l.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:l.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:l.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:l.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:l.save();break;case x.RESTORE:l.restore();break;case x.TRANSLATE:l.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:l.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:l.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}l.restore()}}},function(t,e,i){var n=i(0),s=i(127),r=i(71),o=i(2),a=i(59),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t,e,i,n=this.propertyValue,s=typeof n;return"number"==s?(this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate):Array.isArray(n)?this.onEmit=this.randomStaticValueEmit:"function"==s?this.emitOnly?this.onEmit=n:this.onUpdate=n:"object"==s&&(this.has(n,"random")||this.hasBoth(n,"start","end")||this.hasBoth(n,"min","max"))?(this.start=this.has(n,"start")?n.start:n.min,this.end=this.has(n,"end")?n.end:n.max,(t=this.hasBoth(n,"min","max")||!!n.random)&&(e=n.random,Array.isArray(e)&&(this.start=e[0],this.end=e[1]),this.onEmit=this.randomRangedValueEmit),this.has(n,"steps")?(this.steps=n.steps,this.counter=this.start,this.onEmit=this.steppedEmit):(i=this.has(n,"ease")?n.ease:"Linear",this.ease=r(i),t||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate)):"object"==s&&this.hasEither(n,"onEmit","onUpdate")&&(this.has(n,"onEmit")&&(this.onEmit=n.onEmit),this.has(n,"onUpdate")&&(this.onUpdate=n.onUpdate)),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){var i;return t&&t.data[e]&&((i=t.data[e]).min=this.start,i.max=this.end),this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=u(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1023),r=i(60),o=i(9),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(472),h=i(473),n=i(0),l=i(12),u=i(3),s=new n({Extends:l,initialize:function(t,e){l.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xu))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=A(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,u+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,l,u,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,u={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return 0=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,n,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!l(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._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=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,l,u,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),l=n,u=s,p=f=d=c=void 0,c=Math.max(l.minX,u.minX),d=Math.max(l.minY,u.minY),f=Math.min(l.maxX,u.maxX),p=Math.min(l.maxY,u.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),l=i(154);t.exports=function(t){for(var e=[],i=[],n=l(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=l(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(107),T=i(513),w=i(239);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],l=0;ln&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=l(e,i),o.tilesets=u(e),o}},function(t,e,i){var d=i(105),f=i(75);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(l=0;lx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(l=d-1;0<=l;l--)!(a=v[h][l])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,u=h/2,c=l/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+l)/s,v=this._tempMatrix,m=-u,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(l*=-1,y+=i.tileHeight);var x=m+h,T=y+l;v.applyITRS(u+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),b=v.getX(m,y),E=v.getY(m,y),S=v.getX(m,T),_=v.getY(m,T),A=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),O=v.getY(x,y);r.roundPixels&&(b=Math.round(b),E=Math.round(E),S=Math.round(S),_=Math.round(_),A=Math.round(A),C=Math.round(C),M=Math.round(M),O=Math.round(O));var P=this.vertexViewF32[o],R=this.vertexViewU32[o];return P[++t]=b,P[++t]=E,P[++t]=d,P[++t]=f,P[++t]=0,P[++t]=0,R[++t]=w,P[++t]=S,P[++t]=_,P[++t]=d,P[++t]=g,P[++t]=0,P[++t]=0,R[++t]=w,P[++t]=A,P[++t]=C,P[++t]=p,P[++t]=g,P[++t]=0,P[++t]=0,R[++t]=w,P[++t]=b,P[++t]=E,P[++t]=d,P[++t]=f,P[++t]=0,P[++t]=0,R[++t]=w,P[++t]=A,P[++t]=C,P[++t]=p,P[++t]=g,P[++t]=0,P[++t]=0,R[++t]=w,P[++t]=M,P[++t]=O,P[++t]=p,P[++t]=f,P[++t]=0,P[++t]=0,R[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;ethis.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},bind:function(t){return void 0===t&&(t=!1),l.prototype.bind.call(this,t),this}});t.exports=u},function(t,e,i){var C=i(26),M=i(32),O=i(2);t.exports=function(t,e){var i=t.getContext("experimental-webgl"),n=O(e,"callback"),s=O(e,"type","image/png"),r=O(e,"encoder",.92),o=O(e,"x",0),a=O(e,"y",0),h=O(e,"getPixel",!1),l=O(e,"isFramebuffer",!1),u=l?O(e,"bufferWidth",1):i.drawingBufferWidth,c=l?O(e,"bufferHeight",1):i.drawingBufferHeight;if(h){var d=new Uint8Array(4),f=l?a:c-a;i.readPixels(o,f,1,1,i.RGBA,i.UNSIGNED_BYTE,d),n.call(null,new M(d[0],d[1],d[2],d[3]/255))}else{var p=O(e,"width",u),g=O(e,"height",c),v=p*g*4,m=new Uint8Array(v);i.readPixels(o,c-a-g,p,g,i.RGBA,i.UNSIGNED_BYTE,m);for(var y=C.createWebGL(this,p,g),x=y.getContext("2d"),T=x.getImageData(0,0,p,g),w=T.data,b=0;b>>0;if("function"!=typeof t)throw new TypeError;for(var n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001)))},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(306),BaseCamera:i(93),CameraManager:i(726),Effects:i(314),Events:i(42)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),l=i(42),r=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?l.FADE_OUT_START:l.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(u=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:uMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(127);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(127);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(332);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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=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;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new r([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(32),l=i(366);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=l(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=l(s,n,t),a=l(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(176);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(s(n/359,t,e));return i}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:l(t,n,h),g:l(e,s,h),b:l(i,r,h)}}var l=i(124);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(182),s=i(32);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(365);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(287),GeometryMask:i(288)}},function(t,e,i){var n={AddToDOM:i(131),DOMContentLoaded:i(367),GetInnerHeight:i(368),GetScreenOrientation:i(369),GetTarget:i(374),ParseXML:i(375),RemoveFromDOM:i(188),RequestAnimationFrame:i(353)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(849)}},function(t,e,i){var n=i(0),s=i(12),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(131),s=i(301),r=i(305),o=i(26),a=i(0),h=i(327),l=i(851),u=i(349),c=i(120),d=i(351),f=i(328),p=i(367),g=i(12),v=i(21),m=i(376),y=i(23),x=i(381),T=i(382),w=i(384),b=i(130),E=i(389),S=i(352),_=i(354),A=i(393),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),_(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(131);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=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,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var l=i(70);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),l(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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 T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),l=T(e,"offset.y",0),u=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=l,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(178);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(143);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(41);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;it._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){l.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(s.data),s.onProcessError()},l.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r=n[2];if("^"===i.operator)return 0=i.number:0=n[2]:r[2]===n[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(158),r=(i(234),i(44));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var y={};t.exports=y;var a=i(501),n=i(544),r=i(44);y.create=function(t){var e={controller:y,detector:n.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return r.extend(e,t)},y.update=function(t,e,i,n){for(var s,r,o,a=i.world,h=t.buckets,l=!1,u=i.metrics,c=u.broadphaseTests=0;ca.bounds.max.x||d.bounds.max.ya.bounds.max.y)){var f=y._getRegion(t,d);if(!d.region||f.id!==d.region.id||n){u.broadphaseTests+=1,d.region&&!n||(d.region=f);for(var p=y._regionUnion(f,d.region),g=p.startCol;g<=p.endCol;g++)for(s=p.startRow;s<=p.endRow;s++){r=h[o=y._getBucketId(g,s)];var v=g>=f.startCol&&g<=f.endCol&&s>=f.startRow&&s<=f.endRow,m=g>=d.region.startCol&&g<=d.region.endCol&&s>=d.region.startRow&&s<=d.region.endRow;!v&&m&&m&&r&&y._bucketRemoveBody(t,r,d),(d.region===f||v&&!m||n)&&(r=r||y._createBucket(h,o),y._bucketAddBody(t,r,d))}d.region=f,l=!0}}}l&&(t.pairsList=y._createActivePairsList(t))},y.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},y._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),n=Math.max(t.endCol,e.endCol),s=Math.min(t.startRow,e.startRow),r=Math.max(t.endRow,e.endRow);return y._createRegion(i,n,s,r)},y._getRegion=function(t,e){var i=e.bounds,n=Math.floor(i.min.x/t.bucketWidth),s=Math.floor(i.max.x/t.bucketWidth),r=Math.floor(i.min.y/t.bucketHeight),o=Math.floor(i.max.y/t.bucketHeight);return y._createRegion(n,s,r,o)},y._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},y._getBucketId=function(t,e){return"C"+t+"R"+e},y._createBucket=function(t,e){return t[e]=[]},y._bucketAddBody=function(t,e,i){for(var n=0;nl._pairMaxIdleLife&&a.push(h);for(h=0;hu.friction*u.frictionStatic*R*i&&(F=M,L=U.clamp(u.friction*O*i,-F,F));var D,k,I=X.cross(w,p),B=X.cross(b,p),N=m/(d.inverseMass+f.inverseMass+d.inverseInertia*I*I+f.inverseInertia*B*B);P*=N,L*=N,A<0&&A*A>Y._restingThresh*i?x.normalImpulse=0:(D=x.normalImpulse,x.normalImpulse=Math.min(x.normalImpulse+P,0),P=x.normalImpulse-D),C*C>Y._restingThreshTangent*i?x.tangentImpulse=0:(k=x.tangentImpulse,x.tangentImpulse=U.clamp(x.tangentImpulse+L,-F,F),L=x.tangentImpulse-k),n.x=p.x*P+g.x*L,n.y=p.y*P+g.y*L,d.isStatic||d.isSleeping||(d.positionPrev.x+=n.x*d.inverseMass,d.positionPrev.y+=n.y*d.inverseMass,d.anglePrev+=X.cross(w,n)*d.inverseInertia),f.isStatic||f.isSleeping||(f.positionPrev.x-=n.x*f.inverseMass,f.positionPrev.y-=n.y*f.inverseMass,f.anglePrev-=X.cross(b,n)*f.inverseInertia)}}}}},function(t,e,i){t.exports={BasePlugin:i(502),DefaultPlugins:i(184),PluginCache:i(23),PluginManager:i(381),ScenePlugin:i(1318)}},function(t,e,i){var n=i(502),s=i(0),r=i(20),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){var n=i(19),s=i(187),r=n(!1,r={Center:i(370),Events:i(94),Orientation:i(371),ScaleManager:i(382),ScaleModes:i(372),Zoom:i(373)},s.CENTER);r=n(!1,r,s.ORIENTATION),r=n(!1,r,s.SCALE_MODE),r=n(!1,r,s.ZOOM),t.exports=r},function(t,e,i){var n=i(133),s=i(19)(!1,s={Events:i(20),GetPhysicsPlugins:i(386),GetScenePlugins:i(387),SceneManager:i(384),ScenePlugin:i(1321),Settings:i(388),Systems:i(190)},n);t.exports=s},function(t,e,i){var n=i(17),s=i(0),a=i(20),h=i(2),r=i(23),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.pluginStart,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(a.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=h(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=h(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=h(t,"sleep",!1),this._willRemove=h(t,"remove",!1);var s=h(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=h(t,"onUpdateScope",this.scene));var r=h(t,"allowInput",!1);this.settings.transitionAllowInput=r;var o=i.sys.settings;return o.isTransition=!0,o.transitionFrom=this.scene,o.transitionDuration=n,o.transitionAllowInput=r,h(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):h(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(h(t,"data")):this.manager.start(e,h(t,"data")),this.systems.events.emit(a.TRANSITION_OUT,i,n),this.systems.events.on(a.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(a.UPDATE,this.step,this),t.events.emit(a.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={Events:i(405),List:i(137),Map:i(92),ProcessQueue:i(197),RTree:i(491),Set:i(141),Size:i(383)}},function(t,e,i){var n=i(19),s=i(1324),r=n(!1,r={CanvasTexture:i(390),Events:i(130),FilterMode:s,Frame:i(97),Parsers:i(392),Texture:i(192),TextureManager:i(389),TextureSource:i(391)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(149),Parsers:i(1355),Formats:i(33),ImageCollection:i(513),ParseToTilemap:i(240),Tile:i(75),Tilemap:i(522),TilemapCreator:i(1369),TilemapFactory:i(1370),Tileset:i(107),LayerData:i(105),MapData:i(106),ObjectLayer:i(516),DynamicTilemapLayer:i(523),StaticTilemapLayer:i(524)}},function(t,e,i){var p=i(24),g=i(53);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),l=s-t,u=r-e,c=0;c=t&&l.index<=e&&u(l,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(65),h=i(53),l=i(153);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(69),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1395),GetValue:i(6),HasAll:i(1396),HasAny:i(422),HasValue:i(115),IsPlainObject:i(7),Merge:i(134),MergeRight:i(1397),Pick:i(514),SetValue:i(445)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;ii[e][0])&&(e=n);return!S(O(t,e-1),O(t,e),O(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var u=[],c=[];function M(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function O(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function P(t,e,i,n){for(var s=i;sn.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,1e3<=t-n.counterTimestamp&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),T.update(i,e,r))},step:function(t,e){T.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==u.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return u.allBodies(this.localWorld)},getAllConstraints:function(){return u.allConstraints(this.localWorld)},getAllComposites:function(){return u.allComposites(this.localWorld)},postUpdate:function(){var t,e,i,n;this.drawDebug&&(t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=u.allBodies(this.localWorld),this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor))},renderGrid:function(t,e,i,n){e.lineStyle(1,i,n);for(var s=y.keys(t.buckets),r=0;re.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y Date: Thu, 10 Sep 2020 23:44:21 +0800 Subject: [PATCH 020/153] Remove duplicated code Adding game object to UpdateList has been invoked in `displayList.add` by new ADDED_TO_SCENE event already. --- src/gameobjects/GameObjectFactory.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index 61bf09d28..bae9b2fde 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -135,11 +135,6 @@ var GameObjectFactory = new Class({ this.displayList.add(child); } - if (child.preUpdate) - { - this.updateList.add(child); - } - return child; }, From 205552d69c43a24504708b855ef0936155d8c434 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 10 Sep 2020 17:04:56 +0100 Subject: [PATCH 021/153] Fix namespaces. Fix #5289 --- src/input/keyboard/combo/AdvanceKeyCombo.js | 2 +- src/input/keyboard/combo/ProcessKeyCombo.js | 2 +- src/input/keyboard/combo/ResetKeyCombo.js | 2 +- src/input/keyboard/index.js | 6 +++++- src/renderer/webgl/index.js | 1 + 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/input/keyboard/combo/AdvanceKeyCombo.js b/src/input/keyboard/combo/AdvanceKeyCombo.js index b60b4d0bd..397918299 100644 --- a/src/input/keyboard/combo/AdvanceKeyCombo.js +++ b/src/input/keyboard/combo/AdvanceKeyCombo.js @@ -8,7 +8,7 @@ * Used internally by the KeyCombo class. * Return `true` if it reached the end of the combo, `false` if not. * - * @function Phaser.Input.Keyboard.KeyCombo.AdvanceKeyCombo + * @function Phaser.Input.Keyboard.AdvanceKeyCombo * @private * @since 3.0.0 * diff --git a/src/input/keyboard/combo/ProcessKeyCombo.js b/src/input/keyboard/combo/ProcessKeyCombo.js index bb5fe93d3..a34af74cd 100644 --- a/src/input/keyboard/combo/ProcessKeyCombo.js +++ b/src/input/keyboard/combo/ProcessKeyCombo.js @@ -9,7 +9,7 @@ var AdvanceKeyCombo = require('./AdvanceKeyCombo'); /** * Used internally by the KeyCombo class. * - * @function Phaser.Input.Keyboard.KeyCombo.ProcessKeyCombo + * @function Phaser.Input.Keyboard.ProcessKeyCombo * @private * @since 3.0.0 * diff --git a/src/input/keyboard/combo/ResetKeyCombo.js b/src/input/keyboard/combo/ResetKeyCombo.js index 72088e238..ffb32718d 100644 --- a/src/input/keyboard/combo/ResetKeyCombo.js +++ b/src/input/keyboard/combo/ResetKeyCombo.js @@ -7,7 +7,7 @@ /** * Used internally by the KeyCombo class. * - * @function Phaser.Input.Keyboard.KeyCombo.ResetKeyCombo + * @function Phaser.Input.Keyboard.ResetKeyCombo * @private * @since 3.0.0 * diff --git a/src/input/keyboard/index.js b/src/input/keyboard/index.js index 67225ba20..70941c314 100644 --- a/src/input/keyboard/index.js +++ b/src/input/keyboard/index.js @@ -20,9 +20,13 @@ module.exports = { KeyCombo: require('./combo/KeyCombo'), + AdvanceKeyCombo: require('./combo/AdvanceKeyCombo'), + ProcessKeyCombo: require('./combo/ProcessKeyCombo'), + ResetKeyCombo: require('./combo/ResetKeyCombo'), + JustDown: require('./keys/JustDown'), JustUp: require('./keys/JustUp'), DownDuration: require('./keys/DownDuration'), UpDuration: require('./keys/UpDuration') - + }; diff --git a/src/renderer/webgl/index.js b/src/renderer/webgl/index.js index e49fdd198..dfb8f18f1 100644 --- a/src/renderer/webgl/index.js +++ b/src/renderer/webgl/index.js @@ -12,6 +12,7 @@ module.exports = { PipelineManager: require('./PipelineManager'), Pipelines: require('./pipelines'), + MVP: require('./mvp'), Utils: require('./Utils'), WebGLPipeline: require('./WebGLPipeline'), WebGLRenderer: require('./WebGLRenderer') From 1e1b3ce27edfcba6e2b88f7af0b7aa6d50c179ac Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 10 Sep 2020 17:04:58 +0100 Subject: [PATCH 022/153] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c47e4adda..ea11e3b54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -465,7 +465,7 @@ The Animation API has had a significant overhaul to improve playback handling. I 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 @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards +@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards @rexrainbow From ae5182be7d0cde6f31a34e8fdc4dc3b1c135d24d Mon Sep 17 00:00:00 2001 From: samme Date: Thu, 10 Sep 2020 09:22:44 -0700 Subject: [PATCH 023/153] Default Phaser.Core.Config#audio; and refactor --- src/core/Config.js | 2 +- src/core/DebugHeader.js | 4 ++-- src/loader/filetypes/AudioFile.js | 4 ++-- src/sound/SoundManagerCreator.js | 6 +++--- src/sound/webaudio/WebAudioSoundManager.js | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/Config.js b/src/core/Config.js index 7c8388f6c..daeb3c278 100644 --- a/src/core/Config.js +++ b/src/core/Config.js @@ -293,7 +293,7 @@ var Config = new Class({ /** * @const {Phaser.Types.Core.AudioConfig} Phaser.Core.Config#audio - The Audio Configuration object. */ - this.audio = GetValue(config, 'audio'); + this.audio = GetValue(config, 'audio', {}); // If you do: { banner: false } it won't display any banner at all diff --git a/src/core/DebugHeader.js b/src/core/DebugHeader.js index 6b73761c0..8ecc2f315 100644 --- a/src/core/DebugHeader.js +++ b/src/core/DebugHeader.js @@ -41,11 +41,11 @@ var DebugHeader = function (game) var audioType; - if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio)) + if (deviceAudio.webAudio && !audioConfig.disableWebAudio) { audioType = 'Web Audio'; } - else if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData)) + else if (audioConfig.noAudio || (!deviceAudio.webAudio && !deviceAudio.audioData)) { audioType = 'No Audio'; } diff --git a/src/loader/filetypes/AudioFile.js b/src/loader/filetypes/AudioFile.js index ea49c1e4a..fe1f8e41a 100644 --- a/src/loader/filetypes/AudioFile.js +++ b/src/loader/filetypes/AudioFile.js @@ -122,7 +122,7 @@ AudioFile.create = function (loader, key, urls, config, xhrSettings) // https://developers.google.com/web/updates/2012/02/HTML5-audio-and-the-Web-Audio-API-are-BFFs // var stream = GetFastValue(config, 'stream', false); - if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio)) + if (deviceAudio.webAudio && !audioConfig.disableWebAudio) { return new AudioFile(loader, key, urlConfig, xhrSettings, game.sound.context); } @@ -231,7 +231,7 @@ FileTypesManager.register('audio', function (key, urls, config, xhrSettings) var audioConfig = game.config.audio; var deviceAudio = game.device.audio; - if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData)) + if (audioConfig.noAudio || (!deviceAudio.webAudio && !deviceAudio.audioData)) { // Sounds are disabled, so skip loading audio return this; diff --git a/src/sound/SoundManagerCreator.js b/src/sound/SoundManagerCreator.js index 46c5ec590..fc69d3a42 100644 --- a/src/sound/SoundManagerCreator.js +++ b/src/sound/SoundManagerCreator.js @@ -18,7 +18,7 @@ var WebAudioSoundManager = require('./webaudio/WebAudioSoundManager'); * @since 3.0.0 * * @param {Phaser.Game} game - Reference to the current game instance. - * + * * @return {(Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager|Phaser.Sound.NoAudioSoundManager)} The Sound Manager instance that was created. */ var SoundManagerCreator = { @@ -28,12 +28,12 @@ var SoundManagerCreator = { var audioConfig = game.config.audio; var deviceAudio = game.device.audio; - if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData)) + if (audioConfig.noAudio || (!deviceAudio.webAudio && !deviceAudio.audioData)) { return new NoAudioSoundManager(game); } - if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio)) + if (deviceAudio.webAudio && !audioConfig.disableWebAudio) { return new WebAudioSoundManager(game); } diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index f564a6fb2..a4b2ad99f 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -108,7 +108,7 @@ var WebAudioSoundManager = new Class({ { var audioConfig = game.config.audio; - if (audioConfig && audioConfig.context) + if (audioConfig.context) { audioConfig.context.resume(); @@ -355,7 +355,7 @@ var WebAudioSoundManager = new Class({ this.masterMuteNode.disconnect(); this.masterMuteNode = null; - if (this.game.config.audio && this.game.config.audio.context) + if (this.game.config.audio.context) { this.context.suspend(); } From a04690d5af804767ee7041e3ff5f9a7be8e3d32f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 09:48:13 +0100 Subject: [PATCH 024/153] The `onMouse` events in the Input Manager didn't reset the `activePointer` property to the mouse, meaning on dual-input systems such as Touch Screen devices, the active pointer would become locked to whichever input method was used first. Fix #4615 #5232 --- src/input/InputManager.js | 46 ++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/src/input/InputManager.js b/src/input/InputManager.js index 3dbaceeac..4aead9563 100644 --- a/src/input/InputManager.js +++ b/src/input/InputManager.js @@ -391,7 +391,7 @@ var InputManager = new Class({ /** * Tells the Input system to set a custom cursor. - * + * * This cursor will be the default cursor used when interacting with the game canvas. * * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use. @@ -401,7 +401,7 @@ var InputManager = new Class({ * ```javascript * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer'); * ``` - * + * * Please read about the differences between browsers when it comes to the file formats and sizes they support: * * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor @@ -411,7 +411,7 @@ var InputManager = new Class({ * * @method Phaser.Input.InputManager#setDefaultCursor * @since 3.10.0 - * + * * @param {string} cursor - The CSS to be used when setting the default cursor. */ setDefaultCursor: function (cursor) @@ -426,7 +426,7 @@ var InputManager = new Class({ /** * Called by the InputPlugin when processing over and out events. - * + * * Tells the Input Manager to set a custom cursor during its postUpdate step. * * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor @@ -434,7 +434,7 @@ var InputManager = new Class({ * @method Phaser.Input.InputManager#setCursor * @private * @since 3.10.0 - * + * * @param {Phaser.Types.Input.InteractiveObject} interactiveObject - The Interactive Object that called this method. */ setCursor: function (interactiveObject) @@ -447,13 +447,13 @@ var InputManager = new Class({ /** * Called by the InputPlugin when processing over and out events. - * + * * Tells the Input Manager to clear the hand cursor, if set, during its postUpdate step. * * @method Phaser.Input.InputManager#resetCursor * @private * @since 3.10.0 - * + * * @param {Phaser.Types.Input.InteractiveObject} interactiveObject - The Interactive Object that called this method. */ resetCursor: function (interactiveObject) @@ -712,9 +712,13 @@ var InputManager = new Class({ */ onMouseDown: function (event) { - this.mousePointer.down(event); + var mousePointer = this.mousePointer; - this.mousePointer.updateMotion(); + mousePointer.down(event); + + mousePointer.updateMotion(); + + this.activePointer = mousePointer; this.updateInputPlugins(CONST.MOUSE_DOWN, this.mousePointerContainer); }, @@ -730,9 +734,13 @@ var InputManager = new Class({ */ onMouseMove: function (event) { - this.mousePointer.move(event); + var mousePointer = this.mousePointer; - this.mousePointer.updateMotion(); + mousePointer.move(event); + + mousePointer.updateMotion(); + + this.activePointer = mousePointer; this.updateInputPlugins(CONST.MOUSE_MOVE, this.mousePointerContainer); }, @@ -748,9 +756,13 @@ var InputManager = new Class({ */ onMouseUp: function (event) { - this.mousePointer.up(event); + var mousePointer = this.mousePointer; - this.mousePointer.updateMotion(); + mousePointer.up(event); + + mousePointer.updateMotion(); + + this.activePointer = mousePointer; this.updateInputPlugins(CONST.MOUSE_UP, this.mousePointerContainer); }, @@ -766,7 +778,11 @@ var InputManager = new Class({ */ onMouseWheel: function (event) { - this.mousePointer.wheel(event); + var mousePointer = this.mousePointer; + + mousePointer.wheel(event); + + this.activePointer = mousePointer; this.updateInputPlugins(CONST.MOUSE_WHEEL, this.mousePointerContainer); }, @@ -910,7 +926,7 @@ var InputManager = new Class({ { TransformXY(px, py, gameObject.x, gameObject.y, gameObject.rotation, gameObject.scaleX, gameObject.scaleY, point); } - + if (this.pointWithinHitArea(gameObject, point.x, point.y)) { output.push(gameObject); From 1e1daa572177614f88086566c367791fcca755d5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 09:48:17 +0100 Subject: [PATCH 025/153] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea11e3b54..6a5ea88e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -460,6 +460,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * Previously, the `easeParams` array within a Tweens `props` object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292 (thanks @willblackmore) * When using `Camera.setRenderToTexture` its `zoom` and `rotation` values would be applied twice. Fix #4221 #4924 #4713 (thanks @wayfu @DanMcgraw @pavel-shirobok) * `GameObjects.Shape.Grid` would render a white fill even if you passed `undefined` as the fill color in the constructor. It now doesn't render cells if no fill color is given. +* The `onMouse` events in the Input Manager didn't reset the `activePointer` property to the mouse, meaning on dual-input systems such as Touch Screen devices, the active pointer would become locked to whichever input method was used first. Fix #4615 #5232 (thanks @mmolina01 @JstnPwll @Legomite) ### Examples, Documentation and TypeScript From e0fe293f98f1afb999aa22ab38aa7536ab1c60f5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 09:58:28 +0100 Subject: [PATCH 026/153] Create .gitattributes --- .gitattributes | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..871b5b8db --- /dev/null +++ b/.gitattributes @@ -0,0 +1,13 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text=auto + +# Explicitly declare text files you want to always be normalized and converted +# to native line endings on checkout. +*.js text +*.ts text +*.md text +*.json text + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.jpg binary From 0a20245a77c0bcdf73a8e0fadd936d47bb39714b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 09:59:10 +0100 Subject: [PATCH 027/153] Update LICENSE.md --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index b9b394852..762ee78db 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Richard Davey, Photon Storm Ltd. +Copyright (c) 2020 Richard Davey, Photon Storm Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in From 3969d6e45a0c8e43825ee9822818f877c9eef818 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 10:08:22 +0100 Subject: [PATCH 028/153] Updated JSDocs to cover situation in #3858 --- src/gameobjects/container/Container.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gameobjects/container/Container.js b/src/gameobjects/container/Container.js index 5586bd936..42f865e74 100644 --- a/src/gameobjects/container/Container.js +++ b/src/gameobjects/container/Container.js @@ -44,6 +44,9 @@ var Vector2 = require('../../math/Vector2'); * * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them * to use as their hit area. Container children can also be enabled for input, independent of the Container. + * + * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child, + * or the input area will become misaligned. * * 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, From b3ee59b0bb944a6b4809047b4ffcf636c416c06e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 10:16:25 +0100 Subject: [PATCH 029/153] Remove eol setting, let git handle it --- .editorconfig | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.editorconfig b/.editorconfig index d699abc5a..2536d66bf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,13 +1,12 @@ -# http://editorconfig.org -root = true - -[*] -indent_style = space -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false From 77ac89e59b18d94e7b413c3b18069f2cdbc34a97 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 10:16:31 +0100 Subject: [PATCH 030/153] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a5ea88e0..c101fb4d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -466,7 +466,7 @@ The Animation API has had a significant overhaul to improve playback handling. I 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 @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards @rexrainbow +@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards @rexrainbow @Riderrr From 0aea690497310aec66a6c4f88efdfec78317feea Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 10:59:20 +0100 Subject: [PATCH 031/153] Removed `inputMouseCapture` and added configs for `inputMousePrventDefaultDown`, `Up` and `Move` instead. --- src/core/Config.js | 14 ++++++++++++-- src/core/typedefs/MouseInputConfig.js | 4 +++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/core/Config.js b/src/core/Config.js index 7c8388f6c..eba02ba7d 100644 --- a/src/core/Config.js +++ b/src/core/Config.js @@ -241,9 +241,19 @@ var Config = new Class({ this.inputMouseEventTarget = GetValue(config, 'input.mouse.target', null); /** - * @const {boolean} Phaser.Core.Config#inputMouseCapture - Should mouse events be captured? I.e. have prevent default called on them. + * @const {boolean} Phaser.Core.Config#inputMousePreventDefaultDown - Should `mousedown` events be captured? I.e. have prevent default called on them. */ - this.inputMouseCapture = GetValue(config, 'input.mouse.capture', true); + this.inputMousePreventDefaultDown = GetValue(config, 'input.mouse.preventDefaultDown', true); + + /** + * @const {boolean} Phaser.Core.Config#inputMousePreventDefaultUp - Should `mouseup` events be captured? I.e. have prevent default called on them. + */ + this.inputMousePreventDefaultUp = GetValue(config, 'input.mouse.preventDefaultUp', true); + + /** + * @const {boolean} Phaser.Core.Config#inputMousePreventDefaultMove - Should `mousemove` events be captured? I.e. have prevent default called on them. + */ + this.inputMousePreventDefaultMove = GetValue(config, 'input.mouse.preventDefaultMove', true); /** * @const {boolean} Phaser.Core.Config#inputTouch - Enable the Touch Plugin. This can be disabled in games that don't need touch input. diff --git a/src/core/typedefs/MouseInputConfig.js b/src/core/typedefs/MouseInputConfig.js index 56270c306..fc0891873 100644 --- a/src/core/typedefs/MouseInputConfig.js +++ b/src/core/typedefs/MouseInputConfig.js @@ -3,5 +3,7 @@ * @since 3.0.0 * * @property {*} [target=null] - Where the Mouse Manager listens for mouse input events. The default is the game canvas. - * @property {boolean} [capture=true] - Whether mouse input events have `preventDefault` called on them. + * @property {boolean} [preventDefaultDown=true] - If `true` the DOM `mousedown` event will have `preventDefault` set. + * @property {boolean} [preventDefaultUp=true] - If `true` the DOM `mouseup` event will have `preventDefault` set. + * @property {boolean} [preventDefaultMove=true] - If `true` the DOM `mousemove` event will have `preventDefault` set. */ From 56bbfbcb62b4cade5db988c9870d36053c983fb8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 10:59:47 +0100 Subject: [PATCH 032/153] Removed `capture` and added `preventDefaultDown`, `Up` and `Move` instead. Also better passive handling and smaller listeners. --- src/input/mouse/MouseManager.js | 112 +++++++++++++++++++------------- 1 file changed, 68 insertions(+), 44 deletions(-) diff --git a/src/input/mouse/MouseManager.js b/src/input/mouse/MouseManager.js index 154d9d393..8514aadd4 100644 --- a/src/input/mouse/MouseManager.js +++ b/src/input/mouse/MouseManager.js @@ -43,14 +43,34 @@ var MouseManager = new Class({ this.manager = inputManager; /** - * If true the DOM mouse events will have event.preventDefault applied to them, if false they will propagate fully. + * If `true` the DOM `mousedown` event will have `preventDefault` set. * - * @name Phaser.Input.Mouse.MouseManager#capture + * @name Phaser.Input.Mouse.MouseManager#preventDefaultDown * @type {boolean} * @default true - * @since 3.0.0 + * @since 3.50.0 */ - this.capture = true; + this.preventDefaultDown = true; + + /** + * If `true` the DOM `mouseup` event will have `preventDefault` set. + * + * @name Phaser.Input.Mouse.MouseManager#preventDefaultUp + * @type {boolean} + * @default true + * @since 3.50.0 + */ + this.preventDefaultUp = true; + + /** + * If `true` the DOM `mousemove` event will have `preventDefault` set. + * + * @name Phaser.Input.Mouse.MouseManager#preventDefaultMove + * @type {boolean} + * @default true + * @since 3.50.0 + */ + this.preventDefaultMove = true; /** * A boolean that controls if the Mouse Manager is enabled or not. @@ -198,7 +218,11 @@ var MouseManager = new Class({ this.enabled = config.inputMouse; this.target = config.inputMouseEventTarget; - this.capture = config.inputMouseCapture; + this.passive = config.inputMousePassive; + + this.preventDefaultDown = config.inputMousePreventDefaultDown; + this.preventDefaultUp = config.inputMousePreventDefaultUp; + this.preventDefaultMove = config.inputMousePreventDefaultMove; if (!this.target) { @@ -297,17 +321,25 @@ var MouseManager = new Class({ */ startListeners: function () { + var target = this.target; + + if (!target) + { + return; + } + var _this = this; - var canvas = this.manager.canvas; - var autoFocus = (window && window.focus && this.manager.game.config.autoFocus); + var manager = this.manager; + var canvas = manager.canvas; + var autoFocus = (window && window.focus && manager.game.config.autoFocus); this.onMouseMove = function (event) { - if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) + if (!event.defaultPrevented && _this.enabled && manager && manager.enabled) { - _this.manager.onMouseMove(event); + manager.onMouseMove(event); - if (_this.capture) + if (_this.preventDefaultMove) { event.preventDefault(); } @@ -321,11 +353,11 @@ var MouseManager = new Class({ window.focus(); } - if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) + if (!event.defaultPrevented && _this.enabled && manager && manager.enabled) { - _this.manager.onMouseDown(event); + manager.onMouseDown(event); - if (_this.capture && event.target === canvas) + if (_this.preventDefaultDown && event.target === canvas) { event.preventDefault(); } @@ -334,20 +366,20 @@ var MouseManager = new Class({ this.onMouseDownWindow = function (event) { - if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas) + if (!event.defaultPrevented && _this.enabled && manager && manager.enabled && event.target !== canvas) { // Only process the event if the target isn't the canvas - _this.manager.onMouseDown(event); + manager.onMouseDown(event); } }; this.onMouseUp = function (event) { - if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) + if (!event.defaultPrevented && _this.enabled && manager && manager.enabled) { - _this.manager.onMouseUp(event); + manager.onMouseUp(event); - if (_this.capture && event.target === canvas) + if (_this.preventDefaultUp && event.target === canvas) { event.preventDefault(); } @@ -356,58 +388,50 @@ var MouseManager = new Class({ this.onMouseUpWindow = function (event) { - if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas) + if (!event.defaultPrevented && _this.enabled && manager && manager.enabled && event.target !== canvas) { // Only process the event if the target isn't the canvas - _this.manager.onMouseUp(event); + manager.onMouseUp(event); } }; this.onMouseOver = function (event) { - if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) + if (!event.defaultPrevented && _this.enabled && manager && manager.enabled) { - _this.manager.setCanvasOver(event); + manager.setCanvasOver(event); } }; this.onMouseOut = function (event) { - if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) + if (!event.defaultPrevented && _this.enabled && manager && manager.enabled) { - _this.manager.setCanvasOut(event); + manager.setCanvasOut(event); } }; this.onMouseWheel = function (event) { - if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) + if (!event.defaultPrevented && _this.enabled && manager && manager.enabled) { - _this.manager.onMouseWheel(event); + manager.onMouseWheel(event); } }; - var target = this.target; - - if (!target) - { - return; - } - var passive = { passive: true }; - var nonPassive = { passive: false }; - target.addEventListener('mousemove', this.onMouseMove, (this.capture) ? nonPassive : passive); - target.addEventListener('mousedown', this.onMouseDown, (this.capture) ? nonPassive : passive); - target.addEventListener('mouseup', this.onMouseUp, (this.capture) ? nonPassive : passive); - target.addEventListener('mouseover', this.onMouseOver, (this.capture) ? nonPassive : passive); - target.addEventListener('mouseout', this.onMouseOut, (this.capture) ? nonPassive : passive); - target.addEventListener('wheel', this.onMouseWheel, (this.capture) ? nonPassive : passive); + target.addEventListener('mousemove', this.onMouseMove); + target.addEventListener('mousedown', this.onMouseDown); + target.addEventListener('mouseup', this.onMouseUp); + target.addEventListener('mouseover', this.onMouseOver, passive); + target.addEventListener('mouseout', this.onMouseOut, passive); + target.addEventListener('wheel', this.onMouseWheel, passive); - if (window && this.manager.game.config.inputWindowEvents) + if (window && manager.game.config.inputWindowEvents) { - window.top.addEventListener('mousedown', this.onMouseDownWindow, nonPassive); - window.top.addEventListener('mouseup', this.onMouseUpWindow, nonPassive); + window.top.addEventListener('mousedown', this.onMouseDownWindow, passive); + window.top.addEventListener('mouseup', this.onMouseUpWindow, passive); } if (Features.pointerLock) @@ -418,7 +442,7 @@ var MouseManager = new Class({ _this.locked = (document.pointerLockElement === element || document.mozPointerLockElement === element || document.webkitPointerLockElement === element) ? true : false; - _this.manager.onPointerLockChange(event); + manager.onPointerLockChange(event); }; document.addEventListener('pointerlockchange', this.pointerLockChange, true); From 0d57de02ee73228afb9493d09841491174f7b020 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 10:59:51 +0100 Subject: [PATCH 033/153] Update CHANGELOG.md --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c101fb4d3..f8a2c28b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -379,6 +379,18 @@ The Animation API has had a significant overhaul to improve playback handling. I * `Utils.Array.SortByDigits` is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits. * `GroupCreateConfig`, which is used when calling `Group.createMultiple` or `Group.createFromConfig`, can now accept the following new properties: `setOrigin: { x, y, stepX, stepY }` which are applied to the items created by the Group. +### Input / Mouse Updates and API Changes + +* The Game Config property `inputMouseCapture` has been removed, as this is now split into 3 new config options: +* `inputMousePreventDefaultDown` is a new config option that allows you to control `preventDefault` calls specifically on mouse down events. Set it via `input.mouse.preventDefaultDown` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. +* `inputMousePreventDefaultUp` is a new config option that allows you to control `preventDefault` calls specifically on mouse up events. Set it via `input.mouse.preventDefaultUp` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. +* `inputMousePreventDefaultMove` is a new config option that allows you to control `preventDefault` calls specifically on mouse move events. Set it via `input.mouse.preventDefaultMove` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. +* The `MouseManager.capture` property has been removed, as this is now split into 3 new config options (see below) +* `MouseManager.preventDefaultDown` is a new boolean property, set via the `inputMousePreventDefaultDown` config option that allows you to toggle capture of mouse down events at runtime. +* `MouseManager.preventDefaultUp` is a new boolean property, set via the `inputMousePreventDefaultUp` config option that allows you to toggle capture of mouse up events at runtime. +* `MouseManager.preventDefaultMove` is a new boolean property, set via the `inputMousePreventDefaultMove` config option that allows you to toggle capture of mouse move events at runtime. +* In the `MouseManager` the up, down and move events are no longer set as being passive if captured. Over, Out, Wheel and the Window level Down and Up events are always flagged as being passive. + ### Updates and API Changes * Earcut, used for polygon triangulation, has been updated from 2.1.4 to 2.2.2. @@ -421,6 +433,22 @@ The Animation API has had a significant overhaul to improve playback handling. I * You can now set the `ArcadeWorld.fixedStep` property via the `ArcadeWorldConfig` object (thanks @samme) * `Utils.Array.NumerArray` can now accept the `start` and `end` parameters in reverse order, i.e. `10, 1` will generate a number array running from 10 to 1. Internally it has also been optimized to skip string based returns. +### Bug Fixes + +* `RenderTexture.resize` (which is called from `setSize`) wouldn't correctly set the `TextureSource.glTexture` property, leading to `bindTexture: attempt to use a deleted object` errors under WebGL. +* `RenderTexture.fill` would fail to fill the correct area under WebGL if the RenderTexture wasn't the same size as the Canvas. It now fills the given region properly. +* The `MatterAttractors` plugin, which enables attractors between bodies, has been fixed. The original plugin only worked if the body with the attractor was _first_ in the world bodies list. It can now attract any body, no matter where in the world list it is. Fix #5160 (thanks @strahius) +* The `KeyboardManager` and `KeyboardPlugin` were both still checking for the `InputManager.useQueue` property, which was removed several versions ago. +* In Arcade Physics, Dynamic bodies would no longer hit walls when riding on horizontally moving platforms. The horizontal (and vertical) friction is now re-applied correctly in these edge-cases. Fix #5210 (thanks @Dercetech @samme) +* Calling `Rectangle.setSize()` wouldn't change the underlying geometry of the Shape Game Object, causing any stroke to be incorrectly rendered after a size change. +* The `ProcessQueue` was emitting the wrong events internally. It now emits 'add' and 'remove' correctly (thanks @halilcakar) +* The `GridAlign` action didn't work if only the `height` parameter was set. Fix #5019 (thanks @halilcakar) +* The `Color.HSVToRGB` function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089 (thanks @DiamondeX) +* Previously, the `easeParams` array within a Tweens `props` object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292 (thanks @willblackmore) +* When using `Camera.setRenderToTexture` its `zoom` and `rotation` values would be applied twice. Fix #4221 #4924 #4713 (thanks @wayfu @DanMcgraw @pavel-shirobok) +* `GameObjects.Shape.Grid` would render a white fill even if you passed `undefined` as the fill color in the constructor. It now doesn't render cells if no fill color is given. +* The `onMouse` events in the Input Manager didn't reset the `activePointer` property to the mouse, meaning on dual-input systems such as Touch Screen devices, the active pointer would become locked to whichever input method was used first. Fix #4615 #5232 (thanks @mmolina01 @JstnPwll @Legomite) + ### Namespace Updates * The `Phaser.Curves.MoveTo` function has now been exposed on the Phaser namespace (thanks @samme) @@ -446,22 +474,6 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `Phaser.Tilemaps.Parsers.Tiled` function has now been exposed on the Phaser namespace (thanks @samme) * Every single `Tilemap.Component` function has now been made public. This means you can call the Component functions directly, should you need to, outside of the Tilemap system. -### Bug Fixes - -* `RenderTexture.resize` (which is called from `setSize`) wouldn't correctly set the `TextureSource.glTexture` property, leading to `bindTexture: attempt to use a deleted object` errors under WebGL. -* `RenderTexture.fill` would fail to fill the correct area under WebGL if the RenderTexture wasn't the same size as the Canvas. It now fills the given region properly. -* The `MatterAttractors` plugin, which enables attractors between bodies, has been fixed. The original plugin only worked if the body with the attractor was _first_ in the world bodies list. It can now attract any body, no matter where in the world list it is. Fix #5160 (thanks @strahius) -* The `KeyboardManager` and `KeyboardPlugin` were both still checking for the `InputManager.useQueue` property, which was removed several versions ago. -* In Arcade Physics, Dynamic bodies would no longer hit walls when riding on horizontally moving platforms. The horizontal (and vertical) friction is now re-applied correctly in these edge-cases. Fix #5210 (thanks @Dercetech @samme) -* Calling `Rectangle.setSize()` wouldn't change the underlying geometry of the Shape Game Object, causing any stroke to be incorrectly rendered after a size change. -* The `ProcessQueue` was emitting the wrong events internally. It now emits 'add' and 'remove' correctly (thanks @halilcakar) -* The `GridAlign` action didn't work if only the `height` parameter was set. Fix #5019 (thanks @halilcakar) -* The `Color.HSVToRGB` function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089 (thanks @DiamondeX) -* Previously, the `easeParams` array within a Tweens `props` object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292 (thanks @willblackmore) -* When using `Camera.setRenderToTexture` its `zoom` and `rotation` values would be applied twice. Fix #4221 #4924 #4713 (thanks @wayfu @DanMcgraw @pavel-shirobok) -* `GameObjects.Shape.Grid` would render a white fill even if you passed `undefined` as the fill color in the constructor. It now doesn't render cells if no fill color is given. -* The `onMouse` events in the Input Manager didn't reset the `activePointer` property to the mouse, meaning on dual-input systems such as Touch Screen devices, the active pointer would become locked to whichever input method was used first. Fix #4615 #5232 (thanks @mmolina01 @JstnPwll @Legomite) - ### 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: From 57657ce76c915726b09d6fb6c5d4d86d5495711e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 11:08:43 +0100 Subject: [PATCH 034/153] Updated JSDocs. Fix #5268 --- src/input/mouse/MouseManager.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/input/mouse/MouseManager.js b/src/input/mouse/MouseManager.js index 8514aadd4..cd2a3519a 100644 --- a/src/input/mouse/MouseManager.js +++ b/src/input/mouse/MouseManager.js @@ -280,6 +280,12 @@ var MouseManager = new Class({ * It is important to note that pointer lock can only be enabled after an 'engagement gesture', * see: https://w3c.github.io/pointerlock/#dfn-engagement-gesture. * + * Note for Firefox: There is a bug in certain Firefox releases that cause native DOM events like + * `mousemove` to fire continuously when in pointer lock mode. You can get around this by setting + * `this.preventDefaultMove` to `false` in this class. You may also need to do the same for + * `preventDefaultDown` and/or `preventDefaultUp`. Please test combinations of these if you encounter + * the error. + * * @method Phaser.Input.Mouse.MouseManager#requestPointerLock * @since 3.0.0 */ From e8a8dd53e7375e3eb6fe66f432e09cdd73b99c40 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 11:08:45 +0100 Subject: [PATCH 035/153] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8a2c28b2..1af0fc4bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -478,7 +478,7 @@ The Animation API has had a significant overhaul to improve playback handling. I 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 @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards @rexrainbow @Riderrr +@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards @rexrainbow @Riderrr @spwilson2 From ce236f0d69288a92d1636ce1abf256c516f970de Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 12:10:10 +0100 Subject: [PATCH 036/153] `ScaleManager.refresh` is now called when the `Game.READY` event fires. This fixes a bug where the Scale Manager would have the incorrect canvas bounds, because they were calculated before a previous canvas was removed from the DOM. Fix #4905 --- src/scale/ScaleManager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scale/ScaleManager.js b/src/scale/ScaleManager.js index 0e74dd6a1..61357201a 100644 --- a/src/scale/ScaleManager.js +++ b/src/scale/ScaleManager.js @@ -421,7 +421,7 @@ var ScaleManager = new Class({ // Parse the config to get the scaling values we need this.parseConfig(this.game.config); - this.game.events.once('boot', this.boot, this); + this.game.events.once(GameEvents.BOOT, this.boot, this); }, /** @@ -464,6 +464,7 @@ var ScaleManager = new Class({ } game.events.on(GameEvents.PRE_STEP, this.step, this); + game.events.once(GameEvents.READY, this.refresh, this); game.events.once(GameEvents.DESTROY, this.destroy, this); this.startListeners(); From fc6240cca885ab8f8df8d7754fc77290258fd51d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 12:10:14 +0100 Subject: [PATCH 037/153] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1af0fc4bd..f59ba717f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -381,6 +381,7 @@ The Animation API has had a significant overhaul to improve playback handling. I ### Input / Mouse Updates and API Changes +* `ScaleManager.refresh` is now called when the `Game.READY` event fires. This fixes a bug where the Scale Manager would have the incorrect canvas bounds, because they were calculated before a previous canvas was removed from the DOM. Fix #4905 (thanks @PavelMishin) * The Game Config property `inputMouseCapture` has been removed, as this is now split into 3 new config options: * `inputMousePreventDefaultDown` is a new config option that allows you to control `preventDefault` calls specifically on mouse down events. Set it via `input.mouse.preventDefaultDown` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. * `inputMousePreventDefaultUp` is a new config option that allows you to control `preventDefault` calls specifically on mouse up events. Set it via `input.mouse.preventDefaultUp` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. From c90a3847e47dd76891bc4f1f8166f043eac911c5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 12:21:39 +0100 Subject: [PATCH 038/153] `DataManager.Events.DESTROY` is a new event that the Data Manager will _listen_ for from its parent and then call its own `destroy` method when received. --- src/data/DataManager.js | 36 ++++++++++++++++---------------- src/data/events/DESTROY_EVENT.js | 15 +++++++++++++ src/data/events/index.js | 1 + 3 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 src/data/events/DESTROY_EVENT.js diff --git a/src/data/DataManager.js b/src/data/DataManager.js index c5ba0b93e..437a29356 100644 --- a/src/data/DataManager.js +++ b/src/data/DataManager.js @@ -79,13 +79,13 @@ var DataManager = new Class({ * ``` * * You can also modify it directly: - * + * * ```javascript * this.data.values.gold += 1000; * ``` * * Doing so will emit a `setdata` event from the parent of this Data Manager. - * + * * Do not modify this object directly. Adding properties directly to this object will not * emit any events. Always use `DataManager.set` to create new items the first time around. * @@ -109,7 +109,7 @@ var DataManager = new Class({ if (!parent.hasOwnProperty('sys') && this.events) { - this.events.once('destroy', this.destroy, this); + this.events.once(Events.DESTROY, this.destroy, this); } }, @@ -117,19 +117,19 @@ var DataManager = new Class({ * Retrieves the value for the given key, or undefined if it doesn't exist. * * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: - * + * * ```javascript * this.data.get('gold'); * ``` * * Or access the value directly: - * + * * ```javascript * this.data.values.gold; * ``` * * You can also pass in an array of keys, in which case an array of values will be returned: - * + * * ```javascript * this.data.get([ 'gold', 'armor', 'health' ]); * ``` @@ -214,7 +214,7 @@ var DataManager = new Class({ /** * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created. - * + * * ```javascript * data.set('name', 'Red Gem Stone'); * ``` @@ -226,13 +226,13 @@ var DataManager = new Class({ * ``` * * To get a value back again you can call `get`: - * + * * ```javascript * data.get('gold'); * ``` - * + * * Or you can access the value directly via the `values` property, where it works like any other variable: - * + * * ```javascript * data.values.gold += 50; * ``` @@ -281,9 +281,9 @@ var DataManager = new Class({ /** * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0. - * + * * When the value is first set, a `setdata` event is emitted. - * + * * @method Phaser.Data.DataManager#inc * @fires Phaser.Data.Events#SET_DATA * @fires Phaser.Data.Events#CHANGE_DATA @@ -320,9 +320,9 @@ var DataManager = new Class({ /** * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false. - * + * * When the value is first set, a `setdata` event is emitted. - * + * * @method Phaser.Data.DataManager#toggle * @fires Phaser.Data.Events#SET_DATA * @fires Phaser.Data.Events#CHANGE_DATA @@ -382,7 +382,7 @@ var DataManager = new Class({ Object.defineProperty(this.values, key, { enumerable: true, - + configurable: true, get: function () @@ -482,9 +482,9 @@ var DataManager = new Class({ * * If the key is found in this Data Manager it is removed from the internal lists and a * `removedata` event is emitted. - * + * * You can also pass in an array of keys, in which case all keys in the array will be removed: - * + * * ```javascript * this.data.remove([ 'gold', 'armor', 'health' ]); * ``` @@ -576,7 +576,7 @@ var DataManager = new Class({ /** * Determines whether the given key is set in this Data Manager. - * + * * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings. * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. * diff --git a/src/data/events/DESTROY_EVENT.js b/src/data/events/DESTROY_EVENT.js new file mode 100644 index 000000000..de5f4eb3b --- /dev/null +++ b/src/data/events/DESTROY_EVENT.js @@ -0,0 +1,15 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Data Manager Destroy Event. + * + * The Data Manager will listen for the destroy event from its parent, and then close itself down. + * + * @event Phaser.Data.Events#DESTROY + * @since 3.50.0 + */ +module.exports = 'destroy'; diff --git a/src/data/events/index.js b/src/data/events/index.js index 11c85b5e4..ce54d6edb 100644 --- a/src/data/events/index.js +++ b/src/data/events/index.js @@ -12,6 +12,7 @@ module.exports = { CHANGE_DATA: require('./CHANGE_DATA_EVENT'), CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'), + DESTROY: require('./DESTROY_EVENT'), REMOVE_DATA: require('./REMOVE_DATA_EVENT'), SET_DATA: require('./SET_DATA_EVENT') From 00b799db233b25558f740e9c4f999397505f3e83 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 12:23:33 +0100 Subject: [PATCH 039/153] Use Event const, not string. --- src/gameobjects/video/Video.js | 279 +++++++++++++++++---------------- 1 file changed, 140 insertions(+), 139 deletions(-) diff --git a/src/gameobjects/video/Video.js b/src/gameobjects/video/Video.js index 82ae064cb..b1154f385 100644 --- a/src/gameobjects/video/Video.js +++ b/src/gameobjects/video/Video.js @@ -9,6 +9,7 @@ var Clamp = require('../../math/Clamp'); var Components = require('../components'); var Events = require('../events'); var GameEvents = require('../../core/events/'); +var InputEvents = require('../../input/events/'); var GameObject = require('../GameObject'); var SoundEvents = require('../../sound/events/'); var UUID = require('../../utils/string/UUID'); @@ -18,51 +19,51 @@ var MATH_CONST = require('../../math/const'); /** * @classdesc * A Video Game Object. - * + * * This Game Object is capable of handling playback of a previously loaded video from the Phaser Video Cache, * or playing a video based on a given URL. Videos can be either local, or streamed. - * + * * ```javascript * preload () { * this.load.video('pixar', 'nemo.mp4'); * } - * + * * create () { * this.add.video(400, 300, 'pixar'); * } * ``` - * + * * To all intents and purposes, a video is a standard Game Object, just like a Sprite. And as such, you can do * all the usual things to it, such as scaling, rotating, cropping, tinting, making interactive, giving a * physics body, etc. - * + * * Transparent videos are also possible via the WebM file format. Providing the video file has was encoded with * an alpha channel, and providing the browser supports WebM playback (not all of them do), then it will render * in-game with full transparency. - * + * * ### Autoplaying Videos - * + * * Videos can only autoplay if the browser has been unlocked with an interaction, or satisfies the MEI settings. * The policies that control autoplaying are vast and vary between browser. * You can, ahd should, read more about it here: https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide - * + * * If your video doesn't contain any audio, then set the `noAudio` parameter to `true` when the video is _loaded_, * and it will often allow the video to play immediately: - * + * * ```javascript * preload () { * this.load.video('pixar', 'nemo.mp4', 'loadeddata', false, true); * } * ``` - * + * * The 5th parameter in the load call tells Phaser that the video doesn't contain any audio tracks. Video without * audio can autoplay without requiring a user interaction. Video with audio cannot do this unless it satisfies * the browsers MEI settings. See the MDN Autoplay Guide for further details. - * + * * Note that due to a bug in IE11 you cannot play a video texture to a Sprite in WebGL. For IE11 force Canvas mode. - * + * * More details about video playback and the supported media formats can be found on MDN: - * + * * https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement * https://developer.mozilla.org/en-US/docs/Web/Media/Formats * @@ -401,34 +402,34 @@ var Video = new Class({ * Starts this video playing. * * If the video is already playing, or has been queued to play with `changeSource` then this method just returns. - * + * * Videos can only autoplay if the browser has been unlocked. This happens if you have interacted with the browser, i.e. * by clicking on it or pressing a key, or due to server settings. The policies that control autoplaying are vast and * vary between browser. You can read more here: https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide - * + * * If your video doesn't contain any audio, then set the `noAudio` parameter to `true` when the video is loaded, * and it will often allow the video to play immediately: - * + * * ```javascript * preload () { * this.load.video('pixar', 'nemo.mp4', 'loadeddata', false, true); * } * ``` - * + * * The 5th parameter in the load call tells Phaser that the video doesn't contain any audio tracks. Video without * audio can autoplay without requiring a user interaction. Video with audio cannot do this unless it satisfies * the browsers MEI settings. See the MDN Autoplay Guide for details. - * + * * If you need audio in your videos, then you'll have to consider the fact that the video cannot start playing until the * user has interacted with the browser, into your game flow. * * @method Phaser.GameObjects.Video#play * @since 3.20.0 - * + * * @param {boolean} [loop=false] - Should the video loop automatically when it reaches the end? Please note that not all browsers support _seamless_ video looping for all encoding formats. * @param {integer} [markerIn] - Optional in marker time, in seconds, for playback of a sequence of the video. * @param {integer} [markerOut] - Optional out marker time, in seconds, for playback of a sequence of the video. - * + * * @return {this} This Video Game Object for method chaining. */ play: function (loop, markerIn, markerOut) @@ -450,7 +451,7 @@ var Video = new Class({ if (loop === undefined) { loop = video.loop; } var sound = this.scene.sys.sound; - + if (sound && sound.mute) { // Mute will be set based on the global mute state of the Sound Manager (if there is one) @@ -504,20 +505,20 @@ var Video = new Class({ * This method allows you to change the source of the current video element. It works by first stopping the * current video, if playing. Then deleting the video texture, if one has been created. Finally, it makes a * new video texture and starts playback of the new source through the existing video element. - * + * * The reason you may wish to do this is because videos that require interaction to unlock, remain in an unlocked * state, even if you change the source of the video. By changing the source to a new video you avoid having to * go through the unlock process again. * * @method Phaser.GameObjects.Video#changeSource * @since 3.20.0 - * + * * @param {string} key - The key of the Video this Game Object will swap to playing, as stored in the Video Cache. * @param {boolean} [autoplay=true] - Should the video start playing immediately, once the swap is complete? * @param {boolean} [loop=false] - Should the video loop automatically when it reaches the end? Please note that not all browsers support _seamless_ video looping for all encoding formats. * @param {integer} [markerIn] - Optional in marker time, in seconds, for playback of a sequence of the video. * @param {integer} [markerOut] - Optional out marker time, in seconds, for playback of a sequence of the video. - * + * * @return {this} This Video Game Object for method chaining. */ changeSource: function (key, autoplay, loop, markerIn, markerOut) @@ -549,7 +550,7 @@ var Video = new Class({ this.videoTexture = this.scene.sys.textures.create(this._key, newVideo, newVideo.videoWidth, newVideo.videoHeight); this.videoTextureSource = this.videoTexture.source[0]; this.videoTexture.add('__BASE', 0, 0, 0, newVideo.videoWidth, newVideo.videoHeight); - + this.setTexture(this.videoTexture); this.setSizeToFrame(); this.updateDisplayOrigin(); @@ -580,23 +581,23 @@ var Video = new Class({ /** * Adds a sequence marker to this video. - * + * * Markers allow you to split a video up into sequences, delineated by a start and end time, given in seconds. - * + * * You can then play back specific markers via the `playMarker` method. - * + * * Note that marker timing is _not_ frame-perfect. You should construct your videos in such a way that you allow for * plenty of extra padding before and after each sequence to allow for discrepancies in browser seek and currentTime accuracy. - * + * * See https://github.com/w3c/media-and-entertainment/issues/4 for more details about this issue. * * @method Phaser.GameObjects.Video#addMarker * @since 3.20.0 - * + * * @param {string} key - A unique name to give this marker. * @param {integer} markerIn - The time, in seconds, representing the start of this marker. * @param {integer} markerOut - The time, in seconds, representing the end of this marker. - * + * * @return {this} This Video Game Object for method chaining. */ addMarker: function (key, markerIn, markerOut) @@ -611,21 +612,21 @@ var Video = new Class({ /** * Plays a pre-defined sequence in this video. - * + * * Markers allow you to split a video up into sequences, delineated by a start and end time, given in seconds and * specified via the `addMarker` method. - * + * * Note that marker timing is _not_ frame-perfect. You should construct your videos in such a way that you allow for * plenty of extra padding before and after each sequence to allow for discrepancies in browser seek and currentTime accuracy. - * + * * See https://github.com/w3c/media-and-entertainment/issues/4 for more details about this issue. * * @method Phaser.GameObjects.Video#playMarker * @since 3.20.0 - * + * * @param {string} key - The name of the marker sequence to play. * @param {boolean} [loop=false] - Should the video loop automatically when it reaches the end? Please note that not all browsers support _seamless_ video looping for all encoding formats. - * + * * @return {this} This Video Game Object for method chaining. */ playMarker: function (key, loop) @@ -642,14 +643,14 @@ var Video = new Class({ /** * Removes a previously set marker from this video. - * + * * If the marker is currently playing it will _not_ stop playback. * * @method Phaser.GameObjects.Video#removeMarker * @since 3.20.0 - * + * * @param {string} key - The name of the marker to remove. - * + * * @return {this} This Video Game Object for method chaining. */ removeMarker: function (key) @@ -662,17 +663,17 @@ var Video = new Class({ /** * Takes a snapshot of the current frame of the video and renders it to a CanvasTexture object, * which is then returned. You can optionally resize the grab by passing a width and height. - * + * * This method returns a reference to the `Video.snapshotTexture` object. Calling this method * multiple times will overwrite the previous snapshot with the most recent one. * * @method Phaser.GameObjects.Video#snapshot * @since 3.20.0 - * + * * @param {integer} [width] - The width of the resulting CanvasTexture. * @param {integer} [height] - The height of the resulting CanvasTexture. - * - * @return {Phaser.Textures.CanvasTexture} + * + * @return {Phaser.Textures.CanvasTexture} */ snapshot: function (width, height) { @@ -685,21 +686,21 @@ var Video = new Class({ /** * Takes a snapshot of the specified area of the current frame of the video and renders it to a CanvasTexture object, * which is then returned. You can optionally resize the grab by passing a different `destWidth` and `destHeight`. - * + * * This method returns a reference to the `Video.snapshotTexture` object. Calling this method * multiple times will overwrite the previous snapshot with the most recent one. * * @method Phaser.GameObjects.Video#snapshotArea * @since 3.20.0 - * + * * @param {integer} [x=0] - The horizontal location of the top-left of the area to grab from. * @param {integer} [y=0] - The vertical location of the top-left of the area to grab from. * @param {integer} [srcWidth] - The width of area to grab from the video. If not given it will grab the full video dimensions. * @param {integer} [srcHeight] - The height of area to grab from the video. If not given it will grab the full video dimensions. * @param {integer} [destWidth] - The destination width of the grab, allowing you to resize it. * @param {integer} [destHeight] - The destination height of the grab, allowing you to resize it. - * - * @return {Phaser.Textures.CanvasTexture} + * + * @return {Phaser.Textures.CanvasTexture} */ snapshotArea: function (x, y, srcWidth, srcHeight, destWidth, destHeight) { @@ -739,27 +740,27 @@ var Video = new Class({ /** * Stores a copy of this Videos `snapshotTexture` in the Texture Manager using the given key. - * + * * This texture is created when the `snapshot` or `snapshotArea` methods are called. - * + * * After doing this, any texture based Game Object, such as a Sprite, can use the contents of the * snapshot by using the texture key: - * + * * ```javascript * var vid = this.add.video(0, 0, 'intro'); - * + * * vid.snapshot(); - * + * * vid.saveSnapshotTexture('doodle'); - * + * * this.add.image(400, 300, 'doodle'); * ``` - * + * * Updating the contents of the `snapshotTexture`, for example by calling `snapshot` again, * will automatically update _any_ Game Object that is using it as a texture. * Calling `saveSnapshotTexture` again will not save another copy of the same texture, * it will just rename the existing one. - * + * * By default it will create a single base texture. You can add frames to the texture * by using the `Texture.add` method. After doing this, you can then allow Game Objects * to use a specific frame. @@ -787,18 +788,18 @@ var Video = new Class({ /** * Loads a Video from the given URL, ready for playback with the `Video.play` method. - * + * * You can control at what point the browser determines the video as being ready for playback via * the `loadEvent` parameter. See https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement * for more details. * * @method Phaser.GameObjects.Video#loadURL * @since 3.20.0 - * + * * @param {string} url - The URL of the video to load or be streamed. * @param {string} [loadEvent='loadeddata'] - The load event to listen for. Either `loadeddata`, `canplay` or `canplaythrough`. * @param {boolean} [noAudio=false] - Does the video have an audio track? If not you can enable auto-playing on it. - * + * * @return {this} This Video Game Object for method chaining. */ loadURL: function (url, loadEvent, noAudio) @@ -817,7 +818,7 @@ var Video = new Class({ } var video = document.createElement('video'); - + video.controls = false; if (noAudio) @@ -869,12 +870,12 @@ var Video = new Class({ * @fires Phaser.GameObjects.Events#VIDEO_ERROR * @private * @since 3.20.0 - * + * * @param {any} error - The Promise resolution error. */ playPromiseErrorHandler: function (error) { - this.scene.sys.input.once('pointerdown', this.unlockHandler, this); + this.scene.sys.input.once(InputEvents.POINTER_DOWN, this.unlockHandler, this); this.touchLocked = true; this.playWhenUnlocked = true; @@ -884,7 +885,7 @@ var Video = new Class({ /** * Called when the video emits a `playing` event during load. - * + * * This is only listened for if the browser doesn't support Promises. * * @method Phaser.GameObjects.Video#playHandler @@ -896,7 +897,7 @@ var Video = new Class({ this.touchLocked = false; this.emit(Events.VIDEO_PLAY, this); - + this.video.removeEventListener('playing', this._callbacks.play, true); }, @@ -907,7 +908,7 @@ var Video = new Class({ * @fires Phaser.GameObjects.Events#VIDEO_ERROR * @private * @since 3.20.0 - * + * * @param {Event} event - The error Event. */ loadErrorHandler: function (event) @@ -926,7 +927,7 @@ var Video = new Class({ * @fires Phaser.GameObjects.Events#VIDEO_PLAY * @private * @since 3.20.0 - * + * * @param {any} error - The Promise resolution error. */ unlockHandler: function () @@ -948,7 +949,7 @@ var Video = new Class({ /** * Called when the video completes playback, i.e. reaches an `ended` state. - * + * * This will never happen if the video is coming from a live stream, where the duration is `Infinity`. * * @method Phaser.GameObjects.Video#completeHandler @@ -962,7 +963,7 @@ var Video = new Class({ /** * Called when the video emits a `timeUpdate` event during playback. - * + * * This event is too slow and irregular to be used for actual video timing or texture updating, * but we can use it to determine if a video has looped. * @@ -1075,11 +1076,11 @@ var Video = new Class({ this.videoTexture = this.scene.sys.textures.create(this._key, video, width, height); this.videoTextureSource = this.videoTexture.source[0]; this.videoTexture.add('__BASE', 0, 0, 0, width, height); - + this.setTexture(this.videoTexture); this.setSizeToFrame(); this.updateDisplayOrigin(); - + this.emit(Events.VIDEO_CREATED, this, width, height); } else @@ -1092,7 +1093,7 @@ var Video = new Class({ textureSource.width = width; textureSource.height = height; } - + textureSource.update(); } }, @@ -1103,7 +1104,7 @@ var Video = new Class({ * * @method Phaser.GameObjects.Video#getVideoKey * @since 3.20.0 - * + * * @return {string} The key of the video being played from the Video Cache, if any. */ getVideoKey: function () @@ -1114,19 +1115,19 @@ var Video = new Class({ /** * Seeks to a given point in the video. The value is given as a float between 0 and 1, * where 0 represents the start of the video and 1 represents the end. - * + * * Seeking only works if the video has a duration, so will not work for live streams. - * + * * When seeking begins, this video will emit a `seeking` event. When the video completes * seeking (i.e. reaches its designated timestamp) it will emit a `seeked` event. - * + * * If you wish to seek based on time instead, use the `Video.setCurrentTime` method. * * @method Phaser.GameObjects.Video#seekTo * @since 3.20.0 - * + * * @param {number} value - The point in the video to seek to. A value between 0 and 1. - * + * * @return {this} This Video Game Object for method chaining. */ seekTo: function (value) @@ -1154,7 +1155,7 @@ var Video = new Class({ * * @method Phaser.GameObjects.Video#getCurrentTime * @since 3.20.0 - * + * * @return {number} A double-precision floating-point value indicating the current playback time in seconds. */ getCurrentTime: function () @@ -1164,22 +1165,22 @@ var Video = new Class({ /** * Seeks to a given playback time in the video. The value is given in _seconds_ or as a string. - * + * * Seeking only works if the video has a duration, so will not work for live streams. - * + * * When seeking begins, this video will emit a `seeking` event. When the video completes * seeking (i.e. reaches its designated timestamp) it will emit a `seeked` event. - * + * * You can provide a string prefixed with either a `+` or a `-`, such as `+2.5` or `-2.5`. * In this case it will seek to +/- the value given, relative to the _current time_. - * + * * If you wish to seek based on a duration percentage instead, use the `Video.seekTo` method. * * @method Phaser.GameObjects.Video#setCurrentTime * @since 3.20.0 - * + * * @param {(string|number)} value - The playback time to seek to in seconds. Can be expressed as a string, such as `+2` to seek 2 seconds ahead from the current time. - * + * * @return {this} This Video Game Object for method chaining. */ setCurrentTime: function (value) @@ -1216,7 +1217,7 @@ var Video = new Class({ * * @method Phaser.GameObjects.Video#isSeeking * @since 3.20.0 - * + * * @return {boolean} A boolean indicating if this Video is currently seeking, or not. */ isSeeking: function () @@ -1264,12 +1265,12 @@ var Video = new Class({ /** * Returns the current progress of the video. Progress is defined as a value between 0 (the start) * and 1 (the end). - * + * * Progress can only be returned if the video has a duration, otherwise it will always return zero. * * @method Phaser.GameObjects.Video#getProgress * @since 3.20.0 - * + * * @return {number} The current progress of playback. If the video has no duration, will always return zero. */ getProgress: function () @@ -1286,20 +1287,20 @@ var Video = new Class({ return now / duration; } } - + return 0; }, /** * A double-precision floating-point value which indicates the duration (total length) of the media in seconds, * on the media's timeline. If no media is present on the element, or the media is not valid, the returned value is NaN. - * + * * If the media has no known end (such as for live streams of unknown duration, web radio, media incoming from WebRTC, * and so forth), this value is +Infinity. - * + * * @method Phaser.GameObjects.Video#getDuration * @since 3.20.0 - * + * * @return {number} A double-precision floating-point value indicating the duration of the media in seconds. */ getDuration: function () @@ -1312,9 +1313,9 @@ var Video = new Class({ * * @method Phaser.GameObjects.Video#setMute * @since 3.20.0 - * + * * @param {boolean} [value=true] - The mute value. `true` if the video should be muted, otherwise `false`. - * + * * @return {this} This Video Game Object for method chaining. */ setMute: function (value) @@ -1338,7 +1339,7 @@ var Video = new Class({ * * @method Phaser.GameObjects.Video#isMuted * @since 3.20.0 - * + * * @return {boolean} A boolean indicating if this Video is currently muted, or not. */ isMuted: function () @@ -1352,7 +1353,7 @@ var Video = new Class({ * @method Phaser.GameObjects.Video#globalMute * @private * @since 3.20.0 - * + * * @param {(Phaser.Sound.WebAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager)} soundManager - A reference to the Sound Manager that emitted the event. * @param {boolean} mute - The mute value. `true` if the Sound Manager is now muted, otherwise `false`. */ @@ -1404,17 +1405,17 @@ var Video = new Class({ /** * Sets the paused state of the currently loaded video. - * + * * If the video is playing, calling this method with `true` will pause playback. * If the video is paused, calling this method with `false` will resume playback. - * + * * If no video is loaded, this method does nothing. * * @method Phaser.GameObjects.Video#setPaused * @since 3.20.0 - * + * * @param {boolean} [value=true] - The paused value. `true` if the video should be paused, `false` to resume it. - * + * * @return {this} This Video Game Object for method chaining. */ setPaused: function (value) @@ -1448,27 +1449,27 @@ var Video = new Class({ /** * Returns a double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest). - * + * * @method Phaser.GameObjects.Video#getVolume * @since 3.20.0 - * + * * @return {number} A double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest). */ getVolume: function () { return (this.video) ? this.video.volume : 1; }, - + /** * Sets the volume of the currently playing video. - * + * * The value given is a double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest). - * + * * @method Phaser.GameObjects.Video#setVolume * @since 3.20.0 - * + * * @param {number} [value=1] - A double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest). - * + * * @return {this} This Video Game Object for method chaining. */ setVolume: function (value) @@ -1485,10 +1486,10 @@ var Video = new Class({ /** * Returns a double that indicates the rate at which the media is being played back. - * + * * @method Phaser.GameObjects.Video#getPlaybackRate * @since 3.20.0 - * + * * @return {number} A double that indicates the rate at which the media is being played back. */ getPlaybackRate: function () @@ -1498,14 +1499,14 @@ var Video = new Class({ /** * Sets the playback rate of the current video. - * + * * The value given is a double that indicates the rate at which the media is being played back. - * + * * @method Phaser.GameObjects.Video#setPlaybackRate * @since 3.20.0 - * + * * @param {number} [rate] - A double that indicates the rate at which the media is being played back. - * + * * @return {this} This Video Game Object for method chaining. */ setPlaybackRate: function (rate) @@ -1520,10 +1521,10 @@ var Video = new Class({ /** * Returns a boolean which indicates whether the media element should start over when it reaches the end. - * + * * @method Phaser.GameObjects.Video#getLoop * @since 3.20.0 - * + * * @return {boolean} A boolean which indicates whether the media element will start over when it reaches the end. */ getLoop: function () @@ -1533,18 +1534,18 @@ var Video = new Class({ /** * Sets the loop state of the current video. - * + * * The value given is a boolean which indicates whether the media element will start over when it reaches the end. - * + * * Not all videos can loop, for example live streams. - * + * * Please note that not all browsers support _seamless_ video looping for all encoding formats. - * + * * @method Phaser.GameObjects.Video#setLoop * @since 3.20.0 - * + * * @param {boolean} [value=true] - A boolean which indicates whether the media element will start over when it reaches the end. - * + * * @return {this} This Video Game Object for method chaining. */ setLoop: function (value) @@ -1561,23 +1562,23 @@ var Video = new Class({ /** * Returns a boolean which indicates whether the video is currently playing. - * + * * @method Phaser.GameObjects.Video#isPlaying * @since 3.20.0 - * + * * @return {boolean} A boolean which indicates whether the video is playing, or not. */ isPlaying: function () { return (this.video) ? !(this.video.paused || this.video.ended) : false; }, - + /** * Returns a boolean which indicates whether the video is currently paused. - * + * * @method Phaser.GameObjects.Video#isPaused * @since 3.20.0 - * + * * @return {boolean} A boolean which indicates whether the video is paused, or not. */ isPaused: function () @@ -1588,26 +1589,26 @@ var Video = new Class({ /** * Stores this Video in the Texture Manager using the given key as a dynamic texture, * which any texture-based Game Object, such as a Sprite, can use as its texture: - * + * * ```javascript * var vid = this.add.video(0, 0, 'intro'); - * + * * vid.play(); - * + * * vid.saveTexture('doodle'); - * + * * this.add.image(400, 300, 'doodle'); * ``` - * + * * The saved texture is automatically updated as the video plays. If you pause this video, * or change its source, then the saved texture updates instantly. - * + * * Calling `saveTexture` again will not save another copy of the same texture, it will just rename the existing one. - * + * * By default it will create a single base texture. You can add frames to the texture * by using the `Texture.add` method. After doing this, you can then allow Game Objects * to use a specific frame. - * + * * If you intend to save the texture so you can use it as the input for a Shader, you may need to set the * `flipY` parameter to `true` if you find the video renders upside down in your shader. * @@ -1644,14 +1645,14 @@ var Video = new Class({ * Stops the video playing and clears all internal event listeners. * * If you only wish to pause playback of the video, and resume it a later time, use the `Video.pause` method instead. - * + * * If the video hasn't finished downloading, calling this method will not abort the download. To do that you need to * call `destroy` instead. * * @method Phaser.GameObjects.Video#stop * @fires Phaser.GameObjects.Events#VIDEO_STOP * @since 3.20.0 - * + * * @return {this} This Video Game Object for method chaining. */ stop: function () @@ -1682,13 +1683,13 @@ var Video = new Class({ /** * Removes the Video element from the DOM by calling parentNode.removeChild on itself. - * + * * Also removes the autoplay and src attributes and nulls the Video reference. - * + * * You should not call this method if you were playing a video from the Video Cache that * you wish to play again in your game, or if another Video object is also using the same * video. - * + * * If you loaded an external video via `Video.loadURL` then you should call this function * to clear up once you are done with the instance. * @@ -1722,9 +1723,9 @@ var Video = new Class({ /** * Handles the pre-destroy step for the Video object. - * + * * This calls `Video.stop` and optionally `Video.removeVideoElement`. - * + * * If any Sprites are using this Video as their texture it is up to you to manage those. * * @method Phaser.GameObjects.Video#preDestroy From a54a3a3e96f541a291c42b245e778b8ceb371f2d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 12:23:36 +0100 Subject: [PATCH 040/153] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f59ba717f..65d48d922 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -381,7 +381,7 @@ The Animation API has had a significant overhaul to improve playback handling. I ### Input / Mouse Updates and API Changes -* `ScaleManager.refresh` is now called when the `Game.READY` event fires. This fixes a bug where the Scale Manager would have the incorrect canvas bounds, because they were calculated before a previous canvas was removed from the DOM. Fix #4905 (thanks @PavelMishin) +* `ScaleManager.refresh` is now called when the `Game.READY` event fires. This fixes a bug where the Scale Manager would have the incorrect canvas bounds, because they were calculated before a previous canvas was removed from the DOM. Fix #4862 (thanks @dranitski) * The Game Config property `inputMouseCapture` has been removed, as this is now split into 3 new config options: * `inputMousePreventDefaultDown` is a new config option that allows you to control `preventDefault` calls specifically on mouse down events. Set it via `input.mouse.preventDefaultDown` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. * `inputMousePreventDefaultUp` is a new config option that allows you to control `preventDefault` calls specifically on mouse up events. Set it via `input.mouse.preventDefaultUp` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. @@ -433,6 +433,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * `Actions.setOrigin` will now call `updateDisplayOrigin` on the items array, otherwise the effects can't be seen when rendering. * You can now set the `ArcadeWorld.fixedStep` property via the `ArcadeWorldConfig` object (thanks @samme) * `Utils.Array.NumerArray` can now accept the `start` and `end` parameters in reverse order, i.e. `10, 1` will generate a number array running from 10 to 1. Internally it has also been optimized to skip string based returns. +* `DataManager.Events.DESTROY` is a new event that the Data Manager will _listen_ for from its parent and then call its own `destroy` method when received. ### Bug Fixes From 5ecdc3b4a2bd7c6a16016d26fc50e7396b67429d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 14:00:14 +0100 Subject: [PATCH 041/153] The `GamepadPlugin` will now call `refreshPads` as part of its start process. This allows you to use Gamepads across multiple Scenes, without having to wait for a connected event from each one of them. If you've already had a connected event in a previous Scene, you can now just read the pads directly via `this.input.gamepad.pad1` and similar. Fix #4890 --- src/input/gamepad/GamepadPlugin.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/input/gamepad/GamepadPlugin.js b/src/input/gamepad/GamepadPlugin.js index 50c72a5d1..8e468d966 100644 --- a/src/input/gamepad/GamepadPlugin.js +++ b/src/input/gamepad/GamepadPlugin.js @@ -40,6 +40,9 @@ var InputEvents = require('../events'); * to the gamepads you can poll its buttons and axis sticks. See the properties and methods available on * the `Gamepad` class for more details. * + * As of September 2020 Chrome, and likely other browsers, will soon start to require that games requesting + * access to the Gamepad API are running under SSL. They will actively block API access if they are not. + * * For more information about Gamepad support in browsers see the following resources: * * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API @@ -221,6 +224,8 @@ var GamepadPlugin = new Class({ if (this.enabled) { this.startListeners(); + + this.refreshPads(); } this.sceneInputPlugin.pluginEvents.once(InputEvents.SHUTDOWN, this.shutdown, this); @@ -292,6 +297,11 @@ var GamepadPlugin = new Class({ this.target.removeEventListener('gamepaddisconnected', this.onGamepadHandler); this.sceneInputPlugin.pluginEvents.off(InputEvents.UPDATE, this.update); + + for (var i = 0; i < this.gamepads.length; i++) + { + this.gamepads[i].removeAllListeners(); + } }, /** @@ -304,7 +314,7 @@ var GamepadPlugin = new Class({ { for (var i = 0; i < this.gamepads.length; i++) { - this.gamepads.connected = false; + this.gamepads[i].pad.connected = false; } }, @@ -489,8 +499,6 @@ var GamepadPlugin = new Class({ { this.stopListeners(); - this.disconnectAll(); - this.removeAllListeners(); }, From 2acfbfbe7199ee7d430e2a55a7299ca1b0f1dae8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 14:01:55 +0100 Subject: [PATCH 042/153] `Gamepad._created` is a new private internal property that keeps track of when the instance was created. This is compared to the navigator timestamp in the update loop to avoid event spamming. Fix #4890. --- src/input/gamepad/Gamepad.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/input/gamepad/Gamepad.js b/src/input/gamepad/Gamepad.js index 52e8ae57c..7ca501848 100644 --- a/src/input/gamepad/Gamepad.js +++ b/src/input/gamepad/Gamepad.js @@ -313,6 +313,16 @@ var Gamepad = new Class({ * @since 3.10.0 */ this.rightStick = new Vector2(); + + /** + * When was this Gamepad created? Used to avoid duplicate event spamming in the update loop. + * + * @name Phaser.Input.Gamepad.Gamepad#_created + * @type {number} + * @private + * @since 3.50.0 + */ + this._created = performance.now(); }, /** @@ -420,6 +430,11 @@ var Gamepad = new Class({ */ update: function (pad) { + if (pad.timestamp < this._created) + { + return; + } + var i; // Sync the button values From 111702b820a0ed7d4fe46f90d82dc6394d3fa0b4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 14:01:58 +0100 Subject: [PATCH 043/153] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65d48d922..45dab3507 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -391,6 +391,9 @@ The Animation API has had a significant overhaul to improve playback handling. I * `MouseManager.preventDefaultUp` is a new boolean property, set via the `inputMousePreventDefaultUp` config option that allows you to toggle capture of mouse up events at runtime. * `MouseManager.preventDefaultMove` is a new boolean property, set via the `inputMousePreventDefaultMove` config option that allows you to toggle capture of mouse move events at runtime. * In the `MouseManager` the up, down and move events are no longer set as being passive if captured. Over, Out, Wheel and the Window level Down and Up events are always flagged as being passive. +* The `GamepadPlugin` will now call `refreshPads` as part of its start process. This allows you to use Gamepads across multiple Scenes, without having to wait for a connected event from each one of them. If you've already had a connected event in a previous Scene, you can now just read the pads directly via `this.input.gamepad.pad1` and similar. Fix #4890 (thanks @Sytten) +* Shutting down the Gamepad plugin (such as when sleeping a Scene) no longer calls `GamepadPlugin.disconnectAll`, but destroying it does. +* `Gamepad._created` is a new private internal property that keeps track of when the instance was created. This is compared to the navigator timestamp in the update loop to avoid event spamming. Fix #4890. ### Updates and API Changes From 60e311afe52495d65e187896c902b34854f5c49d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 15:16:37 +0100 Subject: [PATCH 044/153] Updated JSDocs --- src/scale/events/ORIENTATION_CHANGE_EVENT.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scale/events/ORIENTATION_CHANGE_EVENT.js b/src/scale/events/ORIENTATION_CHANGE_EVENT.js index c83e98d39..8b309bbac 100644 --- a/src/scale/events/ORIENTATION_CHANGE_EVENT.js +++ b/src/scale/events/ORIENTATION_CHANGE_EVENT.js @@ -7,9 +7,11 @@ /** * The Scale Manager Orientation Change Event. * + * This event is dispatched whenever the Scale Manager detects an orientation change event from the browser. + * * @event Phaser.Scale.Events#ORIENTATION_CHANGE * @since 3.16.1 - * - * @param {string} orientation - + * + * @param {string} orientation - The new orientation value. Either `Phaser.Scale.Orientation.LANDSCAPE` or `Phaser.Scale.Orientation.PORTRAIT`. */ module.exports = 'orientationchange'; From 1c2a79ac518f6ab6bd44b763ecd9eb3ccb2c23cd Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 15:22:53 +0100 Subject: [PATCH 045/153] The Scale Managers `GetScreenOrientation` function will now check for `window.orientation` first, because iOS mobile browsers have an incomplete implementation of the Screen API, forcing us to use the window value as a priority. This means the Scale Manager will now emit `orientationchange` events correctly on iOS. Fix #4361 #4914 --- src/dom/GetScreenOrientation.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/dom/GetScreenOrientation.js b/src/dom/GetScreenOrientation.js index 08df9795e..b723948cd 100644 --- a/src/dom/GetScreenOrientation.js +++ b/src/dom/GetScreenOrientation.js @@ -33,12 +33,9 @@ var GetScreenOrientation = function (width, height) return orientation; } - if (screen) - { - return (screen.height > screen.width) ? CONST.ORIENTATION.PORTRAIT : CONST.ORIENTATION.LANDSCAPE; - } - else if (typeof window.orientation === 'number') + if (typeof window.orientation === 'number') { + // Do this check first, as iOS supports this, but also has an incomplete window.screen implementation // This may change by device based on "natural" orientation. return (window.orientation === 0 || window.orientation === 180) ? CONST.ORIENTATION.PORTRAIT : CONST.ORIENTATION.LANDSCAPE; } @@ -53,8 +50,10 @@ var GetScreenOrientation = function (width, height) return CONST.ORIENTATION.LANDSCAPE; } } - - return (height > width) ? CONST.ORIENTATION.PORTRAIT : CONST.ORIENTATION.LANDSCAPE; + else + { + return (height > width) ? CONST.ORIENTATION.PORTRAIT : CONST.ORIENTATION.LANDSCAPE; + } }; module.exports = GetScreenOrientation; From 9f328700cbcc2bd061d38016b9fa5526845fa732 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 15:22:56 +0100 Subject: [PATCH 046/153] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45dab3507..5968a788d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -453,6 +453,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * When using `Camera.setRenderToTexture` its `zoom` and `rotation` values would be applied twice. Fix #4221 #4924 #4713 (thanks @wayfu @DanMcgraw @pavel-shirobok) * `GameObjects.Shape.Grid` would render a white fill even if you passed `undefined` as the fill color in the constructor. It now doesn't render cells if no fill color is given. * The `onMouse` events in the Input Manager didn't reset the `activePointer` property to the mouse, meaning on dual-input systems such as Touch Screen devices, the active pointer would become locked to whichever input method was used first. Fix #4615 #5232 (thanks @mmolina01 @JstnPwll @Legomite) +* The Scale Managers `GetScreenOrientation` function will now check for `window.orientation` first, because iOS mobile browsers have an incomplete implementation of the Screen API, forcing us to use the window value as a priority. This means the Scale Manager will now emit `orientationchange` events correctly on iOS. Fix #4361 #4914 (thanks @pfdtravalmatic @jackfreak @cuihu) ### Namespace Updates From 6c8191f7c5c87db622df166f161ec5b0ae7fc2ff Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 15:29:01 +0100 Subject: [PATCH 047/153] Fixed Audio and Video type defs. Fix #5295 --- src/loader/filetypes/typedefs/AudioFileConfig.js | 4 ++-- src/loader/filetypes/typedefs/VideoFileConfig.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/loader/filetypes/typedefs/AudioFileConfig.js b/src/loader/filetypes/typedefs/AudioFileConfig.js index 2231f1bd8..383cbb561 100644 --- a/src/loader/filetypes/typedefs/AudioFileConfig.js +++ b/src/loader/filetypes/typedefs/AudioFileConfig.js @@ -2,7 +2,7 @@ * @typedef {object} Phaser.Types.Loader.FileTypes.AudioFileConfig * * @property {string} key - The key of the file. Must be unique within the Loader and Audio Cache. - * @property {string} [urlConfig] - The absolute or relative URL to load the file from. + * @property {(string|string[])} [url] - The absolute or relative URLs to load the audio files from. * @property {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - * @property {AudioContext} [audioContext] - The AudioContext this file will use to process itself. + * @property {AudioContext} [context] - The optional AudioContext this file will use to process itself. */ diff --git a/src/loader/filetypes/typedefs/VideoFileConfig.js b/src/loader/filetypes/typedefs/VideoFileConfig.js index f80a0c9f9..a55ed18c4 100644 --- a/src/loader/filetypes/typedefs/VideoFileConfig.js +++ b/src/loader/filetypes/typedefs/VideoFileConfig.js @@ -2,7 +2,7 @@ * @typedef {object} Phaser.Types.Loader.FileTypes.VideoFileConfig * * @property {(string|Phaser.Types.Loader.FileTypes.VideoFileConfig)} key - The key to use for this file, or a file configuration object. - * @property {any} [urlConfig] - The absolute or relative URL to load this file from in a config object. + * @property {(string|string[])} [url] - The absolute or relative URLs to load the video files from. * @property {string} [loadEvent] - The load event to listen for when _not_ loading as a blob. Either 'loadeddata', 'canplay' or 'canplaythrough'. * @property {boolean} [asBlob] - Load the video as a data blob, or via the Video element? * @property {boolean} [noAudio] - Does the video have an audio track? If not you can enable auto-playing on it. From dff71b6ae2956922be0d9180be1fa8ae55866652 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 15:29:04 +0100 Subject: [PATCH 048/153] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5968a788d..76c458de5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -484,7 +484,7 @@ The Animation API has had a significant overhaul to improve playback handling. I 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 @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards @rexrainbow @Riderrr @spwilson2 +@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards @rexrainbow @Riderrr @spwilson2 @EmilSV From 93b5aebdbe0b7f4b0e7c4ce523e0805339e6b922 Mon Sep 17 00:00:00 2001 From: samme Date: Fri, 11 Sep 2020 07:45:22 -0700 Subject: [PATCH 049/153] Fix undefined TimerEvent Fixes #5294 --- src/time/Clock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/time/Clock.js b/src/time/Clock.js index 16409ec7a..6eb26c0ed 100644 --- a/src/time/Clock.js +++ b/src/time/Clock.js @@ -170,7 +170,7 @@ var Clock = new Class({ { var event; - if (config instanceof Phaser.Time.TimerEvent) + if (config instanceof TimerEvent) { event = config; From 7475b15976288d8dcab0bb0b3ca52a2860ded87e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 15:56:48 +0100 Subject: [PATCH 050/153] Preparing for Beta 6 --- package.json | 2 +- src/const.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1f7e969b5..e89220043 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "phaser", - "version": "3.50.0-beta.5", + "version": "3.50.0-beta.6", "release": "Subaru", "description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.", "author": "Richard Davey (http://www.photonstorm.com)", diff --git a/src/const.js b/src/const.js index e17add146..348fcd433 100644 --- a/src/const.js +++ b/src/const.js @@ -20,7 +20,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.50.0-beta.5', + VERSION: '3.50.0-beta.6', BlendModes: require('./renderer/BlendModes'), From 168fb9d2b71b91b1801dc6a200261a10a4934f87 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 15:58:25 +0100 Subject: [PATCH 051/153] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76c458de5..beb2e8494 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -454,6 +454,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * `GameObjects.Shape.Grid` would render a white fill even if you passed `undefined` as the fill color in the constructor. It now doesn't render cells if no fill color is given. * The `onMouse` events in the Input Manager didn't reset the `activePointer` property to the mouse, meaning on dual-input systems such as Touch Screen devices, the active pointer would become locked to whichever input method was used first. Fix #4615 #5232 (thanks @mmolina01 @JstnPwll @Legomite) * The Scale Managers `GetScreenOrientation` function will now check for `window.orientation` first, because iOS mobile browsers have an incomplete implementation of the Screen API, forcing us to use the window value as a priority. This means the Scale Manager will now emit `orientationchange` events correctly on iOS. Fix #4361 #4914 (thanks @pfdtravalmatic @jackfreak @cuihu) +* `Time.Clock.addEvent` can now take an instance of a `TimerEvent` as its parameter. Fix #5294 (thanks @samme @EmilSV) ### Namespace Updates From 9cd4c1bb0a18bc46d950069582a78f1993c032bb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 16:27:13 +0100 Subject: [PATCH 052/153] Refactored to use local vars --- src/scene/Systems.js | 89 +++++++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 34 deletions(-) diff --git a/src/scene/Systems.js b/src/scene/Systems.js index dd8cde603..9975bdcb5 100644 --- a/src/scene/Systems.js +++ b/src/scene/Systems.js @@ -374,13 +374,15 @@ var Systems = new Class({ */ step: function (time, delta) { - this.events.emit(Events.PRE_UPDATE, time, delta); + var events = this.events; - this.events.emit(Events.UPDATE, time, delta); + events.emit(Events.PRE_UPDATE, time, delta); + + events.emit(Events.UPDATE, time, delta); this.sceneUpdate.call(this.scene, time, delta); - this.events.emit(Events.POST_UPDATE, time, delta); + events.emit(Events.POST_UPDATE, time, delta); }, /** @@ -440,13 +442,16 @@ var Systems = new Class({ */ pause: function (data) { + var events = this.events; + var settings = this.settings; + if (this.settings.active) { - this.settings.status = CONST.PAUSED; + settings.status = CONST.PAUSED; - this.settings.active = false; + settings.active = false; - this.events.emit(Events.PAUSE, this, data); + events.emit(Events.PAUSE, this, data); } return this; @@ -465,13 +470,16 @@ var Systems = new Class({ */ resume: function (data) { + var events = this.events; + var settings = this.settings; + if (!this.settings.active) { - this.settings.status = CONST.RUNNING; + settings.status = CONST.RUNNING; - this.settings.active = true; + settings.active = true; - this.events.emit(Events.RESUME, this, data); + events.emit(Events.RESUME, this, data); } return this; @@ -495,12 +503,15 @@ var Systems = new Class({ */ sleep: function (data) { - this.settings.status = CONST.SLEEPING; + var events = this.events; + var settings = this.settings; - this.settings.active = false; - this.settings.visible = false; + settings.status = CONST.SLEEPING; - this.events.emit(Events.SLEEP, this, data); + settings.active = false; + settings.visible = false; + + events.emit(Events.SLEEP, this, data); return this; }, @@ -518,6 +529,7 @@ var Systems = new Class({ */ wake: function (data) { + var events = this.events; var settings = this.settings; settings.status = CONST.RUNNING; @@ -525,11 +537,11 @@ var Systems = new Class({ settings.active = true; settings.visible = true; - this.events.emit(Events.WAKE, this, data); + events.emit(Events.WAKE, this, data); if (settings.isTransition) { - this.events.emit(Events.TRANSITION_WAKE, settings.transitionFrom, settings.transitionDuration); + events.emit(Events.TRANSITION_WAKE, settings.transitionFrom, settings.transitionDuration); } return this; @@ -698,21 +710,24 @@ var Systems = new Class({ */ start: function (data) { + var events = this.events; + var settings = this.settings; + if (data) { - this.settings.data = data; + settings.data = data; } - this.settings.status = CONST.START; + settings.status = CONST.START; - this.settings.active = true; - this.settings.visible = true; + settings.active = true; + settings.visible = true; // For plugins to listen out for - this.events.emit(Events.START, this); + events.emit(Events.START, this); // For user-land code to listen out for - this.events.emit(Events.READY, this, data); + events.emit(Events.READY, this, data); }, /** @@ -730,17 +745,20 @@ var Systems = new Class({ */ shutdown: function (data) { - this.events.off(Events.TRANSITION_INIT); - this.events.off(Events.TRANSITION_START); - this.events.off(Events.TRANSITION_COMPLETE); - this.events.off(Events.TRANSITION_OUT); + var events = this.events; + var settings = this.settings; - this.settings.status = CONST.SHUTDOWN; + events.off(Events.TRANSITION_INIT); + events.off(Events.TRANSITION_START); + events.off(Events.TRANSITION_COMPLETE); + events.off(Events.TRANSITION_OUT); - this.settings.active = false; - this.settings.visible = false; + settings.status = CONST.SHUTDOWN; - this.events.emit(Events.SHUTDOWN, this, data); + settings.active = false; + settings.visible = false; + + events.emit(Events.SHUTDOWN, this, data); }, /** @@ -755,14 +773,17 @@ var Systems = new Class({ */ destroy: function () { - this.settings.status = CONST.DESTROYED; + var events = this.events; + var settings = this.settings; - this.settings.active = false; - this.settings.visible = false; + settings.status = CONST.DESTROYED; - this.events.emit(Events.DESTROY, this); + settings.active = false; + settings.visible = false; - this.events.removeAllListeners(); + events.emit(Events.DESTROY, this); + + events.removeAllListeners(); var props = [ 'scene', 'game', 'anims', 'cache', 'plugins', 'registry', 'sound', 'textures', 'add', 'camera', 'displayList', 'events', 'make', 'scenePlugin', 'updateList' ]; From e7245d11cc9772a2cbbdfa05c8234a79531f3e4d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 16:27:17 +0100 Subject: [PATCH 053/153] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index beb2e8494..84b633cb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -455,6 +455,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `onMouse` events in the Input Manager didn't reset the `activePointer` property to the mouse, meaning on dual-input systems such as Touch Screen devices, the active pointer would become locked to whichever input method was used first. Fix #4615 #5232 (thanks @mmolina01 @JstnPwll @Legomite) * The Scale Managers `GetScreenOrientation` function will now check for `window.orientation` first, because iOS mobile browsers have an incomplete implementation of the Screen API, forcing us to use the window value as a priority. This means the Scale Manager will now emit `orientationchange` events correctly on iOS. Fix #4361 #4914 (thanks @pfdtravalmatic @jackfreak @cuihu) * `Time.Clock.addEvent` can now take an instance of a `TimerEvent` as its parameter. Fix #5294 (thanks @samme @EmilSV) +* `GameConfig.audio` now defaults to an empty object, which simplifies access to the config in later checks (thanks @samme) ### Namespace Updates From 18d0d58cb5def0899e6dca306bb67a6b3327c46b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 11 Sep 2020 16:53:50 +0100 Subject: [PATCH 054/153] Spine Plugin updated for Beta 6 --- plugins/spine/dist/SpinePluginDebug.js | 5376 ++++------------- plugins/spine/dist/SpinePluginDebug.js.map | 2 +- .../container/SpineContainerWebGLRenderer.js | 6 +- .../SpineGameObjectWebGLRenderer.js | 6 +- 4 files changed, 1310 insertions(+), 4080 deletions(-) diff --git a/plugins/spine/dist/SpinePluginDebug.js b/plugins/spine/dist/SpinePluginDebug.js index a948a7dbc..63897d6f4 100644 --- a/plugins/spine/dist/SpinePluginDebug.js +++ b/plugins/spine/dist/SpinePluginDebug.js @@ -88,9 +88,9 @@ window["SpinePlugin"] = /******/ ({ /***/ "../../../node_modules/eventemitter3/index.js": -/*!*******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/node_modules/eventemitter3/index.js ***! - \*******************************************************************************/ +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/node_modules/eventemitter3/index.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -433,1791 +433,12 @@ if (true) { } -/***/ }), - -/***/ "../../../src/animations/Animation.js": -/*!***********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/Animation.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Clamp = __webpack_require__(/*! ../math/Clamp */ "../../../src/math/Clamp.js"); -var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); -var EventEmitter = __webpack_require__(/*! eventemitter3 */ "../../../node_modules/eventemitter3/index.js"); -var Events = __webpack_require__(/*! ./events */ "../../../src/animations/events/index.js"); -var FindClosestInSorted = __webpack_require__(/*! ../utils/array/FindClosestInSorted */ "../../../src/utils/array/FindClosestInSorted.js"); -var Frame = __webpack_require__(/*! ./AnimationFrame */ "../../../src/animations/AnimationFrame.js"); -var GetValue = __webpack_require__(/*! ../utils/object/GetValue */ "../../../src/utils/object/GetValue.js"); - -/** - * @classdesc - * A Frame based Animation. - * - * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects. - * - * The Animation Manager creates these. Game Objects don't own an instance of these directly. - * Game Objects have the Animation Component, which are like playheads to global Animations (these objects) - * So multiple Game Objects can have playheads all pointing to this one Animation instance. - * - * @class Animation - * @memberof Phaser.Animations - * @extends Phaser.Events.EventEmitter - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager - * @param {string} key - The unique identifying string for this animation. - * @param {Phaser.Types.Animations.Animation} config - The Animation configuration. - */ -var Animation = new Class({ - - Extends: EventEmitter, - - initialize: - - function Animation (manager, key, config) - { - EventEmitter.call(this); - - /** - * A reference to the global Animation Manager. - * - * @name Phaser.Animations.Animation#manager - * @type {Phaser.Animations.AnimationManager} - * @since 3.0.0 - */ - this.manager = manager; - - /** - * The unique identifying string for this animation. - * - * @name Phaser.Animations.Animation#key - * @type {string} - * @since 3.0.0 - */ - this.key = key; - - /** - * A frame based animation (as opposed to a bone based animation) - * - * @name Phaser.Animations.Animation#type - * @type {string} - * @default frame - * @since 3.0.0 - */ - this.type = 'frame'; - - /** - * Extract all the frame data into the frames array. - * - * @name Phaser.Animations.Animation#frames - * @type {Phaser.Animations.AnimationFrame[]} - * @since 3.0.0 - */ - this.frames = this.getFrames( - manager.textureManager, - GetValue(config, 'frames', []), - GetValue(config, 'defaultTextureKey', null) - ); - - /** - * The frame rate of playback in frames per second (default 24 if duration is null) - * - * @name Phaser.Animations.Animation#frameRate - * @type {integer} - * @default 24 - * @since 3.0.0 - */ - this.frameRate = GetValue(config, 'frameRate', null); - - /** - * How long the animation should play for, in milliseconds. - * If the `frameRate` property has been set then it overrides this value, - * otherwise the `frameRate` is derived from `duration`. - * - * @name Phaser.Animations.Animation#duration - * @type {integer} - * @since 3.0.0 - */ - this.duration = GetValue(config, 'duration', null); - - if (this.duration === null && this.frameRate === null) - { - // No duration or frameRate given, use default frameRate of 24fps - this.frameRate = 24; - this.duration = (this.frameRate / this.frames.length) * 1000; - } - else if (this.duration && this.frameRate === null) - { - // Duration given but no frameRate, so set the frameRate based on duration - // I.e. 12 frames in the animation, duration = 4000 ms - // So frameRate is 12 / (4000 / 1000) = 3 fps - this.frameRate = this.frames.length / (this.duration / 1000); - } - else - { - // frameRate given, derive duration from it (even if duration also specified) - // I.e. 15 frames in the animation, frameRate = 30 fps - // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) - this.duration = (this.frames.length / this.frameRate) * 1000; - } - - /** - * How many ms per frame, not including frame specific modifiers. - * - * @name Phaser.Animations.Animation#msPerFrame - * @type {integer} - * @since 3.0.0 - */ - this.msPerFrame = 1000 / this.frameRate; - - /** - * Skip frames if the time lags, or always advanced anyway? - * - * @name Phaser.Animations.Animation#skipMissedFrames - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true); - - /** - * The delay in ms before the playback will begin. - * - * @name Phaser.Animations.Animation#delay - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - this.delay = GetValue(config, 'delay', 0); - - /** - * Number of times to repeat the animation. Set to -1 to repeat forever. - * - * @name Phaser.Animations.Animation#repeat - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - this.repeat = GetValue(config, 'repeat', 0); - - /** - * The delay in ms before the a repeat play starts. - * - * @name Phaser.Animations.Animation#repeatDelay - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - this.repeatDelay = GetValue(config, 'repeatDelay', 0); - - /** - * Should the animation yoyo (reverse back down to the start) before repeating? - * - * @name Phaser.Animations.Animation#yoyo - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.yoyo = GetValue(config, 'yoyo', false); - - /** - * Should the GameObject's `visible` property be set to `true` when the animation starts to play? - * - * @name Phaser.Animations.Animation#showOnStart - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.showOnStart = GetValue(config, 'showOnStart', false); - - /** - * Should the GameObject's `visible` property be set to `false` when the animation finishes? - * - * @name Phaser.Animations.Animation#hideOnComplete - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.hideOnComplete = GetValue(config, 'hideOnComplete', false); - - /** - * Global pause. All Game Objects using this Animation instance are impacted by this property. - * - * @name Phaser.Animations.Animation#paused - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.paused = false; - - this.manager.on(Events.PAUSE_ALL, this.pause, this); - this.manager.on(Events.RESUME_ALL, this.resume, this); - }, - - /** - * Add frames to the end of the animation. - * - * @method Phaser.Animations.Animation#addFrame - * @since 3.0.0 - * - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. - * - * @return {this} This Animation object. - */ - addFrame: function (config) - { - return this.addFrameAt(this.frames.length, config); - }, - - /** - * Add frame/s into the animation. - * - * @method Phaser.Animations.Animation#addFrameAt - * @since 3.0.0 - * - * @param {integer} index - The index to insert the frame at within the animation. - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. - * - * @return {this} This Animation object. - */ - addFrameAt: function (index, config) - { - var newFrames = this.getFrames(this.manager.textureManager, config); - - if (newFrames.length > 0) - { - if (index === 0) - { - this.frames = newFrames.concat(this.frames); - } - else if (index === this.frames.length) - { - this.frames = this.frames.concat(newFrames); - } - else - { - var pre = this.frames.slice(0, index); - var post = this.frames.slice(index); - - this.frames = pre.concat(newFrames, post); - } - - this.updateFrameSequence(); - } - - return this; - }, - - /** - * Check if the given frame index is valid. - * - * @method Phaser.Animations.Animation#checkFrame - * @since 3.0.0 - * - * @param {integer} index - The index to be checked. - * - * @return {boolean} `true` if the index is valid, otherwise `false`. - */ - checkFrame: function (index) - { - return (index >= 0 && index < this.frames.length); - }, - - /** - * Called internally when this Animation completes playback. - * Optionally, hides the parent Game Object, then stops playback. - * - * @method Phaser.Animations.Animation#completeAnimation - * @protected - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - */ - completeAnimation: function (component) - { - if (this.hideOnComplete) - { - component.parent.visible = false; - } - - component.stop(); - }, - - /** - * Called internally when this Animation first starts to play. - * Sets the accumulator and nextTick properties. - * - * @method Phaser.Animations.Animation#getFirstTick - * @protected - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. - */ - getFirstTick: function (component, includeDelay) - { - if (includeDelay === undefined) { includeDelay = true; } - - // When is the first update due? - component.accumulator = 0; - component.nextTick = component.msPerFrame + component.currentFrame.duration; - - if (includeDelay) - { - component.nextTick += component._delay; - } - }, - - /** - * Returns the AnimationFrame at the provided index - * - * @method Phaser.Animations.Animation#getFrameAt - * @protected - * @since 3.0.0 - * - * @param {integer} index - The index in the AnimationFrame array - * - * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence - */ - getFrameAt: function (index) - { - return this.frames[index]; - }, - - /** - * Creates AnimationFrame instances based on the given frame data. - * - * @method Phaser.Animations.Animation#getFrames - * @since 3.0.0 - * - * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager. - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. - * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object. - * - * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. - */ - getFrames: function (textureManager, frames, defaultTextureKey) - { - var out = []; - var prev; - var animationFrame; - var index = 1; - var i; - var textureKey; - - // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet - if (typeof frames === 'string') - { - textureKey = frames; - - var texture = textureManager.get(textureKey); - var frameKeys = texture.getFrameNames(); - - frames = []; - - frameKeys.forEach(function (idx, value) - { - frames.push({ key: textureKey, frame: value }); - }); - } - - if (!Array.isArray(frames) || frames.length === 0) - { - return out; - } - - for (i = 0; i < frames.length; i++) - { - var item = frames[i]; - - var key = GetValue(item, 'key', defaultTextureKey); - - if (!key) - { - continue; - } - - // Could be an integer or a string - var frame = GetValue(item, 'frame', 0); - - // The actual texture frame - var textureFrame = textureManager.getFrame(key, frame); - - animationFrame = new Frame(key, frame, index, textureFrame); - - animationFrame.duration = GetValue(item, 'duration', 0); - - animationFrame.isFirst = (!prev); - - // The previously created animationFrame - if (prev) - { - prev.nextFrame = animationFrame; - - animationFrame.prevFrame = prev; - } - - out.push(animationFrame); - - prev = animationFrame; - - index++; - } - - if (out.length > 0) - { - animationFrame.isLast = true; - - // Link them end-to-end, so they loop - animationFrame.nextFrame = out[0]; - - out[0].prevFrame = animationFrame; - - // Generate the progress data - - var slice = 1 / (out.length - 1); - - for (i = 0; i < out.length; i++) - { - out[i].progress = i * slice; - } - } - - return out; - }, - - /** - * Called internally. Sets the accumulator and nextTick values of the current Animation. - * - * @method Phaser.Animations.Animation#getNextTick - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - */ - getNextTick: function (component) - { - // accumulator += delta * _timeScale - // after a large delta surge (perf issue for example) we need to adjust for it here - - // When is the next update due? - component.accumulator -= component.nextTick; - - component.nextTick = component.msPerFrame + component.currentFrame.duration; - }, - - /** - * Loads the Animation values into the Animation Component. - * - * @method Phaser.Animations.Animation#load - * @private - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into. - * @param {integer} startFrame - The start frame of the animation to load. - */ - load: function (component, startFrame) - { - if (startFrame >= this.frames.length) - { - startFrame = 0; - } - - if (component.currentAnim !== this) - { - component.currentAnim = this; - - component.frameRate = this.frameRate; - component.duration = this.duration; - component.msPerFrame = this.msPerFrame; - component.skipMissedFrames = this.skipMissedFrames; - - component._delay = this.delay; - component._repeat = this.repeat; - component._repeatDelay = this.repeatDelay; - component._yoyo = this.yoyo; - } - - var frame = this.frames[startFrame]; - - if (startFrame === 0 && !component.forward) - { - frame = this.getLastFrame(); - } - - component.updateFrame(frame); - }, - - /** - * Returns the frame closest to the given progress value between 0 and 1. - * - * @method Phaser.Animations.Animation#getFrameByProgress - * @since 3.4.0 - * - * @param {number} value - A value between 0 and 1. - * - * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value. - */ - getFrameByProgress: function (value) - { - value = Clamp(value, 0, 1); - - return FindClosestInSorted(value, this.frames, 'progress'); - }, - - /** - * Advance the animation frame. - * - * @method Phaser.Animations.Animation#nextFrame - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. - */ - nextFrame: function (component) - { - var frame = component.currentFrame; - - // TODO: Add frame skip support - - if (frame.isLast) - { - // We're at the end of the animation - - // Yoyo? (happens before repeat) - if (component._yoyo) - { - this.handleYoyoFrame(component, false); - } - else if (component.repeatCounter > 0) - { - // Repeat (happens before complete) - - if (component._reverse && component.forward) - { - component.forward = false; - } - else - { - this.repeatAnimation(component); - } - } - else - { - this.completeAnimation(component); - } - } - else - { - this.updateAndGetNextTick(component, frame.nextFrame); - } - }, - - /** - * Handle the yoyo functionality in nextFrame and previousFrame methods. - * - * @method Phaser.Animations.Animation#handleYoyoFrame - * @private - * @since 3.12.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. - * @param {boolean} isReverse - Is animation in reverse mode? (Default: false) - */ - handleYoyoFrame: function (component, isReverse) - { - if (!isReverse) { isReverse = false; } - - if (component._reverse === !isReverse && component.repeatCounter > 0) - { - if (!component._repeatDelay || component.pendingRepeat) - - { - component.forward = isReverse; - } - - this.repeatAnimation(component); - - return; - } - - if (component._reverse !== isReverse && component.repeatCounter === 0) - { - this.completeAnimation(component); - - return; - } - - component.forward = isReverse; - - var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame; - - this.updateAndGetNextTick(component, frame); - }, - - /** - * Returns the animation last frame. - * - * @method Phaser.Animations.Animation#getLastFrame - * @since 3.12.0 - * - * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame. - */ - getLastFrame: function () - { - return this.frames[this.frames.length - 1]; - }, - - /** - * Called internally when the Animation is playing backwards. - * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly. - * - * @method Phaser.Animations.Animation#previousFrame - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - */ - previousFrame: function (component) - { - var frame = component.currentFrame; - - // TODO: Add frame skip support - - if (frame.isFirst) - { - // We're at the start of the animation - - if (component._yoyo) - { - this.handleYoyoFrame(component, true); - } - else if (component.repeatCounter > 0) - { - if (component._reverse && !component.forward) - { - component.currentFrame = this.getLastFrame(); - this.repeatAnimation(component); - } - else - { - // Repeat (happens before complete) - component.forward = true; - this.repeatAnimation(component); - } - } - else - { - this.completeAnimation(component); - } - } - else - { - this.updateAndGetNextTick(component, frame.prevFrame); - } - }, - - /** - * Update Frame and Wait next tick. - * - * @method Phaser.Animations.Animation#updateAndGetNextTick - * @private - * @since 3.12.0 - * - * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame. - */ - updateAndGetNextTick: function (component, frame) - { - component.updateFrame(frame); - - this.getNextTick(component); - }, - - /** - * Removes the given AnimationFrame from this Animation instance. - * This is a global action. Any Game Object using this Animation will be impacted by this change. - * - * @method Phaser.Animations.Animation#removeFrame - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed. - * - * @return {this} This Animation object. - */ - removeFrame: function (frame) - { - var index = this.frames.indexOf(frame); - - if (index !== -1) - { - this.removeFrameAt(index); - } - - return this; - }, - - /** - * Removes a frame from the AnimationFrame array at the provided index - * and updates the animation accordingly. - * - * @method Phaser.Animations.Animation#removeFrameAt - * @since 3.0.0 - * - * @param {integer} index - The index in the AnimationFrame array - * - * @return {this} This Animation object. - */ - removeFrameAt: function (index) - { - this.frames.splice(index, 1); - - this.updateFrameSequence(); - - return this; - }, - - /** - * Called internally during playback. Forces the animation to repeat, providing there are enough counts left - * in the repeat counter. - * - * @method Phaser.Animations.Animation#repeatAnimation - * @fires Phaser.Animations.Events#ANIMATION_REPEAT - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - */ - repeatAnimation: function (component) - { - if (component._pendingStop === 2) - { - return this.completeAnimation(component); - } - - if (component._repeatDelay > 0 && component.pendingRepeat === false) - { - component.pendingRepeat = true; - component.accumulator -= component.nextTick; - component.nextTick += component._repeatDelay; - } - else - { - component.repeatCounter--; - - component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']); - - if (component.isPlaying) - { - this.getNextTick(component); - - component.pendingRepeat = false; - - var frame = component.currentFrame; - var parent = component.parent; - - this.emit(Events.ANIMATION_REPEAT, this, frame); - - parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent); - - parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent); - } - } - }, - - /** - * Sets the texture frame the animation uses for rendering. - * - * @method Phaser.Animations.Animation#setFrame - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - */ - setFrame: function (component) - { - // Work out which frame should be set next on the child, and set it - if (component.forward) - { - this.nextFrame(component); - } - else - { - this.previousFrame(component); - } - }, - - /** - * Converts the animation data to JSON. - * - * @method Phaser.Animations.Animation#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object. - */ - toJSON: function () - { - var output = { - 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 - }; - - this.frames.forEach(function (frame) - { - output.frames.push(frame.toJSON()); - }); - - return output; - }, - - /** - * Called internally whenever frames are added to, or removed from, this Animation. - * - * @method Phaser.Animations.Animation#updateFrameSequence - * @since 3.0.0 - * - * @return {this} This Animation object. - */ - updateFrameSequence: function () - { - var len = this.frames.length; - var slice = 1 / (len - 1); - - var frame; - - for (var i = 0; i < len; i++) - { - frame = this.frames[i]; - - frame.index = i + 1; - frame.isFirst = false; - frame.isLast = false; - frame.progress = i * slice; - - if (i === 0) - { - frame.isFirst = true; - - if (len === 1) - { - frame.isLast = true; - frame.nextFrame = frame; - frame.prevFrame = frame; - } - else - { - frame.isLast = false; - frame.prevFrame = this.frames[len - 1]; - frame.nextFrame = this.frames[i + 1]; - } - } - else if (i === len - 1 && len > 1) - { - frame.isLast = true; - frame.prevFrame = this.frames[len - 2]; - frame.nextFrame = this.frames[0]; - } - else if (len > 1) - { - frame.prevFrame = this.frames[i - 1]; - frame.nextFrame = this.frames[i + 1]; - } - } - - return this; - }, - - /** - * Pauses playback of this Animation. The paused state is set immediately. - * - * @method Phaser.Animations.Animation#pause - * @since 3.0.0 - * - * @return {this} This Animation object. - */ - pause: function () - { - this.paused = true; - - return this; - }, - - /** - * Resumes playback of this Animation. The paused state is reset immediately. - * - * @method Phaser.Animations.Animation#resume - * @since 3.0.0 - * - * @return {this} This Animation object. - */ - resume: function () - { - this.paused = false; - - return this; - }, - - /** - * Destroys this Animation instance. It will remove all event listeners, - * remove this animation and its key from the global Animation Manager, - * and then destroy all Animation Frames in turn. - * - * @method Phaser.Animations.Animation#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.removeAllListeners(); - - this.manager.off(Events.PAUSE_ALL, this.pause, this); - this.manager.off(Events.RESUME_ALL, this.resume, this); - - this.manager.remove(this.key); - - for (var i = 0; i < this.frames.length; i++) - { - this.frames[i].destroy(); - } - - this.frames = []; - - this.manager = null; - } - -}); - -module.exports = Animation; - - -/***/ }), - -/***/ "../../../src/animations/AnimationFrame.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/AnimationFrame.js ***! - \****************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); - -/** - * @classdesc - * A single frame in an Animation sequence. - * - * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other - * frames in the animation, and index data. It also has the ability to modify the animation timing. - * - * AnimationFrames are generated automatically by the Animation class. - * - * @class AnimationFrame - * @memberof Phaser.Animations - * @constructor - * @since 3.0.0 - * - * @param {string} textureKey - The key of the Texture this AnimationFrame uses. - * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses. - * @param {integer} index - The index of this AnimationFrame within the Animation sequence. - * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering. - */ -var AnimationFrame = new Class({ - - initialize: - - function AnimationFrame (textureKey, textureFrame, index, frame) - { - /** - * The key of the Texture this AnimationFrame uses. - * - * @name Phaser.Animations.AnimationFrame#textureKey - * @type {string} - * @since 3.0.0 - */ - this.textureKey = textureKey; - - /** - * The key of the Frame within the Texture that this AnimationFrame uses. - * - * @name Phaser.Animations.AnimationFrame#textureFrame - * @type {(string|integer)} - * @since 3.0.0 - */ - this.textureFrame = textureFrame; - - /** - * The index of this AnimationFrame within the Animation sequence. - * - * @name Phaser.Animations.AnimationFrame#index - * @type {integer} - * @since 3.0.0 - */ - this.index = index; - - /** - * A reference to the Texture Frame this AnimationFrame uses for rendering. - * - * @name Phaser.Animations.AnimationFrame#frame - * @type {Phaser.Textures.Frame} - * @since 3.0.0 - */ - this.frame = frame; - - /** - * Is this the first frame in an animation sequence? - * - * @name Phaser.Animations.AnimationFrame#isFirst - * @type {boolean} - * @default false - * @readonly - * @since 3.0.0 - */ - this.isFirst = false; - - /** - * Is this the last frame in an animation sequence? - * - * @name Phaser.Animations.AnimationFrame#isLast - * @type {boolean} - * @default false - * @readonly - * @since 3.0.0 - */ - this.isLast = false; - - /** - * A reference to the AnimationFrame that comes before this one in the animation, if any. - * - * @name Phaser.Animations.AnimationFrame#prevFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @readonly - * @since 3.0.0 - */ - this.prevFrame = null; - - /** - * A reference to the AnimationFrame that comes after this one in the animation, if any. - * - * @name Phaser.Animations.AnimationFrame#nextFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @readonly - * @since 3.0.0 - */ - this.nextFrame = null; - - /** - * Additional time (in ms) that this frame should appear for during playback. - * The value is added onto the msPerFrame set by the animation. - * - * @name Phaser.Animations.AnimationFrame#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.duration = 0; - - /** - * What % through the animation does this frame come? - * This value is generated when the animation is created and cached here. - * - * @name Phaser.Animations.AnimationFrame#progress - * @type {number} - * @default 0 - * @readonly - * @since 3.0.0 - */ - this.progress = 0; - }, - - /** - * Generates a JavaScript object suitable for converting to JSON. - * - * @method Phaser.Animations.AnimationFrame#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data. - */ - toJSON: function () - { - return { - key: this.textureKey, - frame: this.textureFrame, - duration: this.duration - }; - }, - - /** - * Destroys this object by removing references to external resources and callbacks. - * - * @method Phaser.Animations.AnimationFrame#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.frame = undefined; - } - -}); - -module.exports = AnimationFrame; - - -/***/ }), - -/***/ "../../../src/animations/events/ADD_ANIMATION_EVENT.js": -/*!****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/ADD_ANIMATION_EVENT.js ***! - \****************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Add Animation Event. - * - * This event is dispatched when a new animation is added to the global Animation Manager. - * - * This can happen either as a result of an animation instance being added to the Animation Manager, - * or the Animation Manager creating a new animation directly. - * - * @event Phaser.Animations.Events#ADD_ANIMATION - * @since 3.0.0 - * - * @param {string} key - The key of the Animation that was added to the global Animation Manager. - * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation. - */ -module.exports = 'add'; - - -/***/ }), - -/***/ "../../../src/animations/events/ANIMATION_COMPLETE_EVENT.js": -/*!*********************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js ***! - \*********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Complete Event. - * - * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped. - * - * Be careful with the volume of events this could generate. If a group of Sprites all complete the same - * animation at the same time, this event will invoke its handler for each one of them. - * - * @event Phaser.Animations.Events#ANIMATION_COMPLETE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. - */ -module.exports = 'complete'; - - -/***/ }), - -/***/ "../../../src/animations/events/ANIMATION_REPEAT_EVENT.js": -/*!*******************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js ***! - \*******************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Repeat Event. - * - * This event is dispatched when a currently playing animation repeats. - * - * The event is dispatched directly from the Animation object itself. Which means that listeners - * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it. - * - * @event Phaser.Animations.Events#ANIMATION_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated. - */ -module.exports = 'repeat'; - - -/***/ }), - -/***/ "../../../src/animations/events/ANIMATION_RESTART_EVENT.js": -/*!********************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js ***! - \********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Restart Event. - * - * This event is dispatched by an Animation instance when it restarts. - * - * Be careful with the volume of events this could generate. If a group of Sprites all restart the same - * animation at the same time, this event will invoke its handler for each one of them. - * - * @event Phaser.Animations.Events#ANIMATION_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. - */ -module.exports = 'restart'; - - -/***/ }), - -/***/ "../../../src/animations/events/ANIMATION_START_EVENT.js": -/*!******************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_START_EVENT.js ***! - \******************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Start Event. - * - * This event is dispatched by an Animation instance when it starts playing. - * - * Be careful with the volume of events this could generate. If a group of Sprites all play the same - * animation at the same time, this event will invoke its handler for each one of them. - * - * @event Phaser.Animations.Events#ANIMATION_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. - */ -module.exports = 'start'; - - -/***/ }), - -/***/ "../../../src/animations/events/PAUSE_ALL_EVENT.js": -/*!************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/PAUSE_ALL_EVENT.js ***! - \************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Pause All Animations Event. - * - * This event is dispatched when the global Animation Manager is told to pause. - * - * When this happens all current animations will stop updating, although it doesn't necessarily mean - * that the game has paused as well. - * - * @event Phaser.Animations.Events#PAUSE_ALL - * @since 3.0.0 - */ -module.exports = 'pauseall'; - - -/***/ }), - -/***/ "../../../src/animations/events/REMOVE_ANIMATION_EVENT.js": -/*!*******************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js ***! - \*******************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Remove Animation Event. - * - * This event is dispatched when an animation is removed from the global Animation Manager. - * - * @event Phaser.Animations.Events#REMOVE_ANIMATION - * @since 3.0.0 - * - * @param {string} key - The key of the Animation that was removed from the global Animation Manager. - * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation. - */ -module.exports = 'remove'; - - -/***/ }), - -/***/ "../../../src/animations/events/RESUME_ALL_EVENT.js": -/*!*************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/RESUME_ALL_EVENT.js ***! - \*************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Resume All Animations Event. - * - * This event is dispatched when the global Animation Manager resumes, having been previously paused. - * - * When this happens all current animations will continue updating again. - * - * @event Phaser.Animations.Events#RESUME_ALL - * @since 3.0.0 - */ -module.exports = 'resumeall'; - - -/***/ }), - -/***/ "../../../src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js": -/*!****************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js ***! - \****************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Complete Event. - * - * This event is dispatched by a Sprite when an animation finishes playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. - */ -module.exports = 'animationcomplete'; - - -/***/ }), - -/***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js": -/*!********************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js ***! - \********************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Complete Event. - * - * This event is dispatched by a Sprite when a specific animation finishes playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. - */ -module.exports = 'animationcomplete-'; - - -/***/ }), - -/***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js": -/*!******************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js ***! - \******************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Repeat Event. - * - * This event is dispatched by a Sprite when a specific animation repeats playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {integer} repeatCount - The number of times the Animation has repeated so far. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. - */ -module.exports = 'animationrepeat-'; - - -/***/ }), - -/***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js": -/*!*******************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js ***! - \*******************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Restart Event. - * - * This event is dispatched by a Sprite when a specific animation restarts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. - */ -module.exports = 'animationrestart-'; - - -/***/ }), - -/***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js": -/*!*****************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js ***! - \*****************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Start Event. - * - * This event is dispatched by a Sprite when a specific animation starts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. - */ -module.exports = 'animationstart-'; - - -/***/ }), - -/***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js": -/*!******************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js ***! - \******************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Update Event. - * - * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame, - * based on the animation frame rate and other factors like `timeScale` and `delay`. - * - * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. - */ -module.exports = 'animationupdate-'; - - -/***/ }), - -/***/ "../../../src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js": -/*!**************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js ***! - \**************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Repeat Event. - * - * This event is dispatched by a Sprite when an animation repeats playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {integer} repeatCount - The number of times the Animation has repeated so far. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. - */ -module.exports = 'animationrepeat'; - - -/***/ }), - -/***/ "../../../src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js": -/*!***************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js ***! - \***************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Restart Event. - * - * This event is dispatched by a Sprite when an animation restarts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. - */ -module.exports = 'animationrestart'; - - -/***/ }), - -/***/ "../../../src/animations/events/SPRITE_ANIMATION_START_EVENT.js": -/*!*************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js ***! - \*************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Start Event. - * - * This event is dispatched by a Sprite when an animation starts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationstart', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. - */ -module.exports = 'animationstart'; - - -/***/ }), - -/***/ "../../../src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js": -/*!**************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js ***! - \**************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Update Event. - * - * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame, - * based on the animation frame rate and other factors like `timeScale` and `delay`. - * - * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. - */ -module.exports = 'animationupdate'; - - -/***/ }), - -/***/ "../../../src/animations/events/index.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/index.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Animations.Events - */ - -module.exports = { - - ADD_ANIMATION: __webpack_require__(/*! ./ADD_ANIMATION_EVENT */ "../../../src/animations/events/ADD_ANIMATION_EVENT.js"), - ANIMATION_COMPLETE: __webpack_require__(/*! ./ANIMATION_COMPLETE_EVENT */ "../../../src/animations/events/ANIMATION_COMPLETE_EVENT.js"), - ANIMATION_REPEAT: __webpack_require__(/*! ./ANIMATION_REPEAT_EVENT */ "../../../src/animations/events/ANIMATION_REPEAT_EVENT.js"), - ANIMATION_RESTART: __webpack_require__(/*! ./ANIMATION_RESTART_EVENT */ "../../../src/animations/events/ANIMATION_RESTART_EVENT.js"), - ANIMATION_START: __webpack_require__(/*! ./ANIMATION_START_EVENT */ "../../../src/animations/events/ANIMATION_START_EVENT.js"), - PAUSE_ALL: __webpack_require__(/*! ./PAUSE_ALL_EVENT */ "../../../src/animations/events/PAUSE_ALL_EVENT.js"), - REMOVE_ANIMATION: __webpack_require__(/*! ./REMOVE_ANIMATION_EVENT */ "../../../src/animations/events/REMOVE_ANIMATION_EVENT.js"), - RESUME_ALL: __webpack_require__(/*! ./RESUME_ALL_EVENT */ "../../../src/animations/events/RESUME_ALL_EVENT.js"), - SPRITE_ANIMATION_COMPLETE: __webpack_require__(/*! ./SPRITE_ANIMATION_COMPLETE_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js"), - SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_COMPLETE_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js"), - SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_REPEAT_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js"), - SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_RESTART_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js"), - SPRITE_ANIMATION_KEY_START: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_START_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js"), - SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_UPDATE_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js"), - SPRITE_ANIMATION_REPEAT: __webpack_require__(/*! ./SPRITE_ANIMATION_REPEAT_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js"), - SPRITE_ANIMATION_RESTART: __webpack_require__(/*! ./SPRITE_ANIMATION_RESTART_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js"), - SPRITE_ANIMATION_START: __webpack_require__(/*! ./SPRITE_ANIMATION_START_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_START_EVENT.js"), - SPRITE_ANIMATION_UPDATE: __webpack_require__(/*! ./SPRITE_ANIMATION_UPDATE_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js") - -}; - - /***/ }), /***/ "../../../src/core/events/BLUR_EVENT.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/BLUR_EVENT.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/BLUR_EVENT.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2243,9 +464,9 @@ module.exports = 'blur'; /***/ }), /***/ "../../../src/core/events/BOOT_EVENT.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/BOOT_EVENT.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/BOOT_EVENT.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2270,9 +491,9 @@ module.exports = 'boot'; /***/ }), /***/ "../../../src/core/events/CONTEXT_LOST_EVENT.js": -/*!*********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_LOST_EVENT.js ***! - \*********************************************************************************/ +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/CONTEXT_LOST_EVENT.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2298,9 +519,9 @@ module.exports = 'contextlost'; /***/ }), /***/ "../../../src/core/events/CONTEXT_RESTORED_EVENT.js": -/*!*************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js ***! - \*************************************************************************************/ +/*!********************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2326,9 +547,9 @@ module.exports = 'contextrestored'; /***/ }), /***/ "../../../src/core/events/DESTROY_EVENT.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/DESTROY_EVENT.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/DESTROY_EVENT.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2354,9 +575,9 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/core/events/FOCUS_EVENT.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/FOCUS_EVENT.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/FOCUS_EVENT.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2381,9 +602,9 @@ module.exports = 'focus'; /***/ }), /***/ "../../../src/core/events/HIDDEN_EVENT.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/HIDDEN_EVENT.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/HIDDEN_EVENT.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2412,9 +633,9 @@ module.exports = 'hidden'; /***/ }), /***/ "../../../src/core/events/PAUSE_EVENT.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/PAUSE_EVENT.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/PAUSE_EVENT.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2438,9 +659,9 @@ module.exports = 'pause'; /***/ }), /***/ "../../../src/core/events/POST_RENDER_EVENT.js": -/*!********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/POST_RENDER_EVENT.js ***! - \********************************************************************************/ +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/POST_RENDER_EVENT.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2469,9 +690,9 @@ module.exports = 'postrender'; /***/ }), /***/ "../../../src/core/events/POST_STEP_EVENT.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/POST_STEP_EVENT.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/POST_STEP_EVENT.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2499,9 +720,9 @@ module.exports = 'poststep'; /***/ }), /***/ "../../../src/core/events/PRE_RENDER_EVENT.js": -/*!*******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/PRE_RENDER_EVENT.js ***! - \*******************************************************************************/ +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/PRE_RENDER_EVENT.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2529,9 +750,9 @@ module.exports = 'prerender'; /***/ }), /***/ "../../../src/core/events/PRE_STEP_EVENT.js": -/*!*****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/PRE_STEP_EVENT.js ***! - \*****************************************************************************/ +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/PRE_STEP_EVENT.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2559,9 +780,9 @@ module.exports = 'prestep'; /***/ }), /***/ "../../../src/core/events/READY_EVENT.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/READY_EVENT.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/READY_EVENT.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2586,9 +807,9 @@ module.exports = 'ready'; /***/ }), /***/ "../../../src/core/events/RESUME_EVENT.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/RESUME_EVENT.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/RESUME_EVENT.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2612,9 +833,9 @@ module.exports = 'resume'; /***/ }), /***/ "../../../src/core/events/STEP_EVENT.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/STEP_EVENT.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/STEP_EVENT.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2642,9 +863,9 @@ module.exports = 'step'; /***/ }), /***/ "../../../src/core/events/VISIBLE_EVENT.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/VISIBLE_EVENT.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/VISIBLE_EVENT.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2671,9 +892,9 @@ module.exports = 'visible'; /***/ }), /***/ "../../../src/core/events/index.js": -/*!********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/core/events/index.js ***! - \********************************************************************/ +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/index.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -2712,9 +933,9 @@ module.exports = { /***/ }), /***/ "../../../src/data/DataManager.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/data/DataManager.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/data/DataManager.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -2799,13 +1020,13 @@ var DataManager = new Class({ * ``` * * You can also modify it directly: - * + * * ```javascript * this.data.values.gold += 1000; * ``` * * Doing so will emit a `setdata` event from the parent of this Data Manager. - * + * * Do not modify this object directly. Adding properties directly to this object will not * emit any events. Always use `DataManager.set` to create new items the first time around. * @@ -2829,7 +1050,7 @@ var DataManager = new Class({ if (!parent.hasOwnProperty('sys') && this.events) { - this.events.once('destroy', this.destroy, this); + this.events.once(Events.DESTROY, this.destroy, this); } }, @@ -2837,19 +1058,19 @@ var DataManager = new Class({ * Retrieves the value for the given key, or undefined if it doesn't exist. * * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: - * + * * ```javascript * this.data.get('gold'); * ``` * * Or access the value directly: - * + * * ```javascript * this.data.values.gold; * ``` * * You can also pass in an array of keys, in which case an array of values will be returned: - * + * * ```javascript * this.data.get([ 'gold', 'armor', 'health' ]); * ``` @@ -2934,7 +1155,7 @@ var DataManager = new Class({ /** * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created. - * + * * ```javascript * data.set('name', 'Red Gem Stone'); * ``` @@ -2946,13 +1167,13 @@ var DataManager = new Class({ * ``` * * To get a value back again you can call `get`: - * + * * ```javascript * data.get('gold'); * ``` - * + * * Or you can access the value directly via the `values` property, where it works like any other variable: - * + * * ```javascript * data.values.gold += 50; * ``` @@ -3001,9 +1222,9 @@ var DataManager = new Class({ /** * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0. - * + * * When the value is first set, a `setdata` event is emitted. - * + * * @method Phaser.Data.DataManager#inc * @fires Phaser.Data.Events#SET_DATA * @fires Phaser.Data.Events#CHANGE_DATA @@ -3040,9 +1261,9 @@ var DataManager = new Class({ /** * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false. - * + * * When the value is first set, a `setdata` event is emitted. - * + * * @method Phaser.Data.DataManager#toggle * @fires Phaser.Data.Events#SET_DATA * @fires Phaser.Data.Events#CHANGE_DATA @@ -3102,7 +1323,7 @@ var DataManager = new Class({ Object.defineProperty(this.values, key, { enumerable: true, - + configurable: true, get: function () @@ -3202,9 +1423,9 @@ var DataManager = new Class({ * * If the key is found in this Data Manager it is removed from the internal lists and a * `removedata` event is emitted. - * + * * You can also pass in an array of keys, in which case all keys in the array will be removed: - * + * * ```javascript * this.data.remove([ 'gold', 'armor', 'health' ]); * ``` @@ -3296,7 +1517,7 @@ var DataManager = new Class({ /** * Determines whether the given key is set in this Data Manager. - * + * * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings. * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. * @@ -3424,9 +1645,9 @@ module.exports = DataManager; /***/ }), /***/ "../../../src/data/events/CHANGE_DATA_EVENT.js": -/*!********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! - \********************************************************************************/ +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -3461,9 +1682,9 @@ module.exports = 'changedata'; /***/ }), /***/ "../../../src/data/events/CHANGE_DATA_KEY_EVENT.js": -/*!************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! - \************************************************************************************/ +/*!*******************************************************************!*\ + !*** D:/wamp/www/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -3493,12 +1714,38 @@ module.exports = 'changedata'; module.exports = 'changedata-'; +/***/ }), + +/***/ "../../../src/data/events/DESTROY_EVENT.js": +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/data/events/DESTROY_EVENT.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Data Manager Destroy Event. + * + * The Data Manager will listen for the destroy event from its parent, and then close itself down. + * + * @event Phaser.Data.Events#DESTROY + * @since 3.50.0 + */ +module.exports = 'destroy'; + + /***/ }), /***/ "../../../src/data/events/REMOVE_DATA_EVENT.js": -/*!********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! - \********************************************************************************/ +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -3529,9 +1776,9 @@ module.exports = 'removedata'; /***/ }), /***/ "../../../src/data/events/SET_DATA_EVENT.js": -/*!*****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/data/events/SET_DATA_EVENT.js ***! - \*****************************************************************************/ +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/data/events/SET_DATA_EVENT.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -3562,9 +1809,9 @@ module.exports = 'setdata'; /***/ }), /***/ "../../../src/data/events/index.js": -/*!********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/data/events/index.js ***! - \********************************************************************/ +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/data/events/index.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -3582,6 +1829,7 @@ module.exports = { CHANGE_DATA: __webpack_require__(/*! ./CHANGE_DATA_EVENT */ "../../../src/data/events/CHANGE_DATA_EVENT.js"), CHANGE_DATA_KEY: __webpack_require__(/*! ./CHANGE_DATA_KEY_EVENT */ "../../../src/data/events/CHANGE_DATA_KEY_EVENT.js"), + DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "../../../src/data/events/DESTROY_EVENT.js"), REMOVE_DATA: __webpack_require__(/*! ./REMOVE_DATA_EVENT */ "../../../src/data/events/REMOVE_DATA_EVENT.js"), SET_DATA: __webpack_require__(/*! ./SET_DATA_EVENT */ "../../../src/data/events/SET_DATA_EVENT.js") @@ -3591,9 +1839,9 @@ module.exports = { /***/ }), /***/ "../../../src/display/color/GetColorFromValue.js": -/*!**********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/display/color/GetColorFromValue.js ***! - \**********************************************************************************/ +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/display/color/GetColorFromValue.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -3625,9 +1873,9 @@ module.exports = GetColorFromValue; /***/ }), /***/ "../../../src/display/mask/BitmapMask.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/display/mask/BitmapMask.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/display/mask/BitmapMask.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -3838,7 +2086,7 @@ var BitmapMask = new Class({ */ preRenderWebGL: function (renderer, maskedObject, camera) { - renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera); + renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera); }, /** @@ -3853,7 +2101,7 @@ var BitmapMask = new Class({ */ postRenderWebGL: function (renderer, camera) { - renderer.pipelines.BitmapMaskPipeline.endMask(this, camera); + renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera); }, /** @@ -3886,7 +2134,7 @@ var BitmapMask = new Class({ /** * Destroys this BitmapMask and nulls any references it holds. - * + * * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, * so be sure to call `clearMask` on any Game Object using it, before destroying it. * @@ -3923,9 +2171,9 @@ module.exports = BitmapMask; /***/ }), /***/ "../../../src/display/mask/GeometryMask.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/display/mask/GeometryMask.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/display/mask/GeometryMask.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -4243,9 +2491,9 @@ module.exports = GeometryMask; /***/ }), /***/ "../../../src/gameobjects/BuildGameObject.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/BuildGameObject.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/BuildGameObject.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -4376,9 +2624,9 @@ module.exports = BuildGameObject; /***/ }), /***/ "../../../src/gameobjects/GameObject.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/GameObject.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/GameObject.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -5119,9 +3367,9 @@ module.exports = GameObject; /***/ }), /***/ "../../../src/gameobjects/components/Alpha.js": -/*!*******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Alpha.js ***! - \*******************************************************************************/ +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Alpha.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -5419,9 +3667,9 @@ module.exports = Alpha; /***/ }), /***/ "../../../src/gameobjects/components/AlphaSingle.js": -/*!*************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/AlphaSingle.js ***! - \*************************************************************************************/ +/*!********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/AlphaSingle.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -5531,1212 +3779,12 @@ var AlphaSingle = { module.exports = AlphaSingle; -/***/ }), - -/***/ "../../../src/gameobjects/components/Animation.js": -/*!***********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Animation.js ***! - \***********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var BaseAnimation = __webpack_require__(/*! ../../animations/Animation */ "../../../src/animations/Animation.js"); -var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); -var Events = __webpack_require__(/*! ../../animations/events */ "../../../src/animations/events/index.js"); - -/** - * @classdesc - * A Game Object Animation Controller. - * - * This controller lives as an instance within a Game Object, accessible as `sprite.anims`. - * - * @class Animation - * @memberof Phaser.GameObjects.Components - * @constructor - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs. - */ -var Animation = new Class({ - - initialize: - - function Animation (parent) - { - /** - * The Game Object to which this animation controller belongs. - * - * @name Phaser.GameObjects.Components.Animation#parent - * @type {Phaser.GameObjects.GameObject} - * @since 3.0.0 - */ - this.parent = parent; - - /** - * A reference to the global Animation Manager. - * - * @name Phaser.GameObjects.Components.Animation#animationManager - * @type {Phaser.Animations.AnimationManager} - * @since 3.0.0 - */ - this.animationManager = parent.scene.sys.anims; - - this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this); - - /** - * Is an animation currently playing or not? - * - * @name Phaser.GameObjects.Components.Animation#isPlaying - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.isPlaying = false; - - /** - * The current Animation loaded into this Animation Controller. - * - * @name Phaser.GameObjects.Components.Animation#currentAnim - * @type {?Phaser.Animations.Animation} - * @default null - * @since 3.0.0 - */ - this.currentAnim = null; - - /** - * The current AnimationFrame being displayed by this Animation Controller. - * - * @name Phaser.GameObjects.Components.Animation#currentFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @since 3.0.0 - */ - this.currentFrame = null; - - /** - * The key of the next Animation to be loaded into this Animation Controller when the current animation completes. - * - * @name Phaser.GameObjects.Components.Animation#nextAnim - * @type {?string} - * @default null - * @since 3.16.0 - */ - this.nextAnim = null; - - /** - * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes. - * - * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue - * @type {string[]} - * @since 3.24.0 - */ - this.nextAnimsQueue = []; - - /** - * Time scale factor. - * - * @name Phaser.GameObjects.Components.Animation#_timeScale - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._timeScale = 1; - - /** - * The frame rate of playback in frames per second. - * The default is 24 if the `duration` property is `null`. - * - * @name Phaser.GameObjects.Components.Animation#frameRate - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.frameRate = 0; - - /** - * How long the animation should play for, in milliseconds. - * If the `frameRate` property has been set then it overrides this value, - * otherwise the `frameRate` is derived from `duration`. - * - * @name Phaser.GameObjects.Components.Animation#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.duration = 0; - - /** - * ms per frame, not including frame specific modifiers that may be present in the Animation data. - * - * @name Phaser.GameObjects.Components.Animation#msPerFrame - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.msPerFrame = 0; - - /** - * Skip frames if the time lags, or always advanced anyway? - * - * @name Phaser.GameObjects.Components.Animation#skipMissedFrames - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.skipMissedFrames = true; - - /** - * A delay before starting playback, in milliseconds. - * - * @name Phaser.GameObjects.Components.Animation#_delay - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._delay = 0; - - /** - * Number of times to repeat the animation (-1 for infinity) - * - * @name Phaser.GameObjects.Components.Animation#_repeat - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._repeat = 0; - - /** - * Delay before the repeat starts, in milliseconds. - * - * @name Phaser.GameObjects.Components.Animation#_repeatDelay - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._repeatDelay = 0; - - /** - * Should the animation yoyo? (reverse back down to the start) before repeating? - * - * @name Phaser.GameObjects.Components.Animation#_yoyo - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._yoyo = false; - - /** - * Will the playhead move forwards (`true`) or in reverse (`false`). - * - * @name Phaser.GameObjects.Components.Animation#forward - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.forward = true; - - /** - * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'), - * needed because forward can be changed by yoyo feature. - * - * @name Phaser.GameObjects.Components.Animation#_reverse - * @type {boolean} - * @default false - * @private - * @since 3.12.0 - */ - this._reverse = false; - - /** - * Internal time overflow accumulator. - * - * @name Phaser.GameObjects.Components.Animation#accumulator - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.accumulator = 0; - - /** - * The time point at which the next animation frame will change. - * - * @name Phaser.GameObjects.Components.Animation#nextTick - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.nextTick = 0; - - /** - * An internal counter keeping track of how many repeats are left to play. - * - * @name Phaser.GameObjects.Components.Animation#repeatCounter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.repeatCounter = 0; - - /** - * An internal flag keeping track of pending repeats. - * - * @name Phaser.GameObjects.Components.Animation#pendingRepeat - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.pendingRepeat = false; - - /** - * Is the Animation paused? - * - * @name Phaser.GameObjects.Components.Animation#_paused - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._paused = false; - - /** - * Was the animation previously playing before being paused? - * - * @name Phaser.GameObjects.Components.Animation#_wasPlaying - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._wasPlaying = false; - - /** - * Internal property tracking if this Animation is waiting to stop. - * - * 0 = No - * 1 = Waiting for ms to pass - * 2 = Waiting for repeat - * 3 = Waiting for specific frame - * - * @name Phaser.GameObjects.Components.Animation#_pendingStop - * @type {integer} - * @private - * @since 3.4.0 - */ - this._pendingStop = 0; - - /** - * Internal property used by _pendingStop. - * - * @name Phaser.GameObjects.Components.Animation#_pendingStopValue - * @type {any} - * @private - * @since 3.4.0 - */ - this._pendingStopValue; - }, - - /** - * Sets an animation to be played immediately after the current one completes. - * - * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. - * - * An animation set to repeat forever will never enter a completed state. - * - * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). - * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. - * - * Call this method with no arguments to reset the chained animation. - * - * @method Phaser.GameObjects.Components.Animation#chain - * @since 3.16.0 - * - * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - chain: function (key) - { - if (key instanceof BaseAnimation) - { - key = key.key; - } - - if (this.nextAnim === null) - { - this.nextAnim = key; - } - else - { - this.nextAnimsQueue.push(key); - } - - return this.parent; - }, - - /** - * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback. - * - * @method Phaser.GameObjects.Components.Animation#setDelay - * @since 3.4.0 - * - * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setDelay: function (value) - { - if (value === undefined) { value = 0; } - - this._delay = value; - - return this.parent; - }, - - /** - * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback. - * - * @method Phaser.GameObjects.Components.Animation#getDelay - * @since 3.4.0 - * - * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback. - */ - getDelay: function () - { - return this._delay; - }, - - /** - * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. - * - * @method Phaser.GameObjects.Components.Animation#delayedPlay - * @since 3.0.0 - * - * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. - * @param {string} key - The key of the animation to play. - * @param {integer} [startFrame=0] - The frame of the animation to start from. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - delayedPlay: function (delay, key, startFrame) - { - this.play(key, true, startFrame); - - this.nextTick += delay; - - return this.parent; - }, - - /** - * Returns the key of the animation currently loaded into this component. - * - * @method Phaser.GameObjects.Components.Animation#getCurrentKey - * @since 3.0.0 - * - * @return {string} The key of the Animation loaded into this component. - */ - getCurrentKey: function () - { - if (this.currentAnim) - { - return this.currentAnim.key; - } - }, - - /** - * Internal method used to load an animation into this component. - * - * @method Phaser.GameObjects.Components.Animation#load - * @protected - * @since 3.0.0 - * - * @param {string} key - The key of the animation to load. - * @param {integer} [startFrame=0] - The start frame of the animation to load. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - load: function (key, startFrame) - { - if (startFrame === undefined) { startFrame = 0; } - - if (this.isPlaying) - { - this.stop(); - } - - // Load the new animation in - this.animationManager.load(this, key, startFrame); - - return this.parent; - }, - - /** - * Pause the current animation and set the `isPlaying` property to `false`. - * You can optionally pause it at a specific frame. - * - * @method Phaser.GameObjects.Components.Animation#pause - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - pause: function (atFrame) - { - if (!this._paused) - { - this._paused = true; - this._wasPlaying = this.isPlaying; - this.isPlaying = false; - } - - if (atFrame !== undefined) - { - this.updateFrame(atFrame); - } - - return this.parent; - }, - - /** - * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. - * You can optionally tell it to start playback from a specific frame. - * - * @method Phaser.GameObjects.Components.Animation#resume - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - resume: function (fromFrame) - { - if (this._paused) - { - this._paused = false; - this.isPlaying = this._wasPlaying; - } - - if (fromFrame !== undefined) - { - this.updateFrame(fromFrame); - } - - return this.parent; - }, - - /** - * `true` if the current animation is paused, otherwise `false`. - * - * @name Phaser.GameObjects.Components.Animation#isPaused - * @readonly - * @type {boolean} - * @since 3.4.0 - */ - isPaused: { - - get: function () - { - return this._paused; - } - - }, - - /** - * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. - * - * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. - * - * @method Phaser.GameObjects.Components.Animation#play - * @fires Phaser.GameObjects.Components.Animation#onStartEvent - * @since 3.0.0 - * - * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. - * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - play: function (key, ignoreIfPlaying, startFrame) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - if (startFrame === undefined) { startFrame = 0; } - - if (key instanceof BaseAnimation) - { - key = key.key; - } - - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) - { - return this.parent; - } - - this.forward = true; - this._reverse = false; - this._paused = false; - this._wasPlaying = true; - - return this._startAnimation(key, startFrame); - }, - - /** - * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component. - * - * @method Phaser.GameObjects.Components.Animation#playReverse - * @fires Phaser.GameObjects.Components.Animation#onStartEvent - * @since 3.12.0 - * - * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. - * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - playReverse: function (key, ignoreIfPlaying, startFrame) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - if (startFrame === undefined) { startFrame = 0; } - - if (key instanceof BaseAnimation) - { - key = key.key; - } - - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) - { - return this.parent; - } - - this.forward = false; - this._reverse = true; - - return this._startAnimation(key, startFrame); - }, - - /** - * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. - * - * @method Phaser.GameObjects.Components.Animation#_startAnimation - * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START - * @since 3.12.0 - * - * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - _startAnimation: function (key, startFrame) - { - this.load(key, startFrame); - - var anim = this.currentAnim; - var gameObject = this.parent; - - if (!anim) - { - return gameObject; - } - - // Should give us 9,007,199,254,740,991 safe repeats - this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; - - anim.getFirstTick(this); - - this.isPlaying = true; - this.pendingRepeat = false; - - if (anim.showOnStart) - { - gameObject.visible = true; - } - - var frame = this.currentFrame; - - anim.emit(Events.ANIMATION_START, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject); - - return gameObject; - }, - - /** - * Reverse the Animation that is already playing on the Game Object. - * - * @method Phaser.GameObjects.Components.Animation#reverse - * @since 3.12.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - reverse: function () - { - if (this.isPlaying) - { - this._reverse = !this._reverse; - - this.forward = !this.forward; - } - - return this.parent; - }, - - /** - * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. - * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different - * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does. - * - * @method Phaser.GameObjects.Components.Animation#getProgress - * @since 3.4.0 - * - * @return {number} The progress of the current animation, between 0 and 1. - */ - getProgress: function () - { - var p = this.currentFrame.progress; - - if (!this.forward) - { - p = 1 - p; - } - - return p; - }, - - /** - * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. - * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. - * - * @method Phaser.GameObjects.Components.Animation#setProgress - * @since 3.4.0 - * - * @param {number} [value=0] - The progress value, between 0 and 1. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setProgress: function (value) - { - if (!this.forward) - { - value = 1 - value; - } - - this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); - - return this.parent; - }, - - /** - * Handle the removal of an animation from the Animation Manager. - * - * @method Phaser.GameObjects.Components.Animation#remove - * @since 3.0.0 - * - * @param {string} [key] - The key of the removed Animation. - * @param {Phaser.Animations.Animation} [animation] - The removed Animation. - */ - remove: function (key, animation) - { - if (animation === undefined) { animation = this.currentAnim; } - - if (this.isPlaying && animation.key === this.currentAnim.key) - { - this.stop(); - - this.setCurrentFrame(this.currentAnim.frames[0]); - } - }, - - /** - * Gets the number of times that the animation will repeat - * after its first iteration. For example, if returns 1, the animation will - * play a total of twice (the initial play plus 1 repeat). - * A value of -1 means the animation will repeat indefinitely. - * - * @method Phaser.GameObjects.Components.Animation#getRepeat - * @since 3.4.0 - * - * @return {integer} The number of times that the animation will repeat. - */ - getRepeat: function () - { - return this._repeat; - }, - - /** - * Sets the number of times that the animation should repeat - * after its first iteration. For example, if repeat is 1, the animation will - * play a total of twice (the initial play plus 1 repeat). - * To repeat indefinitely, use -1. repeat should always be an integer. - * - * @method Phaser.GameObjects.Components.Animation#setRepeat - * @since 3.4.0 - * - * @param {integer} value - The number of times that the animation should repeat. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeat: function (value) - { - this._repeat = value; - - this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; - - return this.parent; - }, - - /** - * Gets the amount of delay between repeats, if any. - * - * @method Phaser.GameObjects.Components.Animation#getRepeatDelay - * @since 3.4.0 - * - * @return {number} The delay between repeats. - */ - getRepeatDelay: function () - { - return this._repeatDelay; - }, - - /** - * Sets the amount of time in seconds between repeats. - * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially, - * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds - * before doing its final repeat. - * - * @method Phaser.GameObjects.Components.Animation#setRepeatDelay - * @since 3.4.0 - * - * @param {number} value - The delay to wait between repeats, in seconds. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeatDelay: function (value) - { - this._repeatDelay = value; - - return this.parent; - }, - - /** - * Restarts the current animation from its beginning, optionally including its delay value. - * - * @method Phaser.GameObjects.Components.Animation#restart - * @fires Phaser.Animations.Events#ANIMATION_RESTART - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART - * @since 3.0.0 - * - * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - restart: function (includeDelay) - { - if (includeDelay === undefined) { includeDelay = false; } - - var anim = this.currentAnim; - - anim.getFirstTick(this, includeDelay); - - this.forward = true; - this.isPlaying = true; - this.pendingRepeat = false; - this._paused = false; - - // Set frame - this.updateFrame(anim.frames[0]); - - var gameObject = this.parent; - var frame = this.currentFrame; - - anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject); - - return this.parent; - }, - - /** - * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. - * - * If no animation is set, no event will be dispatched. - * - * If there is another animation queued (via the `chain` method) then it will start playing immediately. - * - * @method Phaser.GameObjects.Components.Animation#stop - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stop: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - var gameObject = this.parent; - var anim = this.currentAnim; - var frame = this.currentFrame; - - if (anim) - { - anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); - } - - if (this.nextAnim) - { - var key = this.nextAnim; - - this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; - - this.play(key); - } - - return gameObject; - }, - - /** - * Stops the current animation from playing after the specified time delay, given in milliseconds. - * - * @method Phaser.GameObjects.Components.Animation#stopAfterDelay - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @param {integer} delay - The number of milliseconds to wait before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopAfterDelay: function (delay) - { - this._pendingStop = 1; - this._pendingStopValue = delay; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next repeats. - * - * @method Phaser.GameObjects.Components.Animation#stopOnRepeat - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopOnRepeat: function () - { - this._pendingStop = 2; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next sets the given frame. - * If this frame doesn't exist within the animation it will not stop it from playing. - * - * @method Phaser.GameObjects.Components.Animation#stopOnFrame - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopOnFrame: function (frame) - { - this._pendingStop = 3; - this._pendingStopValue = frame; - - return this.parent; - }, - - /** - * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default. - * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. - * - * @method Phaser.GameObjects.Components.Animation#setTimeScale - * @since 3.4.0 - * - * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setTimeScale: function (value) - { - if (value === undefined) { value = 1; } - - this._timeScale = value; - - return this.parent; - }, - - /** - * Gets the Time Scale factor. - * - * @method Phaser.GameObjects.Components.Animation#getTimeScale - * @since 3.4.0 - * - * @return {number} The Time Scale value. - */ - getTimeScale: function () - { - return this._timeScale; - }, - - /** - * Returns the total number of frames in this animation. - * - * @method Phaser.GameObjects.Components.Animation#getTotalFrames - * @since 3.4.0 - * - * @return {integer} The total number of frames in this animation. - */ - getTotalFrames: function () - { - return this.currentAnim.frames.length; - }, - - /** - * The internal update loop for the Animation Component. - * - * @method Phaser.GameObjects.Components.Animation#update - * @since 3.0.0 - * - * @param {number} time - The current timestamp. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. - */ - update: function (time, delta) - { - if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused) - { - return; - } - - this.accumulator += delta * this._timeScale; - - if (this._pendingStop === 1) - { - this._pendingStopValue -= delta; - - if (this._pendingStopValue <= 0) - { - return this.currentAnim.completeAnimation(this); - } - } - - if (this.accumulator >= this.nextTick) - { - this.currentAnim.setFrame(this); - } - }, - - /** - * Sets the given Animation Frame as being the current frame - * and applies it to the parent Game Object, adjusting its size and origin as needed. - * - * @method Phaser.GameObjects.Components.Animation#setCurrentFrame - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current. - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - setCurrentFrame: function (animationFrame) - { - var gameObject = this.parent; - - this.currentFrame = animationFrame; - - gameObject.texture = animationFrame.frame.texture; - gameObject.frame = animationFrame.frame; - - if (gameObject.isCropped) - { - gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); - } - - gameObject.setSizeToFrame(); - - if (gameObject._originComponent) - { - if (animationFrame.frame.customPivot) - { - gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); - } - else - { - gameObject.updateDisplayOrigin(); - } - } - - return gameObject; - }, - - /** - * Internal frame change handler. - * - * @method Phaser.GameObjects.Components.Animation#updateFrame - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE - * @private - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. - */ - updateFrame: function (animationFrame) - { - var gameObject = this.setCurrentFrame(animationFrame); - - if (this.isPlaying) - { - if (animationFrame.setAlpha) - { - gameObject.alpha = animationFrame.alpha; - } - - var anim = this.currentAnim; - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject); - - if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) - { - this.currentAnim.completeAnimation(this); - } - } - }, - - /** - * Advances the animation to the next frame, regardless of the time or animation state. - * If the animation is set to repeat, or yoyo, this will still take effect. - * - * Calling this does not change the direction of the animation. I.e. if it was currently - * playing in reverse, calling this method doesn't then change the direction to forwards. - * - * @method Phaser.GameObjects.Components.Animation#nextFrame - * @since 3.16.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - nextFrame: function () - { - if (this.currentAnim) - { - this.currentAnim.nextFrame(this); - } - - return this.parent; - }, - - /** - * Advances the animation to the previous frame, regardless of the time or animation state. - * If the animation is set to repeat, or yoyo, this will still take effect. - * - * Calling this does not change the direction of the animation. I.e. if it was currently - * playing in forwards, calling this method doesn't then change the direction to backwards. - * - * @method Phaser.GameObjects.Components.Animation#previousFrame - * @since 3.16.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - previousFrame: function () - { - if (this.currentAnim) - { - this.currentAnim.previousFrame(this); - } - - return this.parent; - }, - - /** - * Sets if the current Animation will yoyo when it reaches the end. - * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. - * - * @method Phaser.GameObjects.Components.Animation#setYoyo - * @since 3.4.0 - * - * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not. - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - setYoyo: function (value) - { - if (value === undefined) { value = false; } - - this._yoyo = value; - - return this.parent; - }, - - /** - * Gets if the current Animation will yoyo when it reaches the end. - * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. - * - * @method Phaser.GameObjects.Components.Animation#getYoyo - * @since 3.4.0 - * - * @return {boolean} `true` if the animation is set to yoyo, `false` if not. - */ - getYoyo: function () - { - return this._yoyo; - }, - - /** - * Destroy this Animation component. - * - * Unregisters event listeners and cleans up its references. - * - * @method Phaser.GameObjects.Components.Animation#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this); - - this.animationManager = null; - this.parent = null; - this.nextAnimsQueue.length = 0; - - this.currentAnim = null; - this.currentFrame = null; - } - -}); - -module.exports = Animation; - - /***/ }), /***/ "../../../src/gameobjects/components/BlendMode.js": -/*!***********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/BlendMode.js ***! - \***********************************************************************************/ +/*!******************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/BlendMode.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -6861,9 +3909,9 @@ module.exports = BlendMode; /***/ }), /***/ "../../../src/gameobjects/components/ComputedSize.js": -/*!**************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ComputedSize.js ***! - \**************************************************************************************/ +/*!*********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/ComputedSize.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -7015,9 +4063,9 @@ module.exports = ComputedSize; /***/ }), /***/ "../../../src/gameobjects/components/Crop.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Crop.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Crop.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -7145,9 +4193,9 @@ module.exports = Crop; /***/ }), /***/ "../../../src/gameobjects/components/Depth.js": -/*!*******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Depth.js ***! - \*******************************************************************************/ +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Depth.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -7243,9 +4291,9 @@ module.exports = Depth; /***/ }), /***/ "../../../src/gameobjects/components/Flip.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Flip.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Flip.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -7412,9 +4460,9 @@ module.exports = Flip; /***/ }), /***/ "../../../src/gameobjects/components/GetBounds.js": -/*!***********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/GetBounds.js ***! - \***********************************************************************************/ +/*!******************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/GetBounds.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -7776,9 +4824,9 @@ module.exports = GetBounds; /***/ }), /***/ "../../../src/gameobjects/components/Mask.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Mask.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Mask.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -7928,9 +4976,9 @@ module.exports = Mask; /***/ }), /***/ "../../../src/gameobjects/components/Origin.js": -/*!********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Origin.js ***! - \********************************************************************************/ +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Origin.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -8136,9 +5184,9 @@ module.exports = Origin; /***/ }), /***/ "../../../src/gameobjects/components/PathFollower.js": -/*!**************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/PathFollower.js ***! - \**************************************************************************************/ +/*!*********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/PathFollower.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -8568,11 +5616,11 @@ module.exports = PathFollower; /***/ }), /***/ "../../../src/gameobjects/components/Pipeline.js": -/*!**********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Pipeline.js ***! - \**********************************************************************************/ +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Pipeline.js ***! + \*****************************************************************/ /*! no static exports found */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -8580,6 +5628,8 @@ module.exports = PathFollower; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var PIPELINE_CONST = __webpack_require__(/*! ../../renderer/webgl/pipelines/const */ "../../../src/renderer/webgl/pipelines/const.js"); + /** * Provides methods used for setting the WebGL rendering pipeline of a Game Object. * @@ -8621,19 +5671,20 @@ var Pipeline = { * @webglOnly * @since 3.0.0 * - * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. + * @param {string} [name=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. * * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. */ - initPipeline: function (pipelineName) + initPipeline: function (name) { - if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } + if (name === undefined) { name = PIPELINE_CONST.MULTI_PIPELINE; } var renderer = this.scene.sys.game.renderer; + var pipelines = renderer.pipelines; - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + if (pipelines && pipelines.has(name)) { - this.defaultPipeline = renderer.getPipeline(pipelineName); + this.defaultPipeline = pipelines.get(name); this.pipeline = this.defaultPipeline; return true; @@ -8649,17 +5700,18 @@ var Pipeline = { * @webglOnly * @since 3.0.0 * - * @param {string} pipelineName - The name of the pipeline to set on this Game Object. + * @param {string} name - The name of the pipeline to set on this Game Object. * * @return {this} This Game Object instance. */ - setPipeline: function (pipelineName) + setPipeline: function (name) { var renderer = this.scene.sys.game.renderer; + var pipelines = renderer.pipelines; - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + if (pipelines && pipelines.has(name)) { - this.pipeline = renderer.getPipeline(pipelineName); + this.pipeline = pipelines.get(name); } return this; @@ -8703,9 +5755,9 @@ module.exports = Pipeline; /***/ }), /***/ "../../../src/gameobjects/components/ScrollFactor.js": -/*!**************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ScrollFactor.js ***! - \**************************************************************************************/ +/*!*********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/ScrollFactor.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -8815,9 +5867,9 @@ module.exports = ScrollFactor; /***/ }), /***/ "../../../src/gameobjects/components/Size.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Size.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Size.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -9007,9 +6059,9 @@ module.exports = Size; /***/ }), /***/ "../../../src/gameobjects/components/Texture.js": -/*!*********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Texture.js ***! - \*********************************************************************************/ +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Texture.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -9142,9 +6194,9 @@ module.exports = Texture; /***/ }), /***/ "../../../src/gameobjects/components/TextureCrop.js": -/*!*************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TextureCrop.js ***! - \*************************************************************************************/ +/*!********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/TextureCrop.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -9355,9 +6407,9 @@ module.exports = TextureCrop; /***/ }), /***/ "../../../src/gameobjects/components/Tint.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Tint.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Tint.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -9692,9 +6744,9 @@ module.exports = Tint; /***/ }), /***/ "../../../src/gameobjects/components/ToJSON.js": -/*!********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ToJSON.js ***! - \********************************************************************************/ +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/ToJSON.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -9758,9 +6810,9 @@ module.exports = ToJSON; /***/ }), /***/ "../../../src/gameobjects/components/Transform.js": -/*!***********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Transform.js ***! - \***********************************************************************************/ +/*!******************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Transform.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -10354,9 +7406,9 @@ module.exports = Transform; /***/ }), /***/ "../../../src/gameobjects/components/TransformMatrix.js": -/*!*****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TransformMatrix.js ***! - \*****************************************************************************************/ +/*!************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/TransformMatrix.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -11379,9 +8431,9 @@ module.exports = TransformMatrix; /***/ }), /***/ "../../../src/gameobjects/components/Visible.js": -/*!*********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Visible.js ***! - \*********************************************************************************/ +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Visible.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -11473,9 +8525,9 @@ module.exports = Visible; /***/ }), /***/ "../../../src/gameobjects/components/index.js": -/*!*******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/index.js ***! - \*******************************************************************************/ +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/index.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -11493,7 +8545,6 @@ module.exports = { Alpha: __webpack_require__(/*! ./Alpha */ "../../../src/gameobjects/components/Alpha.js"), AlphaSingle: __webpack_require__(/*! ./AlphaSingle */ "../../../src/gameobjects/components/AlphaSingle.js"), - Animation: __webpack_require__(/*! ./Animation */ "../../../src/gameobjects/components/Animation.js"), BlendMode: __webpack_require__(/*! ./BlendMode */ "../../../src/gameobjects/components/BlendMode.js"), ComputedSize: __webpack_require__(/*! ./ComputedSize */ "../../../src/gameobjects/components/ComputedSize.js"), Crop: __webpack_require__(/*! ./Crop */ "../../../src/gameobjects/components/Crop.js"), @@ -11520,9 +8571,9 @@ module.exports = { /***/ }), /***/ "../../../src/gameobjects/container/Container.js": -/*!**********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/container/Container.js ***! - \**********************************************************************************/ +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/container/Container.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -11572,6 +8623,9 @@ var Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "../../../src/math/V * * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them * to use as their hit area. Container children can also be enabled for input, independent of the Container. + * + * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child, + * or the input area will become misaligned. * * 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, @@ -12164,7 +9218,7 @@ var Container = new Class({ }; } - ArrayUtils.StableSort.inplace(this.list, handler); + ArrayUtils.StableSort(this.list, handler); return this; }, @@ -12890,9 +9944,9 @@ module.exports = Container; /***/ }), /***/ "../../../src/gameobjects/container/ContainerCanvasRenderer.js": -/*!************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerCanvasRenderer.js ***! - \************************************************************************************************/ +/*!*******************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerCanvasRenderer.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13002,9 +10056,9 @@ module.exports = ContainerCanvasRenderer; /***/ }), /***/ "../../../src/gameobjects/container/ContainerRender.js": -/*!****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerRender.js ***! - \****************************************************************************************/ +/*!***********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerRender.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -13039,9 +10093,9 @@ module.exports = { /***/ }), /***/ "../../../src/gameobjects/container/ContainerWebGLRenderer.js": -/*!***********************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerWebGLRenderer.js ***! - \***********************************************************************************************/ +/*!******************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerWebGLRenderer.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13193,9 +10247,9 @@ module.exports = ContainerWebGLRenderer; /***/ }), /***/ "../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js": -/*!******************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js ***! - \******************************************************************************************/ +/*!*************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13224,9 +10278,9 @@ module.exports = 'addedtoscene'; /***/ }), /***/ "../../../src/gameobjects/events/DESTROY_EVENT.js": -/*!***********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! - \***********************************************************************************/ +/*!******************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13254,9 +10308,9 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js": -/*!**********************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js ***! - \**********************************************************************************************/ +/*!*****************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13285,9 +10339,9 @@ module.exports = 'removedfromscene'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js": -/*!******************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js ***! - \******************************************************************************************/ +/*!*************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13322,9 +10376,9 @@ module.exports = 'complete'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js": -/*!*****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js ***! - \*****************************************************************************************/ +/*!************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13356,9 +10410,9 @@ module.exports = 'created'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js": -/*!***************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js ***! - \***************************************************************************************/ +/*!**********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13387,9 +10441,9 @@ module.exports = 'error'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js": -/*!**************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js ***! - \**************************************************************************************/ +/*!*********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13424,9 +10478,9 @@ module.exports = 'loop'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js": -/*!**************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js ***! - \**************************************************************************************/ +/*!*********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13457,9 +10511,9 @@ module.exports = 'play'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js": -/*!****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js ***! - \****************************************************************************************/ +/*!***********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13487,9 +10541,9 @@ module.exports = 'seeked'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js": -/*!*****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js ***! - \*****************************************************************************************/ +/*!************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13518,9 +10572,9 @@ module.exports = 'seeking'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_STOP_EVENT.js": -/*!**************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js ***! - \**************************************************************************************/ +/*!*********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13549,9 +10603,9 @@ module.exports = 'stop'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js": -/*!*****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js ***! - \*****************************************************************************************/ +/*!************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13580,9 +10634,9 @@ module.exports = 'timeout'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js": -/*!******************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js ***! - \******************************************************************************************/ +/*!*************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13611,9 +10665,9 @@ module.exports = 'unlocked'; /***/ }), /***/ "../../../src/gameobjects/events/index.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/index.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/index.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -13649,9 +10703,9 @@ module.exports = { /***/ }), /***/ "../../../src/geom/const.js": -/*!*************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/const.js ***! - \*************************************************************/ +/*!********************************************!*\ + !*** D:/wamp/www/phaser/src/geom/const.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13734,9 +10788,9 @@ module.exports = GEOM_CONST; /***/ }), /***/ "../../../src/geom/line/GetPoint.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoint.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/line/GetPoint.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -13778,9 +10832,9 @@ module.exports = GetPoint; /***/ }), /***/ "../../../src/geom/line/GetPoints.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoints.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/line/GetPoints.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -13848,9 +10902,9 @@ module.exports = GetPoints; /***/ }), /***/ "../../../src/geom/line/Length.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/line/Length.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/line/Length.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13881,9 +10935,9 @@ module.exports = Length; /***/ }), /***/ "../../../src/geom/line/Line.js": -/*!*****************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/line/Line.js ***! - \*****************************************************************/ +/*!************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/line/Line.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14223,9 +11277,9 @@ module.exports = Line; /***/ }), /***/ "../../../src/geom/line/Random.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/line/Random.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/line/Random.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14268,9 +11322,9 @@ module.exports = Random; /***/ }), /***/ "../../../src/geom/point/Point.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/point/Point.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/point/Point.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14366,9 +11420,9 @@ module.exports = Point; /***/ }), /***/ "../../../src/geom/rectangle/Contains.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Contains.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/Contains.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -14406,9 +11460,9 @@ module.exports = Contains; /***/ }), /***/ "../../../src/geom/rectangle/GetPoint.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoint.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/GetPoint.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14492,9 +11546,9 @@ module.exports = GetPoint; /***/ }), /***/ "../../../src/geom/rectangle/GetPoints.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoints.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/GetPoints.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14551,9 +11605,9 @@ module.exports = GetPoints; /***/ }), /***/ "../../../src/geom/rectangle/Perimeter.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Perimeter.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/Perimeter.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -14584,9 +11638,9 @@ module.exports = Perimeter; /***/ }), /***/ "../../../src/geom/rectangle/Random.js": -/*!************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Random.js ***! - \************************************************************************/ +/*!*******************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/Random.js ***! + \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14627,9 +11681,9 @@ module.exports = Random; /***/ }), /***/ "../../../src/geom/rectangle/Rectangle.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Rectangle.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/Rectangle.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -15143,9 +12197,9 @@ module.exports = Rectangle; /***/ }), /***/ "../../../src/geom/rectangle/Union.js": -/*!***********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Union.js ***! - \***********************************************************************/ +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/Union.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -15190,9 +12244,9 @@ module.exports = Union; /***/ }), /***/ "../../../src/loader/File.js": -/*!**************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/File.js ***! - \**************************************************************/ +/*!*********************************************!*\ + !*** D:/wamp/www/phaser/src/loader/File.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -15743,9 +12797,9 @@ module.exports = File; /***/ }), /***/ "../../../src/loader/FileTypesManager.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/FileTypesManager.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/FileTypesManager.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -15817,9 +12871,9 @@ module.exports = FileTypesManager; /***/ }), /***/ "../../../src/loader/GetURL.js": -/*!****************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/GetURL.js ***! - \****************************************************************/ +/*!***********************************************!*\ + !*** D:/wamp/www/phaser/src/loader/GetURL.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -15863,9 +12917,9 @@ module.exports = GetURL; /***/ }), /***/ "../../../src/loader/MergeXHRSettings.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/MergeXHRSettings.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/MergeXHRSettings.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -15916,9 +12970,9 @@ module.exports = MergeXHRSettings; /***/ }), /***/ "../../../src/loader/MultiFile.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/MultiFile.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/MultiFile.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -16155,9 +13209,9 @@ module.exports = MultiFile; /***/ }), /***/ "../../../src/loader/XHRLoader.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/XHRLoader.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/XHRLoader.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -16241,9 +13295,9 @@ module.exports = XHRLoader; /***/ }), /***/ "../../../src/loader/XHRSettings.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/XHRSettings.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/XHRSettings.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16316,9 +13370,9 @@ module.exports = XHRSettings; /***/ }), /***/ "../../../src/loader/const.js": -/*!***************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/const.js ***! - \***************************************************************/ +/*!**********************************************!*\ + !*** D:/wamp/www/phaser/src/loader/const.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16473,9 +13527,9 @@ module.exports = FILE_CONST; /***/ }), /***/ "../../../src/loader/events/ADD_EVENT.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/ADD_EVENT.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/events/ADD_EVENT.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16508,9 +13562,9 @@ module.exports = 'addfile'; /***/ }), /***/ "../../../src/loader/events/COMPLETE_EVENT.js": -/*!*******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/COMPLETE_EVENT.js ***! - \*******************************************************************************/ +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/events/COMPLETE_EVENT.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16541,9 +13595,9 @@ module.exports = 'complete'; /***/ }), /***/ "../../../src/loader/events/FILE_COMPLETE_EVENT.js": -/*!************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! - \************************************************************************************/ +/*!*******************************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16575,9 +13629,9 @@ module.exports = 'filecomplete'; /***/ }), /***/ "../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js": -/*!****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! - \****************************************************************************************/ +/*!***********************************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16634,9 +13688,9 @@ module.exports = 'filecomplete-'; /***/ }), /***/ "../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js": -/*!**************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! - \**************************************************************************************/ +/*!*********************************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16664,9 +13718,9 @@ module.exports = 'loaderror'; /***/ }), /***/ "../../../src/loader/events/FILE_LOAD_EVENT.js": -/*!********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! - \********************************************************************************/ +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16695,9 +13749,9 @@ module.exports = 'load'; /***/ }), /***/ "../../../src/loader/events/FILE_PROGRESS_EVENT.js": -/*!************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! - \************************************************************************************/ +/*!*******************************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16727,9 +13781,9 @@ module.exports = 'fileprogress'; /***/ }), /***/ "../../../src/loader/events/POST_PROCESS_EVENT.js": -/*!***********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! - \***********************************************************************************/ +/*!******************************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16761,9 +13815,9 @@ module.exports = 'postprocess'; /***/ }), /***/ "../../../src/loader/events/PROGRESS_EVENT.js": -/*!*******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/PROGRESS_EVENT.js ***! - \*******************************************************************************/ +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/events/PROGRESS_EVENT.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16791,9 +13845,9 @@ module.exports = 'progress'; /***/ }), /***/ "../../../src/loader/events/START_EVENT.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/START_EVENT.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/events/START_EVENT.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16823,9 +13877,9 @@ module.exports = 'start'; /***/ }), /***/ "../../../src/loader/events/index.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/index.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/events/index.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -16858,9 +13912,9 @@ module.exports = { /***/ }), /***/ "../../../src/loader/filetypes/ImageFile.js": -/*!*****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/filetypes/ImageFile.js ***! - \*****************************************************************************/ +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/filetypes/ImageFile.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -17137,9 +14191,9 @@ module.exports = ImageFile; /***/ }), /***/ "../../../src/loader/filetypes/JSONFile.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/filetypes/JSONFile.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/filetypes/JSONFile.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -17372,9 +14426,9 @@ module.exports = JSONFile; /***/ }), /***/ "../../../src/loader/filetypes/TextFile.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/loader/filetypes/TextFile.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/loader/filetypes/TextFile.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -17552,9 +14606,9 @@ module.exports = TextFile; /***/ }), /***/ "../../../src/math/Average.js": -/*!***************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Average.js ***! - \***************************************************************/ +/*!**********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Average.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17592,9 +14646,9 @@ module.exports = Average; /***/ }), /***/ "../../../src/math/Bernstein.js": -/*!*****************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Bernstein.js ***! - \*****************************************************************/ +/*!************************************************!*\ + !*** D:/wamp/www/phaser/src/math/Bernstein.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -17628,9 +14682,9 @@ module.exports = Bernstein; /***/ }), /***/ "../../../src/math/Between.js": -/*!***************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Between.js ***! - \***************************************************************/ +/*!**********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Between.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17662,9 +14716,9 @@ module.exports = Between; /***/ }), /***/ "../../../src/math/CatmullRom.js": -/*!******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/CatmullRom.js ***! - \******************************************************************/ +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/math/CatmullRom.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17704,9 +14758,9 @@ module.exports = CatmullRom; /***/ }), /***/ "../../../src/math/CeilTo.js": -/*!**************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/CeilTo.js ***! - \**************************************************************/ +/*!*********************************************!*\ + !*** D:/wamp/www/phaser/src/math/CeilTo.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17746,9 +14800,9 @@ module.exports = CeilTo; /***/ }), /***/ "../../../src/math/Clamp.js": -/*!*************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Clamp.js ***! - \*************************************************************/ +/*!********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Clamp.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17781,9 +14835,9 @@ module.exports = Clamp; /***/ }), /***/ "../../../src/math/DegToRad.js": -/*!****************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/DegToRad.js ***! - \****************************************************************/ +/*!***********************************************!*\ + !*** D:/wamp/www/phaser/src/math/DegToRad.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -17816,9 +14870,9 @@ module.exports = DegToRad; /***/ }), /***/ "../../../src/math/Difference.js": -/*!******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Difference.js ***! - \******************************************************************/ +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/math/Difference.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17850,9 +14904,9 @@ module.exports = Difference; /***/ }), /***/ "../../../src/math/Factorial.js": -/*!*****************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Factorial.js ***! - \*****************************************************************/ +/*!************************************************!*\ + !*** D:/wamp/www/phaser/src/math/Factorial.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17895,9 +14949,9 @@ module.exports = Factorial; /***/ }), /***/ "../../../src/math/FloatBetween.js": -/*!********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/FloatBetween.js ***! - \********************************************************************/ +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/math/FloatBetween.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17929,9 +14983,9 @@ module.exports = FloatBetween; /***/ }), /***/ "../../../src/math/FloorTo.js": -/*!***************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/FloorTo.js ***! - \***************************************************************/ +/*!**********************************************!*\ + !*** D:/wamp/www/phaser/src/math/FloorTo.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17971,9 +15025,9 @@ module.exports = FloorTo; /***/ }), /***/ "../../../src/math/FromPercent.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/FromPercent.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/math/FromPercent.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -18010,9 +15064,9 @@ module.exports = FromPercent; /***/ }), /***/ "../../../src/math/GetSpeed.js": -/*!****************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/GetSpeed.js ***! - \****************************************************************/ +/*!***********************************************!*\ + !*** D:/wamp/www/phaser/src/math/GetSpeed.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -18048,9 +15102,9 @@ module.exports = GetSpeed; /***/ }), /***/ "../../../src/math/IsEven.js": -/*!**************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/IsEven.js ***! - \**************************************************************/ +/*!*********************************************!*\ + !*** D:/wamp/www/phaser/src/math/IsEven.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -18084,9 +15138,9 @@ module.exports = IsEven; /***/ }), /***/ "../../../src/math/IsEvenStrict.js": -/*!********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/IsEvenStrict.js ***! - \********************************************************************/ +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/math/IsEvenStrict.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -18118,9 +15172,9 @@ module.exports = IsEvenStrict; /***/ }), /***/ "../../../src/math/Linear.js": -/*!**************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Linear.js ***! - \**************************************************************/ +/*!*********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Linear.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -18153,9 +15207,9 @@ module.exports = Linear; /***/ }), /***/ "../../../src/math/Matrix3.js": -/*!***************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Matrix3.js ***! - \***************************************************************/ +/*!**********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Matrix3.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -18751,9 +15805,9 @@ module.exports = Matrix3; /***/ }), /***/ "../../../src/math/Matrix4.js": -/*!***************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Matrix4.js ***! - \***************************************************************/ +/*!**********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Matrix4.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -20218,9 +17272,9 @@ module.exports = Matrix4; /***/ }), /***/ "../../../src/math/MaxAdd.js": -/*!**************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/MaxAdd.js ***! - \**************************************************************/ +/*!*********************************************!*\ + !*** D:/wamp/www/phaser/src/math/MaxAdd.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -20253,9 +17307,9 @@ module.exports = MaxAdd; /***/ }), /***/ "../../../src/math/MinSub.js": -/*!**************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/MinSub.js ***! - \**************************************************************/ +/*!*********************************************!*\ + !*** D:/wamp/www/phaser/src/math/MinSub.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -20288,9 +17342,9 @@ module.exports = MinSub; /***/ }), /***/ "../../../src/math/Percent.js": -/*!***************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Percent.js ***! - \***************************************************************/ +/*!**********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Percent.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -20352,9 +17406,9 @@ module.exports = Percent; /***/ }), /***/ "../../../src/math/Quaternion.js": -/*!******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Quaternion.js ***! - \******************************************************************/ +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/math/Quaternion.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -21129,9 +18183,9 @@ module.exports = Quaternion; /***/ }), /***/ "../../../src/math/RadToDeg.js": -/*!****************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/RadToDeg.js ***! - \****************************************************************/ +/*!***********************************************!*\ + !*** D:/wamp/www/phaser/src/math/RadToDeg.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -21164,9 +18218,9 @@ module.exports = RadToDeg; /***/ }), /***/ "../../../src/math/RandomXY.js": -/*!****************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/RandomXY.js ***! - \****************************************************************/ +/*!***********************************************!*\ + !*** D:/wamp/www/phaser/src/math/RandomXY.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21209,9 +18263,9 @@ module.exports = RandomXY; /***/ }), /***/ "../../../src/math/RandomXYZ.js": -/*!*****************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/RandomXYZ.js ***! - \*****************************************************************/ +/*!************************************************!*\ + !*** D:/wamp/www/phaser/src/math/RandomXYZ.js ***! + \************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21253,9 +18307,9 @@ module.exports = RandomXYZ; /***/ }), /***/ "../../../src/math/RandomXYZW.js": -/*!******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/RandomXYZW.js ***! - \******************************************************************/ +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/math/RandomXYZW.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21295,9 +18349,9 @@ module.exports = RandomXYZW; /***/ }), /***/ "../../../src/math/Rotate.js": -/*!**************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Rotate.js ***! - \**************************************************************/ +/*!*********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Rotate.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21335,9 +18389,9 @@ module.exports = Rotate; /***/ }), /***/ "../../../src/math/RotateAround.js": -/*!********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/RotateAround.js ***! - \********************************************************************/ +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/math/RotateAround.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21384,9 +18438,9 @@ module.exports = RotateAround; /***/ }), /***/ "../../../src/math/RotateAroundDistance.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/RotateAroundDistance.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/RotateAroundDistance.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21430,9 +18484,9 @@ module.exports = RotateAroundDistance; /***/ }), /***/ "../../../src/math/RotateTo.js": -/*!****************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/RotateTo.js ***! - \****************************************************************/ +/*!***********************************************!*\ + !*** D:/wamp/www/phaser/src/math/RotateTo.js ***! + \***********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21472,9 +18526,9 @@ module.exports = RotateTo; /***/ }), /***/ "../../../src/math/RotateVec3.js": -/*!******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/RotateVec3.js ***! - \******************************************************************/ +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/math/RotateVec3.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -21525,9 +18579,9 @@ module.exports = RotateVec3; /***/ }), /***/ "../../../src/math/RoundAwayFromZero.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/RoundAwayFromZero.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/RoundAwayFromZero.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21559,9 +18613,9 @@ module.exports = RoundAwayFromZero; /***/ }), /***/ "../../../src/math/RoundTo.js": -/*!***************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/RoundTo.js ***! - \***************************************************************/ +/*!**********************************************!*\ + !*** D:/wamp/www/phaser/src/math/RoundTo.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21616,9 +18670,9 @@ module.exports = RoundTo; /***/ }), /***/ "../../../src/math/SinCosTableGenerator.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/SinCosTableGenerator.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/SinCosTableGenerator.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21674,9 +18728,9 @@ module.exports = SinCosTableGenerator; /***/ }), /***/ "../../../src/math/SmoothStep.js": -/*!******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/SmoothStep.js ***! - \******************************************************************/ +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/math/SmoothStep.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21726,9 +18780,9 @@ module.exports = SmoothStep; /***/ }), /***/ "../../../src/math/SmootherStep.js": -/*!********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/SmootherStep.js ***! - \********************************************************************/ +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/math/SmootherStep.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21770,9 +18824,9 @@ module.exports = SmootherStep; /***/ }), /***/ "../../../src/math/ToXY.js": -/*!************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/ToXY.js ***! - \************************************************************/ +/*!*******************************************!*\ + !*** D:/wamp/www/phaser/src/math/ToXY.js ***! + \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -21833,9 +18887,9 @@ module.exports = ToXY; /***/ }), /***/ "../../../src/math/TransformXY.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/TransformXY.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/math/TransformXY.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -21893,9 +18947,9 @@ module.exports = TransformXY; /***/ }), /***/ "../../../src/math/Vector2.js": -/*!***************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Vector2.js ***! - \***************************************************************/ +/*!**********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Vector2.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -22674,9 +19728,9 @@ module.exports = Vector2; /***/ }), /***/ "../../../src/math/Vector3.js": -/*!***************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Vector3.js ***! - \***************************************************************/ +/*!**********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Vector3.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -23489,9 +20543,9 @@ module.exports = Vector3; /***/ }), /***/ "../../../src/math/Vector4.js": -/*!***************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Vector4.js ***! - \***************************************************************/ +/*!**********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Vector4.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24039,9 +21093,9 @@ module.exports = Vector4; /***/ }), /***/ "../../../src/math/Within.js": -/*!**************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Within.js ***! - \**************************************************************/ +/*!*********************************************!*\ + !*** D:/wamp/www/phaser/src/math/Within.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24074,9 +21128,9 @@ module.exports = Within; /***/ }), /***/ "../../../src/math/Wrap.js": -/*!************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/Wrap.js ***! - \************************************************************/ +/*!*******************************************!*\ + !*** D:/wamp/www/phaser/src/math/Wrap.js ***! + \*******************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24111,9 +21165,9 @@ module.exports = Wrap; /***/ }), /***/ "../../../src/math/angle/Between.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/Between.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/Between.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24147,9 +21201,9 @@ module.exports = Between; /***/ }), /***/ "../../../src/math/angle/BetweenPoints.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPoints.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/BetweenPoints.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24183,9 +21237,9 @@ module.exports = BetweenPoints; /***/ }), /***/ "../../../src/math/angle/BetweenPointsY.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPointsY.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/BetweenPointsY.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24220,9 +21274,9 @@ module.exports = BetweenPointsY; /***/ }), /***/ "../../../src/math/angle/BetweenY.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenY.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/BetweenY.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24259,9 +21313,9 @@ module.exports = BetweenY; /***/ }), /***/ "../../../src/math/angle/CounterClockwise.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/CounterClockwise.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/CounterClockwise.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24309,9 +21363,9 @@ module.exports = CounterClockwise; /***/ }), /***/ "../../../src/math/angle/Normalize.js": -/*!***********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/Normalize.js ***! - \***********************************************************************/ +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/Normalize.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24351,9 +21405,9 @@ module.exports = Normalize; /***/ }), /***/ "../../../src/math/angle/Random.js": -/*!********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/Random.js ***! - \********************************************************************/ +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/Random.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24385,9 +21439,9 @@ module.exports = Random; /***/ }), /***/ "../../../src/math/angle/RandomDegrees.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/RandomDegrees.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/RandomDegrees.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24419,9 +21473,9 @@ module.exports = RandomDegrees; /***/ }), /***/ "../../../src/math/angle/Reverse.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/Reverse.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/Reverse.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24454,9 +21508,9 @@ module.exports = Reverse; /***/ }), /***/ "../../../src/math/angle/RotateTo.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/RotateTo.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/RotateTo.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24526,9 +21580,9 @@ module.exports = RotateTo; /***/ }), /***/ "../../../src/math/angle/ShortestBetween.js": -/*!*****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/ShortestBetween.js ***! - \*****************************************************************************/ +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/ShortestBetween.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24580,9 +21634,9 @@ module.exports = ShortestBetween; /***/ }), /***/ "../../../src/math/angle/Wrap.js": -/*!******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/Wrap.js ***! - \******************************************************************/ +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/Wrap.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24617,9 +21671,9 @@ module.exports = Wrap; /***/ }), /***/ "../../../src/math/angle/WrapDegrees.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/WrapDegrees.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/WrapDegrees.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24654,9 +21708,9 @@ module.exports = WrapDegrees; /***/ }), /***/ "../../../src/math/angle/index.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/index.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/index.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24692,9 +21746,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/const.js": -/*!*************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/const.js ***! - \*************************************************************/ +/*!********************************************!*\ + !*** D:/wamp/www/phaser/src/math/const.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24789,9 +21843,9 @@ module.exports = MATH_CONST; /***/ }), /***/ "../../../src/math/distance/DistanceBetween.js": -/*!********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetween.js ***! - \********************************************************************************/ +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/DistanceBetween.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24828,9 +21882,9 @@ module.exports = DistanceBetween; /***/ }), /***/ "../../../src/math/distance/DistanceBetweenPoints.js": -/*!**************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPoints.js ***! - \**************************************************************************************/ +/*!*********************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/DistanceBetweenPoints.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24865,9 +21919,9 @@ module.exports = DistanceBetweenPoints; /***/ }), /***/ "../../../src/math/distance/DistanceBetweenPointsSquared.js": -/*!*********************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPointsSquared.js ***! - \*********************************************************************************************/ +/*!****************************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/DistanceBetweenPointsSquared.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24902,9 +21956,9 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), /***/ "../../../src/math/distance/DistanceChebyshev.js": -/*!**********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceChebyshev.js ***! - \**********************************************************************************/ +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/DistanceChebyshev.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24941,9 +21995,9 @@ module.exports = ChebyshevDistance; /***/ }), /***/ "../../../src/math/distance/DistancePower.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistancePower.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/DistancePower.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24980,9 +22034,9 @@ module.exports = DistancePower; /***/ }), /***/ "../../../src/math/distance/DistanceSnake.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSnake.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/DistanceSnake.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25019,9 +22073,9 @@ module.exports = SnakeDistance; /***/ }), /***/ "../../../src/math/distance/DistanceSquared.js": -/*!********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSquared.js ***! - \********************************************************************************/ +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/DistanceSquared.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25058,9 +22112,9 @@ module.exports = DistanceSquared; /***/ }), /***/ "../../../src/math/distance/index.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/index.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/index.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25090,9 +22144,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/back/In.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/back/In.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/back/In.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25126,9 +22180,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/back/InOut.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/back/InOut.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/back/InOut.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25171,9 +22225,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/back/Out.js": -/*!***********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/back/Out.js ***! - \***********************************************************************/ +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/back/Out.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25207,9 +22261,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/back/index.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/back/index.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/back/index.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25235,9 +22289,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/bounce/In.js": -/*!************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/In.js ***! - \************************************************************************/ +/*!*******************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/bounce/In.js ***! + \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25285,9 +22339,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/bounce/InOut.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/InOut.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/bounce/InOut.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25354,9 +22408,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/bounce/Out.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/Out.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/bounce/Out.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25402,9 +22456,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/bounce/index.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/index.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/bounce/index.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25430,9 +22484,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/circular/In.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/circular/In.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/circular/In.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25463,9 +22517,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/circular/InOut.js": -/*!*****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/circular/InOut.js ***! - \*****************************************************************************/ +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/circular/InOut.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25503,9 +22557,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/circular/Out.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/circular/Out.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/circular/Out.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25536,9 +22590,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/circular/index.js": -/*!*****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/circular/index.js ***! - \*****************************************************************************/ +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/circular/index.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25564,9 +22618,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/cubic/In.js": -/*!***********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/In.js ***! - \***********************************************************************/ +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/cubic/In.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25597,9 +22651,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/cubic/InOut.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/InOut.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/cubic/InOut.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25637,9 +22691,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/cubic/Out.js": -/*!************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/Out.js ***! - \************************************************************************/ +/*!*******************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/cubic/Out.js ***! + \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25670,9 +22724,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/cubic/index.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/index.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/cubic/index.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25698,9 +22752,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/elastic/In.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/In.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/elastic/In.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25758,9 +22812,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/elastic/InOut.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/InOut.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/elastic/InOut.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25825,9 +22879,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/elastic/Out.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/Out.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/elastic/Out.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25885,9 +22939,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/elastic/index.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/index.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/elastic/index.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25913,9 +22967,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/expo/In.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/expo/In.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/expo/In.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25946,9 +23000,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/expo/InOut.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/expo/InOut.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/expo/InOut.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25986,9 +23040,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/expo/Out.js": -/*!***********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/expo/Out.js ***! - \***********************************************************************/ +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/expo/Out.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26019,9 +23073,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/expo/index.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/expo/index.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/expo/index.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26047,9 +23101,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/index.js": -/*!********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/index.js ***! - \********************************************************************/ +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/index.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26084,9 +23138,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/linear/Linear.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/linear/Linear.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/linear/Linear.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26117,9 +23171,9 @@ module.exports = Linear; /***/ }), /***/ "../../../src/math/easing/linear/index.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/linear/index.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/linear/index.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26135,9 +23189,9 @@ module.exports = __webpack_require__(/*! ./Linear */ "../../../src/math/easing/l /***/ }), /***/ "../../../src/math/easing/quadratic/In.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/In.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quadratic/In.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26168,9 +23222,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quadratic/InOut.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/InOut.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quadratic/InOut.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26208,9 +23262,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quadratic/Out.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/Out.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quadratic/Out.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26241,9 +23295,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quadratic/index.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/index.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quadratic/index.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26269,9 +23323,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/quartic/In.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/In.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quartic/In.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26302,9 +23356,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quartic/InOut.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/InOut.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quartic/InOut.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26342,9 +23396,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quartic/Out.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/Out.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quartic/Out.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26375,9 +23429,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quartic/index.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/index.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quartic/index.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26403,9 +23457,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/quintic/In.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/In.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quintic/In.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26436,9 +23490,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quintic/InOut.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/InOut.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quintic/InOut.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26476,9 +23530,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quintic/Out.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/Out.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quintic/Out.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26509,9 +23563,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quintic/index.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/index.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/quintic/index.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26537,9 +23591,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/sine/In.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/sine/In.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/sine/In.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26581,9 +23635,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/sine/InOut.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/sine/InOut.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/sine/InOut.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26625,9 +23679,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/sine/Out.js": -/*!***********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/sine/Out.js ***! - \***********************************************************************/ +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/sine/Out.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26669,9 +23723,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/sine/index.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/sine/index.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/sine/index.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26697,9 +23751,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/stepped/Stepped.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/Stepped.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/stepped/Stepped.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26744,9 +23798,9 @@ module.exports = Stepped; /***/ }), /***/ "../../../src/math/easing/stepped/index.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/index.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/easing/stepped/index.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26766,9 +23820,9 @@ module.exports = __webpack_require__(/*! ./Stepped */ "../../../src/math/easing/ /***/ }), /***/ "../../../src/math/fuzzy/Ceil.js": -/*!******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Ceil.js ***! - \******************************************************************/ +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/math/fuzzy/Ceil.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26802,9 +23856,9 @@ module.exports = Ceil; /***/ }), /***/ "../../../src/math/fuzzy/Equal.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Equal.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/math/fuzzy/Equal.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26841,9 +23895,9 @@ module.exports = Equal; /***/ }), /***/ "../../../src/math/fuzzy/Floor.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Floor.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/math/fuzzy/Floor.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26877,9 +23931,9 @@ module.exports = Floor; /***/ }), /***/ "../../../src/math/fuzzy/GreaterThan.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/GreaterThan.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/fuzzy/GreaterThan.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26916,9 +23970,9 @@ module.exports = GreaterThan; /***/ }), /***/ "../../../src/math/fuzzy/LessThan.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/LessThan.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/math/fuzzy/LessThan.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26955,9 +24009,9 @@ module.exports = LessThan; /***/ }), /***/ "../../../src/math/fuzzy/index.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/index.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/math/fuzzy/index.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26985,9 +24039,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/index.js": -/*!*************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/index.js ***! - \*************************************************************/ +/*!********************************************!*\ + !*** D:/wamp/www/phaser/src/math/index.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27079,9 +24133,9 @@ module.exports = PhaserMath; /***/ }), /***/ "../../../src/math/interpolation/BezierInterpolation.js": -/*!*****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/BezierInterpolation.js ***! - \*****************************************************************************************/ +/*!************************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/interpolation/BezierInterpolation.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27123,9 +24177,9 @@ module.exports = BezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/CatmullRomInterpolation.js": -/*!*********************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! - \*********************************************************************************************/ +/*!****************************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27185,9 +24239,9 @@ module.exports = CatmullRomInterpolation; /***/ }), /***/ "../../../src/math/interpolation/CubicBezierInterpolation.js": -/*!**********************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! - \**********************************************************************************************/ +/*!*****************************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27260,9 +24314,9 @@ module.exports = CubicBezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/LinearInterpolation.js": -/*!*****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/LinearInterpolation.js ***! - \*****************************************************************************************/ +/*!************************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/interpolation/LinearInterpolation.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27312,9 +24366,9 @@ module.exports = LinearInterpolation; /***/ }), /***/ "../../../src/math/interpolation/QuadraticBezierInterpolation.js": -/*!**************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! - \**************************************************************************************************/ +/*!*********************************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27376,9 +24430,9 @@ module.exports = QuadraticBezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/SmoothStepInterpolation.js": -/*!*********************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! - \*********************************************************************************************/ +/*!****************************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27414,9 +24468,9 @@ module.exports = SmoothStepInterpolation; /***/ }), /***/ "../../../src/math/interpolation/SmootherStepInterpolation.js": -/*!***********************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! - \***********************************************************************************************/ +/*!******************************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27452,9 +24506,9 @@ module.exports = SmootherStepInterpolation; /***/ }), /***/ "../../../src/math/interpolation/index.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/index.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/interpolation/index.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27484,9 +24538,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/pow2/GetPowerOfTwo.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/pow2/GetPowerOfTwo.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/pow2/GetPowerOfTwo.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27519,9 +24573,9 @@ module.exports = GetPowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/IsSizePowerOfTwo.js": -/*!*****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! - \*****************************************************************************/ +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27554,9 +24608,9 @@ module.exports = IsSizePowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/IsValuePowerOfTwo.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27587,9 +24641,9 @@ module.exports = IsValuePowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/index.js": -/*!******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/pow2/index.js ***! - \******************************************************************/ +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/math/pow2/index.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27615,9 +24669,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/random-data-generator/RandomDataGenerator.js": -/*!*************************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! - \*************************************************************************************************/ +/*!********************************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -28130,9 +25184,9 @@ module.exports = RandomDataGenerator; /***/ }), /***/ "../../../src/math/snap/SnapCeil.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/snap/SnapCeil.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/math/snap/SnapCeil.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28179,9 +25233,9 @@ module.exports = SnapCeil; /***/ }), /***/ "../../../src/math/snap/SnapFloor.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/snap/SnapFloor.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/math/snap/SnapFloor.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28228,9 +25282,9 @@ module.exports = SnapFloor; /***/ }), /***/ "../../../src/math/snap/SnapTo.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/snap/SnapTo.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/math/snap/SnapTo.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28276,9 +25330,9 @@ module.exports = SnapTo; /***/ }), /***/ "../../../src/math/snap/index.js": -/*!******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/math/snap/index.js ***! - \******************************************************************/ +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/math/snap/index.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -28304,9 +25358,9 @@ module.exports = { /***/ }), /***/ "../../../src/plugins/BasePlugin.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/plugins/BasePlugin.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/plugins/BasePlugin.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -28439,9 +25493,9 @@ module.exports = BasePlugin; /***/ }), /***/ "../../../src/plugins/ScenePlugin.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/plugins/ScenePlugin.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/plugins/ScenePlugin.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -28572,9 +25626,9 @@ module.exports = ScenePlugin; /***/ }), /***/ "../../../src/renderer/BlendModes.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/renderer/BlendModes.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/renderer/BlendModes.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28913,12 +25967,84 @@ module.exports = { }; +/***/ }), + +/***/ "../../../src/renderer/webgl/pipelines/const.js": +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/renderer/webgl/pipelines/const.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var PIPELINE_CONST = { + + /** + * The Bitmap Mask Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + BITMAPMASK_PIPELINE: 'BitmapMaskPipeline', + + /** + * The Light 2D Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + LIGHT_PIPELINE: 'Light2D', + + /** + * The Single Texture Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + SINGLE_PIPELINE: 'SinglePipeline', + + /** + * The Multi Texture Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + MULTI_PIPELINE: 'MultiPipeline', + + /** + * The Rope Pipeline. + * + * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE + * @type {string} + * @const + * @since 3.50.0 + */ + ROPE_PIPELINE: 'RopePipeline' + +}; + +module.exports = PIPELINE_CONST; + + /***/ }), /***/ "../../../src/scale/events/RESIZE_EVENT.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scale/events/RESIZE_EVENT.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/scale/events/RESIZE_EVENT.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28952,9 +26078,9 @@ module.exports = 'resize'; /***/ }), /***/ "../../../src/scene/events/ADDED_TO_SCENE_EVENT.js": -/*!************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js ***! - \************************************************************************************/ +/*!*******************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28983,9 +26109,9 @@ module.exports = 'addedtoscene'; /***/ }), /***/ "../../../src/scene/events/BOOT_EVENT.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/BOOT_EVENT.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/BOOT_EVENT.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29013,9 +26139,9 @@ module.exports = 'boot'; /***/ }), /***/ "../../../src/scene/events/CREATE_EVENT.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/CREATE_EVENT.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/CREATE_EVENT.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29047,9 +26173,9 @@ module.exports = 'create'; /***/ }), /***/ "../../../src/scene/events/DESTROY_EVENT.js": -/*!*****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/DESTROY_EVENT.js ***! - \*****************************************************************************/ +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/DESTROY_EVENT.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29079,9 +26205,9 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/scene/events/PAUSE_EVENT.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/PAUSE_EVENT.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/PAUSE_EVENT.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29111,9 +26237,9 @@ module.exports = 'pause'; /***/ }), /***/ "../../../src/scene/events/POST_UPDATE_EVENT.js": -/*!*********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! - \*********************************************************************************/ +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29153,9 +26279,9 @@ module.exports = 'postupdate'; /***/ }), /***/ "../../../src/scene/events/PRE_UPDATE_EVENT.js": -/*!********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! - \********************************************************************************/ +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29195,9 +26321,9 @@ module.exports = 'preupdate'; /***/ }), /***/ "../../../src/scene/events/READY_EVENT.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/READY_EVENT.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/READY_EVENT.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29228,9 +26354,9 @@ module.exports = 'ready'; /***/ }), /***/ "../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js": -/*!****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js ***! - \****************************************************************************************/ +/*!***********************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29259,9 +26385,9 @@ module.exports = 'removedfromscene'; /***/ }), /***/ "../../../src/scene/events/RENDER_EVENT.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/RENDER_EVENT.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/RENDER_EVENT.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29300,9 +26426,9 @@ module.exports = 'render'; /***/ }), /***/ "../../../src/scene/events/RESUME_EVENT.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/RESUME_EVENT.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/RESUME_EVENT.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29332,9 +26458,9 @@ module.exports = 'resume'; /***/ }), /***/ "../../../src/scene/events/SHUTDOWN_EVENT.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29367,9 +26493,9 @@ module.exports = 'shutdown'; /***/ }), /***/ "../../../src/scene/events/SLEEP_EVENT.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/SLEEP_EVENT.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/SLEEP_EVENT.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29399,9 +26525,9 @@ module.exports = 'sleep'; /***/ }), /***/ "../../../src/scene/events/START_EVENT.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/START_EVENT.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/START_EVENT.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29429,9 +26555,9 @@ module.exports = 'start'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js": -/*!*****************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! - \*****************************************************************************************/ +/*!************************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29470,9 +26596,9 @@ module.exports = 'transitioncomplete'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_INIT_EVENT.js": -/*!*************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! - \*************************************************************************************/ +/*!********************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29512,9 +26638,9 @@ module.exports = 'transitioninit'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_OUT_EVENT.js": -/*!************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! - \************************************************************************************/ +/*!*******************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29551,9 +26677,9 @@ module.exports = 'transitionout'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_START_EVENT.js": -/*!**************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! - \**************************************************************************************/ +/*!*********************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29596,9 +26722,9 @@ module.exports = 'transitionstart'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_WAKE_EVENT.js": -/*!*************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! - \*************************************************************************************/ +/*!********************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29636,9 +26762,9 @@ module.exports = 'transitionwake'; /***/ }), /***/ "../../../src/scene/events/UPDATE_EVENT.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/UPDATE_EVENT.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/UPDATE_EVENT.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29678,9 +26804,9 @@ module.exports = 'update'; /***/ }), /***/ "../../../src/scene/events/WAKE_EVENT.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/WAKE_EVENT.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/WAKE_EVENT.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29710,9 +26836,9 @@ module.exports = 'wake'; /***/ }), /***/ "../../../src/scene/events/index.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/index.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/index.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -29756,9 +26882,9 @@ module.exports = { /***/ }), /***/ "../../../src/tweens/builders/GetBoolean.js": -/*!*****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/tweens/builders/GetBoolean.js ***! - \*****************************************************************************/ +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/tweens/builders/GetBoolean.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29802,9 +26928,9 @@ module.exports = GetBoolean; /***/ }), /***/ "../../../src/tweens/tween/const.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/tweens/tween/const.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/tweens/tween/const.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29979,9 +27105,9 @@ module.exports = TWEEN_CONST; /***/ }), /***/ "../../../src/utils/Class.js": -/*!**************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/Class.js ***! - \**************************************************************/ +/*!*********************************************!*\ + !*** D:/wamp/www/phaser/src/utils/Class.js ***! + \*********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30238,9 +27364,9 @@ module.exports = Class; /***/ }), /***/ "../../../src/utils/NOOP.js": -/*!*************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/NOOP.js ***! - \*************************************************************/ +/*!********************************************!*\ + !*** D:/wamp/www/phaser/src/utils/NOOP.js ***! + \********************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30270,9 +27396,9 @@ module.exports = NOOP; /***/ }), /***/ "../../../src/utils/array/Add.js": -/*!******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Add.js ***! - \******************************************************************/ +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Add.js ***! + \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30392,9 +27518,9 @@ module.exports = Add; /***/ }), /***/ "../../../src/utils/array/AddAt.js": -/*!********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/AddAt.js ***! - \********************************************************************/ +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/AddAt.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30519,9 +27645,9 @@ module.exports = AddAt; /***/ }), /***/ "../../../src/utils/array/BringToTop.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/BringToTop.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/BringToTop.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30562,9 +27688,9 @@ module.exports = BringToTop; /***/ }), /***/ "../../../src/utils/array/CountAllMatching.js": -/*!*******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/CountAllMatching.js ***! - \*******************************************************************************/ +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/CountAllMatching.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -30619,9 +27745,9 @@ module.exports = CountAllMatching; /***/ }), /***/ "../../../src/utils/array/Each.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Each.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Each.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30670,9 +27796,9 @@ module.exports = Each; /***/ }), /***/ "../../../src/utils/array/EachInRange.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/EachInRange.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/EachInRange.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -30731,9 +27857,9 @@ module.exports = EachInRange; /***/ }), /***/ "../../../src/utils/array/FindClosestInSorted.js": -/*!**********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/FindClosestInSorted.js ***! - \**********************************************************************************/ +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/FindClosestInSorted.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30820,9 +27946,9 @@ module.exports = FindClosestInSorted; /***/ }), /***/ "../../../src/utils/array/GetAll.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/GetAll.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/GetAll.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -30887,9 +28013,9 @@ module.exports = GetAll; /***/ }), /***/ "../../../src/utils/array/GetFirst.js": -/*!***********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/GetFirst.js ***! - \***********************************************************************/ +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/GetFirst.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -30951,9 +28077,9 @@ module.exports = GetFirst; /***/ }), /***/ "../../../src/utils/array/GetRandom.js": -/*!************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/GetRandom.js ***! - \************************************************************************/ +/*!*******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/GetRandom.js ***! + \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30991,9 +28117,9 @@ module.exports = GetRandom; /***/ }), /***/ "../../../src/utils/array/MoveDown.js": -/*!***********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/MoveDown.js ***! - \***********************************************************************/ +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/MoveDown.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31038,9 +28164,9 @@ module.exports = MoveDown; /***/ }), /***/ "../../../src/utils/array/MoveTo.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/MoveTo.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/MoveTo.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31090,9 +28216,9 @@ module.exports = MoveTo; /***/ }), /***/ "../../../src/utils/array/MoveUp.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/MoveUp.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/MoveUp.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31137,9 +28263,9 @@ module.exports = MoveUp; /***/ }), /***/ "../../../src/utils/array/NumberArray.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArray.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/NumberArray.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31153,16 +28279,17 @@ module.exports = MoveUp; * Create an array representing the range of numbers (usually integers), between, and inclusive of, * the given `start` and `end` arguments. For example: * - * `var array = numberArray(2, 4); // array = [2, 3, 4]` - * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` + * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]` + * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` + * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]` * - * This is equivalent to `numberArrayStep(start, end, 1)`. + * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`. * * You can optionally provide a prefix and / or suffix string. If given the array will contain * strings, not integers. For example: * - * `var array = numberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` - * `var array = numberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` + * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` + * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` * * @function Phaser.Utils.Array.NumberArray * @since 3.0.0 @@ -31178,22 +28305,50 @@ var NumberArray = function (start, end, prefix, suffix) { var result = []; - for (var i = start; i <= end; i++) + var i; + var asString = false; + + if (prefix || suffix) { - if (prefix || suffix) + asString = true; + + if (!prefix) { - var key = (prefix) ? prefix + i.toString() : i.toString(); - - if (suffix) - { - key = key.concat(suffix); - } - - result.push(key); + prefix = ''; } - else + + if (!suffix) { - result.push(i); + suffix = ''; + } + } + + if (end < start) + { + for (i = start; i >= end; i--) + { + if (asString) + { + result.push(prefix + i.toString() + suffix); + } + else + { + result.push(i); + } + } + } + else + { + for (i = start; i <= end; i++) + { + if (asString) + { + result.push(prefix + i.toString() + suffix); + } + else + { + result.push(i); + } } } @@ -31206,9 +28361,9 @@ module.exports = NumberArray; /***/ }), /***/ "../../../src/utils/array/NumberArrayStep.js": -/*!******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArrayStep.js ***! - \******************************************************************************/ +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/NumberArrayStep.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31288,9 +28443,9 @@ module.exports = NumberArrayStep; /***/ }), /***/ "../../../src/utils/array/QuickSelect.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/QuickSelect.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/QuickSelect.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31415,9 +28570,9 @@ module.exports = QuickSelect; /***/ }), /***/ "../../../src/utils/array/Range.js": -/*!********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Range.js ***! - \********************************************************************/ +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Range.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31558,9 +28713,9 @@ module.exports = Range; /***/ }), /***/ "../../../src/utils/array/Remove.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Remove.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Remove.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31654,9 +28809,9 @@ module.exports = Remove; /***/ }), /***/ "../../../src/utils/array/RemoveAt.js": -/*!***********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveAt.js ***! - \***********************************************************************/ +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/RemoveAt.js ***! + \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31710,9 +28865,9 @@ module.exports = RemoveAt; /***/ }), /***/ "../../../src/utils/array/RemoveBetween.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveBetween.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/RemoveBetween.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31778,9 +28933,9 @@ module.exports = RemoveBetween; /***/ }), /***/ "../../../src/utils/array/RemoveRandomElement.js": -/*!**********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveRandomElement.js ***! - \**********************************************************************************/ +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/RemoveRandomElement.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31821,9 +28976,9 @@ module.exports = RemoveRandomElement; /***/ }), /***/ "../../../src/utils/array/Replace.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Replace.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Replace.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31870,9 +29025,9 @@ module.exports = Replace; /***/ }), /***/ "../../../src/utils/array/RotateLeft.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/RotateLeft.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/RotateLeft.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31915,9 +29070,9 @@ module.exports = RotateLeft; /***/ }), /***/ "../../../src/utils/array/RotateRight.js": -/*!**************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/RotateRight.js ***! - \**************************************************************************/ +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/RotateRight.js ***! + \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31960,9 +29115,9 @@ module.exports = RotateRight; /***/ }), /***/ "../../../src/utils/array/SafeRange.js": -/*!************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/SafeRange.js ***! - \************************************************************************/ +/*!*******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/SafeRange.js ***! + \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32014,9 +29169,9 @@ module.exports = SafeRange; /***/ }), /***/ "../../../src/utils/array/SendToBack.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/SendToBack.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/SendToBack.js ***! + \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32057,9 +29212,9 @@ module.exports = SendToBack; /***/ }), /***/ "../../../src/utils/array/SetAll.js": -/*!*********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/SetAll.js ***! - \*********************************************************************/ +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/SetAll.js ***! + \****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32117,9 +29272,9 @@ module.exports = SetAll; /***/ }), /***/ "../../../src/utils/array/Shuffle.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Shuffle.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Shuffle.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32160,12 +29315,55 @@ var Shuffle = function (array) module.exports = Shuffle; +/***/ }), + +/***/ "../../../src/utils/array/SortByDigits.js": +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/SortByDigits.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes the given array and runs a numeric sort on it, ignoring any non-digits that + * may be in the entries. + * + * You should only run this on arrays containing strings. + * + * @function Phaser.Utils.Array.SortByDigits + * @since 3.50.0 + * + * @param {string[]} array - The input array of strings. + * + * @return {string[]} The sorted input array. + */ +var SortByDigits = function (array) +{ + var re = /\D/g; + + array.sort(function (a, b) + { + return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10)); + }); + + return array; +}; + +module.exports = SortByDigits; + + /***/ }), /***/ "../../../src/utils/array/SpliceOne.js": -/*!************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/SpliceOne.js ***! - \************************************************************************/ +/*!*******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/SpliceOne.js ***! + \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32214,159 +29412,190 @@ module.exports = SpliceOne; /***/ }), /***/ "../../../src/utils/array/StableSort.js": -/*!*************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/StableSort.js ***! - \*************************************************************************/ +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/StableSort.js ***! + \********************************************************/ /*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { /** * @author Richard Davey + * @author Angry Bytes (and contributors) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -//! stable.js 0.1.6, https://github.com/Two-Screen/stable -//! © 2017 Angry Bytes and contributors. MIT licensed. +/** + * The comparator function. + * + * @ignore + * + * @param {*} a - The first item to test. + * @param {*} b - The second itemt to test. + * + * @return {boolean} True if they localCompare, otherwise false. + */ +function Compare (a, b) +{ + return String(a).localeCompare(b); +} /** - * @namespace Phaser.Utils.Array.StableSortFunctions + * Process the array contents. + * + * @ignore + * + * @param {array} array - The array to process. + * @param {function} compare - The comparison function. + * + * @return {array} - The processed array. */ - -(function() { - - /** - * A stable array sort, because `Array#sort()` is not guaranteed stable. - * This is an implementation of merge sort, without recursion. - * - * @function Phaser.Utils.Array.StableSort - * @since 3.0.0 - * - * @param {array} arr - The input array to be sorted. - * @param {function} comp - The comparison handler. - * - * @return {array} The sorted result. - */ -var stable = function(arr, comp) { - return exec(arr.slice(), comp); -}; - - /** - * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes. - * - * @function Phaser.Utils.Array.StableSortFunctions.inplace - * @memberof Phaser.Utils.Array.StableSortFunctions - * @since 3.0.0 - * - * @param {array} arr - The input array. - * @param {function} comp - The comparison handler. - * - * @return {array} The sorted array. - */ -stable.inplace = function(arr, comp) { - var result = exec(arr, comp); - - // This simply copies back if the result isn't in the original array, - // which happens on an odd number of passes. - if (result !== arr) { - pass(result, null, arr.length, arr); - } - - return arr; -}; - -// Execute the sort using the input array and a second buffer as work space. -// Returns one of those two, containing the final result. -function exec(arr, comp) { - if (typeof(comp) !== 'function') { - comp = function(a, b) { - return String(a).localeCompare(b); - }; - } - +function Process (array, compare) +{ // Short-circuit when there's nothing to sort. - var len = arr.length; - if (len <= 1) { - return arr; + var len = array.length; + + if (len <= 1) + { + return array; } // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. // Chunks are the size of the left or right hand in merge sort. // Stop when the left-hand covers all of the array. var buffer = new Array(len); - for (var chk = 1; chk < len; chk *= 2) { - pass(arr, comp, chk, buffer); - var tmp = arr; - arr = buffer; + for (var chk = 1; chk < len; chk *= 2) + { + RunPass(array, compare, chk, buffer); + + var tmp = array; + + array = buffer; + buffer = tmp; } - return arr; + return array; } -// Run a single pass with the given chunk size. -var pass = function(arr, comp, chk, result) { +/** + * Run a single pass with the given chunk size. + * + * @ignore + * + * @param {array} arr - The array to run the pass on. + * @param {function} comp - The comparison function. + * @param {number} chk - The number of iterations. + * @param {array} result - The array to store the result in. + */ +function RunPass (arr, comp, chk, result) +{ var len = arr.length; var i = 0; + // Step size / double chunk size. var dbl = chk * 2; + // Bounds of the left and right chunks. var l, r, e; + // Iterators over the left and right chunk. var li, ri; // Iterate over pairs of chunks. - for (l = 0; l < len; l += dbl) { + for (l = 0; l < len; l += dbl) + { r = l + chk; e = r + chk; - if (r > len) r = len; - if (e > len) e = len; + + if (r > len) + { + r = len; + } + + if (e > len) + { + e = len; + } // Iterate both chunks in parallel. li = l; ri = r; - while (true) { + + while (true) + { // Compare the chunks. - if (li < r && ri < e) { + if (li < r && ri < e) + { // This works for a regular `sort()` compatible comparator, // but also for a simple comparator like: `a > b` - if (comp(arr[li], arr[ri]) <= 0) { + if (comp(arr[li], arr[ri]) <= 0) + { result[i++] = arr[li++]; } - else { + else + { result[i++] = arr[ri++]; } } - // Nothing to compare, just flush what's left. - else if (li < r) { + else if (li < r) + { + // Nothing to compare, just flush what's left. result[i++] = arr[li++]; } - else if (ri < e) { + else if (ri < e) + { result[i++] = arr[ri++]; } - // Both iterators are at the chunk ends. - else { + else + { + // Both iterators are at the chunk ends. break; } } } +} + +/** + * An in-place stable array sort, because `Array#sort()` is not guaranteed stable. + * + * This is an implementation of merge sort, without recursion. + * + * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable + * + * @function Phaser.Utils.Array.StableSort + * @since 3.0.0 + * + * @param {array} array - The input array to be sorted. + * @param {function} [compare] - The comparison function. + * + * @return {array} The sorted result. + */ +var StableSort = function (array, compare) +{ + if (compare === undefined) { compare = Compare; } + + var result = Process(array, compare); + + // This simply copies back if the result isn't in the original array, which happens on an odd number of passes. + if (result !== array) + { + RunPass(result, null, array.length, array); + } + + return array; }; -// Export using CommonJS or to the window. -if (true) { - module.exports = stable; -} -else {} +module.exports = StableSort; -})(); /***/ }), /***/ "../../../src/utils/array/Swap.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Swap.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Swap.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32417,9 +29646,9 @@ module.exports = Swap; /***/ }), /***/ "../../../src/utils/array/index.js": -/*!********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/index.js ***! - \********************************************************************/ +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/index.js ***! + \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32465,6 +29694,7 @@ module.exports = { SendToBack: __webpack_require__(/*! ./SendToBack */ "../../../src/utils/array/SendToBack.js"), SetAll: __webpack_require__(/*! ./SetAll */ "../../../src/utils/array/SetAll.js"), Shuffle: __webpack_require__(/*! ./Shuffle */ "../../../src/utils/array/Shuffle.js"), + SortByDigits: __webpack_require__(/*! ./SortByDigits */ "../../../src/utils/array/SortByDigits.js"), SpliceOne: __webpack_require__(/*! ./SpliceOne */ "../../../src/utils/array/SpliceOne.js"), StableSort: __webpack_require__(/*! ./StableSort */ "../../../src/utils/array/StableSort.js"), Swap: __webpack_require__(/*! ./Swap */ "../../../src/utils/array/Swap.js") @@ -32475,9 +29705,9 @@ module.exports = { /***/ }), /***/ "../../../src/utils/array/matrix/CheckMatrix.js": -/*!*********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/CheckMatrix.js ***! - \*********************************************************************************/ +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/CheckMatrix.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32541,9 +29771,9 @@ module.exports = CheckMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/MatrixToString.js": -/*!************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/MatrixToString.js ***! - \************************************************************************************/ +/*!*******************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/MatrixToString.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32627,9 +29857,9 @@ module.exports = MatrixToString; /***/ }), /***/ "../../../src/utils/array/matrix/ReverseColumns.js": -/*!************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseColumns.js ***! - \************************************************************************************/ +/*!*******************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/ReverseColumns.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32663,9 +29893,9 @@ module.exports = ReverseColumns; /***/ }), /***/ "../../../src/utils/array/matrix/ReverseRows.js": -/*!*********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseRows.js ***! - \*********************************************************************************/ +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/ReverseRows.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32704,9 +29934,9 @@ module.exports = ReverseRows; /***/ }), /***/ "../../../src/utils/array/matrix/Rotate180.js": -/*!*******************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/Rotate180.js ***! - \*******************************************************************************/ +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/Rotate180.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32742,9 +29972,9 @@ module.exports = Rotate180; /***/ }), /***/ "../../../src/utils/array/matrix/RotateLeft.js": -/*!********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateLeft.js ***! - \********************************************************************************/ +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateLeft.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32780,9 +30010,9 @@ module.exports = RotateLeft; /***/ }), /***/ "../../../src/utils/array/matrix/RotateMatrix.js": -/*!**********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateMatrix.js ***! - \**********************************************************************************/ +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateMatrix.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32857,9 +30087,9 @@ module.exports = RotateMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/RotateRight.js": -/*!*********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateRight.js ***! - \*********************************************************************************/ +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateRight.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32895,9 +30125,9 @@ module.exports = RotateRight; /***/ }), /***/ "../../../src/utils/array/matrix/TransposeMatrix.js": -/*!*************************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/TransposeMatrix.js ***! - \*************************************************************************************/ +/*!********************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/TransposeMatrix.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32948,9 +30178,9 @@ module.exports = TransposeMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/index.js": -/*!***************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/index.js ***! - \***************************************************************************/ +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/index.js ***! + \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32982,9 +30212,9 @@ module.exports = { /***/ }), /***/ "../../../src/utils/object/Extend.js": -/*!**********************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/object/Extend.js ***! - \**********************************************************************/ +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/object/Extend.js ***! + \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -33088,9 +30318,9 @@ module.exports = Extend; /***/ }), /***/ "../../../src/utils/object/GetAdvancedValue.js": -/*!********************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/object/GetAdvancedValue.js ***! - \********************************************************************************/ +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/object/GetAdvancedValue.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -33180,9 +30410,9 @@ module.exports = GetAdvancedValue; /***/ }), /***/ "../../../src/utils/object/GetFastValue.js": -/*!****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/object/GetFastValue.js ***! - \****************************************************************************/ +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/object/GetFastValue.js ***! + \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -33228,9 +30458,9 @@ module.exports = GetFastValue; /***/ }), /***/ "../../../src/utils/object/GetValue.js": -/*!************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/object/GetValue.js ***! - \************************************************************************/ +/*!*******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/object/GetValue.js ***! + \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -33304,9 +30534,9 @@ module.exports = GetValue; /***/ }), /***/ "../../../src/utils/object/IsPlainObject.js": -/*!*****************************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/object/IsPlainObject.js ***! - \*****************************************************************************/ +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/object/IsPlainObject.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -33365,9 +30595,9 @@ module.exports = IsPlainObject; /***/ }), /***/ "../../../src/utils/string/Pad.js": -/*!*******************************************************************!*\ - !*** /Users/rich/Documents/GitHub/phaser/src/utils/string/Pad.js ***! - \*******************************************************************/ +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/string/Pad.js ***! + \**************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -35221,7 +32451,7 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe { sceneRenderer.end(); - renderer.rebindPipeline(); + renderer.pipelines.rebind(); } return; @@ -35251,7 +32481,7 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe if (renderer.newType) { // flush + clear if this is a new type - renderer.clearPipeline(); + renderer.pipelines.clear(); sceneRenderer.begin(); } @@ -35346,7 +32576,7 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe sceneRenderer.end(); // And rebind the previous pipeline - renderer.rebindPipeline(); + renderer.pipelines.rebind(); } }; @@ -37351,7 +34581,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - renderer.rebindPipeline(); + renderer.pipelines.rebind(); } if (!renderer.finalType) @@ -37366,7 +34596,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent if (renderer.newType) { // flush + clear previous pipeline if this is a new type - renderer.clearPipeline(); + renderer.pipelines.clear(); } var camMatrix = renderer._tempMatrix1; @@ -37470,7 +34700,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent sceneRenderer.end(); // And rebind the previous pipeline - renderer.rebindPipeline(); + renderer.pipelines.rebind(); } }; diff --git a/plugins/spine/dist/SpinePluginDebug.js.map b/plugins/spine/dist/SpinePluginDebug.js.map index 7133a2884..ae726bd45 100644 --- a/plugins/spine/dist/SpinePluginDebug.js.map +++ b/plugins/spine/dist/SpinePluginDebug.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:////Users/rich/Documents/GitHub/phaser/node_modules/eventemitter3/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/Animation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/AnimationFrame.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ADD_ANIMATION_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/PAUSE_ALL_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/RESUME_ALL_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/BLUR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/BOOT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_LOST_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/FOCUS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/HIDDEN_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PAUSE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/POST_RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/POST_STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PRE_RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PRE_STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/READY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/RESUME_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/VISIBLE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/DataManager.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/color/GetColorFromValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/mask/BitmapMask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/mask/GeometryMask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/GameObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Animation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Crop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Depth.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Flip.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Mask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Origin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Size.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Texture.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Tint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Transform.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Visible.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/Container.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Length.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Line.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/point/Point.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Contains.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Union.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/File.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/FileTypesManager.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/GetURL.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/MultiFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/XHRLoader.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/XHRSettings.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Average.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Bernstein.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Between.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/CatmullRom.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/CeilTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Clamp.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/DegToRad.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Difference.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Factorial.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FloatBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FloorTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FromPercent.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/GetSpeed.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/IsEven.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/IsEvenStrict.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Linear.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Matrix3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Matrix4.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/MaxAdd.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/MinSub.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Percent.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Quaternion.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RadToDeg.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXYZ.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXYZW.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Rotate.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateAround.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateAroundDistance.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateVec3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RoundTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SmoothStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SmootherStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/ToXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/TransformXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector2.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector4.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Within.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Wrap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Between.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Normalize.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Reverse.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/RotateTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Wrap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistancePower.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/linear/Linear.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/linear/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Equal.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Floor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapCeil.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapFloor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/plugins/BasePlugin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/plugins/ScenePlugin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/renderer/BlendModes.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/rich/Documents/GitHub/phaser/src/tweens/tween/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/Class.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/NOOP.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Add.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/AddAt.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/BringToTop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Each.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/EachInRange.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetAll.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetFirst.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetRandom.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveDown.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveUp.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArray.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/QuickSelect.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Range.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Remove.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveAt.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Replace.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RotateLeft.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RotateRight.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SafeRange.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SendToBack.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SetAll.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Shuffle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SpliceOne.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/StableSort.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Swap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/Extend.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetFastValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/string/Pad.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-both.js"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAyD,OAAO;AAChE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,YAAY;AAC3B;;AAEA;AACA,2DAA2D;AAC3D,+DAA+D;AAC/D,mEAAmE;AACnE,uEAAuE;AACvE;AACA,0DAA0D,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2DAA2D,YAAY;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;AC/UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,iDAAe;AACnC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,yDAAU;AAC/B,0BAA0B,mBAAO,CAAC,2FAAoC;AACtE,YAAY,mBAAO,CAAC,mEAAkB;AACtC,eAAe,mBAAO,CAAC,uEAA0B;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,WAAW,OAAO;AAClB,WAAW,kCAAkC;AAC7C;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,kDAAkD;AACjE,eAAe,OAAO;AACtB;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B,gCAAgC;AAC7D,aAAa;AACb;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yBAAyB,mBAAmB;;AAE5C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC77BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2CAA2C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,QAAQ;AACnB,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,QAAQ;AACnB,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,mBAAmB,mBAAO,CAAC,oFAAuB;AAClD,wBAAwB,mBAAO,CAAC,8FAA4B;AAC5D,sBAAsB,mBAAO,CAAC,0FAA0B;AACxD,uBAAuB,mBAAO,CAAC,4FAA2B;AAC1D,qBAAqB,mBAAO,CAAC,wFAAyB;AACtD,eAAe,mBAAO,CAAC,4EAAmB;AAC1C,sBAAsB,mBAAO,CAAC,0FAA0B;AACxD,gBAAgB,mBAAO,CAAC,8EAAoB;AAC5C,+BAA+B,mBAAO,CAAC,4GAAmC;AAC1E,mCAAmC,mBAAO,CAAC,oHAAuC;AAClF,iCAAiC,mBAAO,CAAC,gHAAqC;AAC9E,kCAAkC,mBAAO,CAAC,kHAAsC;AAChF,gCAAgC,mBAAO,CAAC,8GAAoC;AAC5E,iCAAiC,mBAAO,CAAC,gHAAqC;AAC9E,6BAA6B,mBAAO,CAAC,wGAAiC;AACtE,8BAA8B,mBAAO,CAAC,0GAAkC;AACxE,4BAA4B,mBAAO,CAAC,sGAAgC;AACpE,6BAA6B,mBAAO,CAAC,wGAAiC;;AAEtE;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,4DAAc;AAChC,UAAU,mBAAO,CAAC,4DAAc;AAChC,kBAAkB,mBAAO,CAAC,4EAAsB;AAChD,sBAAsB,mBAAO,CAAC,oFAA0B;AACxD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,WAAW,mBAAO,CAAC,8DAAe;AAClC,YAAY,mBAAO,CAAC,gEAAgB;AACpC,WAAW,mBAAO,CAAC,8DAAe;AAClC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,eAAe,mBAAO,CAAC,sEAAmB;AAC1C,gBAAgB,mBAAO,CAAC,wEAAoB;AAC5C,cAAc,mBAAO,CAAC,oEAAkB;AACxC,WAAW,mBAAO,CAAC,8DAAe;AAClC,YAAY,mBAAO,CAAC,gEAAgB;AACpC,UAAU,mBAAO,CAAC,4DAAc;AAChC,aAAa,mBAAO,CAAC,kEAAiB;;AAEtC;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;;AAE/B;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2DAA2D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,sCAAsC,kBAAkB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5rBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4DAAmB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC9RA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,4BAA4B;AACvC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC,6BAA6B;;AAE9D;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC,WAAW,0CAA0C;AACrD;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,iBAAiB,WAAW,KAAK,SAAS;;AAE1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB,KAAK,gBAAgB;;AAExD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,iBAAiB,cAAc,KAAK,UAAU;;AAE9C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2DAA2D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,mCAAmC;AAClD,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC;AACxD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3tBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,wEAA4B;AACxD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,aAAa,mBAAO,CAAC,wEAAyB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA,sCAAsC,8BAA8B;;AAEpE;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,yCAAyC,sBAAsB;;AAE/D;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACpqCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sEAA2B;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,0CAA0C,uBAAuB;;AAEjE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AChWA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;;AAE5D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,qBAAqB;;AAE7D;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC5IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,SAAS;AACvC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,uDAAuD;AAClF;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,uGAAuG;AACtH;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uGAAuG,WAAW;AACjI,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,aAAa;AAChD,oCAAoC,aAAa;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,yCAAyC,gCAAgC;;AAEzE;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,oBAAoB;;AAEtD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACzMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,8FAAuC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACrUA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,gDAAgD;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,oCAAoC;AACtE,mCAAmC,sCAAsC;;AAEzE;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,QAAQ,mDAAmD;AAC3D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;;AAE3E;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E,yCAAyC,sCAAsC;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,sBAAsB,sCAAsC;;AAE5D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACxkBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,qDAAqD;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,kCAAkC,UAAU,cAAc;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACr/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,eAAe,mBAAO,CAAC,qEAAa;AACpC,qBAAqB,mBAAO,CAAC,iFAAmB;AAChD,aAAa,mBAAO,CAAC,iEAAW;;AAEhC;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,uBAAuB,mBAAO,CAAC,2DAAW;AAC1C,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,gCAAgC;AAC3C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,2BAA2B,qBAAqB;AAChD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,2CAA2C,wBAAwB;;AAEnE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC90CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,oDAAkB;AAC5C,mBAAmB,mBAAO,CAAC,oDAAkB;;AAE7C,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;;AAEpD;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,4BAA4B,UAAU;;AAEtC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,cAAc;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,sDAAY;AACnC,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,aAAa,mBAAO,CAAC,kDAAU;AAC/B,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,iBAAiB;AAC5B,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,4BAA4B,UAAU;;AAEtC;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,cAAc;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,sBAAsB;AACjC,WAAW,kBAAkB;AAC7B;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;;AAE/C;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,gBAAgB;;AAEnD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA,4BAA4B,uBAAuB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,+BAA+B;AAC1C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,4GAA4G;AAC5G;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACnOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,mEAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,sCAAsC;AACjD;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,8BAA8B,cAAc;AAC5C,6BAA6B,WAAW;AACxC,iCAAiC,eAAe;AAChD,gCAAgC,aAAa;AAC7C,wCAAwC,yBAAyB;;AAEjE;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO,CAAC,sEAAkB;AACxC,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,uBAAuB,mBAAO,CAAC,wFAA2B;AAC1D,qBAAqB,mBAAO,CAAC,oFAAyB;AACtD,eAAe,mBAAO,CAAC,wEAAmB;AAC1C,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,kBAAkB,mBAAO,CAAC,8EAAsB;AAChD,cAAc,mBAAO,CAAC,sEAAkB;AACxC,WAAW,mBAAO,CAAC,gEAAe;;AAElC;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,uDAAuD;AAClE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,+CAA+C;AAC1D;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uGAAuG;AAClH,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3QA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC/NA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;ACxKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,mDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;;;;;;;;;;;AC/6CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,eAAe;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC7vBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,+BAA+B,YAAY;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,8BAA8B;AACzC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,YAAY;AAC3C,kCAAkC,eAAe;;AAEjD;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,4BAA4B,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA,+BAA+B,wBAAwB;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;;AAEzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,6BAA6B,YAAY;;AAEzC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACjwBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACnyBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,sCAAsC;AACjF;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,gCAAgC;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4CAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,yDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0CAAS;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,0CAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;;AAExC;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;;AAErC;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;;AAExC;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;;AAEhC;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,2DAAU;;;;;;;;;;;;ACNnC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,8DAAW;;;;;;;;;;;;ACVpC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;;AAEtC;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,oDAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,8CAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;;AAEvD;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;;AAE1C;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC,qDAAqD;;AAEvF;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;AAEA,kDAAkD;AAClD,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wCAAwC;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,UAAU;AAClC;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA,yBAAyB,OAAO;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;;AAE1B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,mCAAmC,wCAAwC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,qDAAqD;AACpH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,4EAA4E,sDAAsD;AAClI;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,YAAY,mBAAO,CAAC,iEAAgB;AACpC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,cAAc,mBAAO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;;AAEhC;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gCAAgC,QAAQ;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;;AAEA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA,eAAe,sBAAsB;AACrC;AACA;AACA;;AAEA,eAAe,kBAAkB;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,4BAA4B,cAAc;AAC1C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;;AAEA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,iDAAiD;AACjD;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,4EAA8B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,4BAA4B,YAAY;AACxC,6BAA6B,UAAU;;AAEvC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,6BAA6B,UAAU;AACvC,8BAA8B,wBAAwB;AACtD,gCAAgC,0BAA0B;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;;AAEjC;AACA;AACA;;AAEA,wBAAwB,mBAAmB;AAC3C;AACA,4BAA4B,mBAAmB;AAC/C;AACA,2BAA2B,SAAS;AACpC;AACA,0BAA0B,6BAA6B;AACvD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,aAAa;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,YAAY;AACvB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;AAC1D,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA,WAAW,IAAI;AACf;AACA,YAAY,IAAI;AAChB;AACA;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,IAA8B;AAClC;AACA;AACA,KAAK,EAEJ;;AAED,CAAC,I;;;;;;;;;;;AC7ID;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,0DAAU;;AAE9B,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB,WAAW,gBAAgB;AAC3B;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,kCAAkC,gBAAgB;;AAElD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,mBAAmB,oBAAoB;AACvC;AACA;;AAEA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,mEAAiB;;AAE7C,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY,OAAO;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,8CAA8C,aAAa,qBAAqB;AAChF;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;AACrC,4BAA4B,WAAW;AACvC,4BAA4B,SAAS;;AAErC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;;AAElE;AACA,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB,cAAc,gBAAgB;AAC9B,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,iDAAiD;AAC5D,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,oBAAoB;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,qBAAqB;AACpD;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,uBAAuB;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sCAAsC,uFAAuF;;AAE7H;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,uCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qGAAqG;AACpH,eAAe,OAAO;AACtB,eAAe,gBAAgB;AAC/B,eAAe,QAAQ;AACvB,eAAe,sCAAsC;AACrD,eAAe,sCAAsC;AACrD;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,eAAe;AAC9B,eAAe,WAAW;AAC1B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;;;;;;;;;;;;ACvrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,iFAA+B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,YAAY,mBAAO,CAAC,8DAA4B;AAChD,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;;AAElC;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,kBAAkB;;AAEpD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,kCAAkC,6BAA6B;AAC/D,mCAAmC,+BAA+B;AAClE,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,2BAA2B;AAClD;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,4CAA4C,yBAAyB;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qCAAqC,cAAc;AACnD,qCAAqC,gBAAgB;;AAErD;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACjjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxKA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD;AACxD;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,OAAO;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,OAAO;AACxE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,yBAAyB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2DAA2D,0BAA0B;AACrF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D,mCAAmC,WAAW;AAC9C,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mCAAmC,cAAc;AACjD,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,gCAAgC,0BAA0B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0BAA0B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,OAAO;AAChG;AACA;AACA;AACA,uDAAuD,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,kEAAkE;AAClE,qDAAqD;AACrD;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qEAAqE;AAC1E,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D,2DAA2D,8CAA8C,EAAE;AAC3G;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF,wEAAwE;AACxE,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,OAAO;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,wBAAwB;AAChF,sDAAsD,sDAAsD;AAC5G,sDAAsD,qDAAqD;AAC3G;AACA;AACA;AACA;AACA,sDAAsD,sBAAsB;AAC5E,qDAAqD,4BAA4B;AACjF,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA,qDAAqD,qBAAqB;AAC1E;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS,oFAAoF;AAC7F,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,yDAAyD;AAClE,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E,4DAA4D,0BAA0B;AACtF,8DAA8D,4BAA4B;AAC1F,kEAAkE,sBAAsB;AACxF,8DAA8D,sBAAsB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8CAA8C,kDAAkD,iDAAiD,+BAA+B,mCAAmC,0BAA0B,2CAA2C,mDAAmD,8EAA8E,WAAW;AAC/e,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,2EAA2E,8CAA8C,+CAA+C,kDAAkD,iDAAiD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,2CAA2C,2CAA2C,mDAAmD,8EAA8E,WAAW;AACvmB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,2EAA2E,8CAA8C,iDAAiD,+BAA+B,0BAA0B,2CAA2C,8EAA8E,WAAW;AACvW,iHAAiH,2FAA2F,0BAA0B,mCAAmC,WAAW;AACpR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qEAAqE,OAAO;AAC5E;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;;AAEA,CAAC","file":"SpinePluginDebug.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./SpinePlugin.js\");\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../math/Clamp');\nvar Class = require('../utils/Class');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\nvar FindClosestInSorted = require('../utils/array/FindClosestInSorted');\nvar Frame = require('./AnimationFrame');\nvar GetValue = require('../utils/object/GetValue');\n\n/**\n * @classdesc\n * A Frame based Animation.\n *\n * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects.\n *\n * The Animation Manager creates these. Game Objects don't own an instance of these directly.\n * Game Objects have the Animation Component, which are like playheads to global Animations (these objects)\n * So multiple Game Objects can have playheads all pointing to this one Animation instance.\n *\n * @class Animation\n * @memberof Phaser.Animations\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager\n * @param {string} key - The unique identifying string for this animation.\n * @param {Phaser.Types.Animations.Animation} config - The Animation configuration.\n */\nvar Animation = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function Animation (manager, key, config)\n {\n EventEmitter.call(this);\n\n /**\n * A reference to the global Animation Manager.\n *\n * @name Phaser.Animations.Animation#manager\n * @type {Phaser.Animations.AnimationManager}\n * @since 3.0.0\n */\n this.manager = manager;\n\n /**\n * The unique identifying string for this animation.\n *\n * @name Phaser.Animations.Animation#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = key;\n\n /**\n * A frame based animation (as opposed to a bone based animation)\n *\n * @name Phaser.Animations.Animation#type\n * @type {string}\n * @default frame\n * @since 3.0.0\n */\n this.type = 'frame';\n\n /**\n * Extract all the frame data into the frames array.\n *\n * @name Phaser.Animations.Animation#frames\n * @type {Phaser.Animations.AnimationFrame[]}\n * @since 3.0.0\n */\n this.frames = this.getFrames(\n manager.textureManager,\n GetValue(config, 'frames', []),\n GetValue(config, 'defaultTextureKey', null)\n );\n\n /**\n * The frame rate of playback in frames per second (default 24 if duration is null)\n *\n * @name Phaser.Animations.Animation#frameRate\n * @type {integer}\n * @default 24\n * @since 3.0.0\n */\n this.frameRate = GetValue(config, 'frameRate', null);\n\n /**\n * How long the animation should play for, in milliseconds.\n * If the `frameRate` property has been set then it overrides this value,\n * otherwise the `frameRate` is derived from `duration`.\n *\n * @name Phaser.Animations.Animation#duration\n * @type {integer}\n * @since 3.0.0\n */\n this.duration = GetValue(config, 'duration', null);\n\n if (this.duration === null && this.frameRate === null)\n {\n // No duration or frameRate given, use default frameRate of 24fps\n this.frameRate = 24;\n this.duration = (this.frameRate / this.frames.length) * 1000;\n }\n else if (this.duration && this.frameRate === null)\n {\n // Duration given but no frameRate, so set the frameRate based on duration\n // I.e. 12 frames in the animation, duration = 4000 ms\n // So frameRate is 12 / (4000 / 1000) = 3 fps\n this.frameRate = this.frames.length / (this.duration / 1000);\n }\n else\n {\n // frameRate given, derive duration from it (even if duration also specified)\n // I.e. 15 frames in the animation, frameRate = 30 fps\n // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms)\n this.duration = (this.frames.length / this.frameRate) * 1000;\n }\n\n /**\n * How many ms per frame, not including frame specific modifiers.\n *\n * @name Phaser.Animations.Animation#msPerFrame\n * @type {integer}\n * @since 3.0.0\n */\n this.msPerFrame = 1000 / this.frameRate;\n\n /**\n * Skip frames if the time lags, or always advanced anyway?\n *\n * @name Phaser.Animations.Animation#skipMissedFrames\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true);\n\n /**\n * The delay in ms before the playback will begin.\n *\n * @name Phaser.Animations.Animation#delay\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.delay = GetValue(config, 'delay', 0);\n\n /**\n * Number of times to repeat the animation. Set to -1 to repeat forever.\n *\n * @name Phaser.Animations.Animation#repeat\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.repeat = GetValue(config, 'repeat', 0);\n\n /**\n * The delay in ms before the a repeat play starts.\n *\n * @name Phaser.Animations.Animation#repeatDelay\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.repeatDelay = GetValue(config, 'repeatDelay', 0);\n\n /**\n * Should the animation yoyo (reverse back down to the start) before repeating?\n *\n * @name Phaser.Animations.Animation#yoyo\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.yoyo = GetValue(config, 'yoyo', false);\n\n /**\n * Should the GameObject's `visible` property be set to `true` when the animation starts to play?\n *\n * @name Phaser.Animations.Animation#showOnStart\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.showOnStart = GetValue(config, 'showOnStart', false);\n\n /**\n * Should the GameObject's `visible` property be set to `false` when the animation finishes?\n *\n * @name Phaser.Animations.Animation#hideOnComplete\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.hideOnComplete = GetValue(config, 'hideOnComplete', false);\n\n /**\n * Global pause. All Game Objects using this Animation instance are impacted by this property.\n *\n * @name Phaser.Animations.Animation#paused\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.paused = false;\n\n this.manager.on(Events.PAUSE_ALL, this.pause, this);\n this.manager.on(Events.RESUME_ALL, this.resume, this);\n },\n\n /**\n * Add frames to the end of the animation.\n *\n * @method Phaser.Animations.Animation#addFrame\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n *\n * @return {this} This Animation object.\n */\n addFrame: function (config)\n {\n return this.addFrameAt(this.frames.length, config);\n },\n\n /**\n * Add frame/s into the animation.\n *\n * @method Phaser.Animations.Animation#addFrameAt\n * @since 3.0.0\n *\n * @param {integer} index - The index to insert the frame at within the animation.\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n *\n * @return {this} This Animation object.\n */\n addFrameAt: function (index, config)\n {\n var newFrames = this.getFrames(this.manager.textureManager, config);\n\n if (newFrames.length > 0)\n {\n if (index === 0)\n {\n this.frames = newFrames.concat(this.frames);\n }\n else if (index === this.frames.length)\n {\n this.frames = this.frames.concat(newFrames);\n }\n else\n {\n var pre = this.frames.slice(0, index);\n var post = this.frames.slice(index);\n\n this.frames = pre.concat(newFrames, post);\n }\n\n this.updateFrameSequence();\n }\n\n return this;\n },\n\n /**\n * Check if the given frame index is valid.\n *\n * @method Phaser.Animations.Animation#checkFrame\n * @since 3.0.0\n *\n * @param {integer} index - The index to be checked.\n *\n * @return {boolean} `true` if the index is valid, otherwise `false`.\n */\n checkFrame: function (index)\n {\n return (index >= 0 && index < this.frames.length);\n },\n\n /**\n * Called internally when this Animation completes playback.\n * Optionally, hides the parent Game Object, then stops playback.\n *\n * @method Phaser.Animations.Animation#completeAnimation\n * @protected\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n completeAnimation: function (component)\n {\n if (this.hideOnComplete)\n {\n component.parent.visible = false;\n }\n\n component.stop();\n },\n\n /**\n * Called internally when this Animation first starts to play.\n * Sets the accumulator and nextTick properties.\n *\n * @method Phaser.Animations.Animation#getFirstTick\n * @protected\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total.\n */\n getFirstTick: function (component, includeDelay)\n {\n if (includeDelay === undefined) { includeDelay = true; }\n\n // When is the first update due?\n component.accumulator = 0;\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\n\n if (includeDelay)\n {\n component.nextTick += component._delay;\n }\n },\n\n /**\n * Returns the AnimationFrame at the provided index\n *\n * @method Phaser.Animations.Animation#getFrameAt\n * @protected\n * @since 3.0.0\n *\n * @param {integer} index - The index in the AnimationFrame array\n *\n * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence\n */\n getFrameAt: function (index)\n {\n return this.frames[index];\n },\n\n /**\n * Creates AnimationFrame instances based on the given frame data.\n *\n * @method Phaser.Animations.Animation#getFrames\n * @since 3.0.0\n *\n * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager.\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object.\n *\n * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances.\n */\n getFrames: function (textureManager, frames, defaultTextureKey)\n {\n var out = [];\n var prev;\n var animationFrame;\n var index = 1;\n var i;\n var textureKey;\n\n // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet\n if (typeof frames === 'string')\n {\n textureKey = frames;\n\n var texture = textureManager.get(textureKey);\n var frameKeys = texture.getFrameNames();\n\n frames = [];\n\n frameKeys.forEach(function (idx, value)\n {\n frames.push({ key: textureKey, frame: value });\n });\n }\n\n if (!Array.isArray(frames) || frames.length === 0)\n {\n return out;\n }\n\n for (i = 0; i < frames.length; i++)\n {\n var item = frames[i];\n\n var key = GetValue(item, 'key', defaultTextureKey);\n\n if (!key)\n {\n continue;\n }\n\n // Could be an integer or a string\n var frame = GetValue(item, 'frame', 0);\n\n // The actual texture frame\n var textureFrame = textureManager.getFrame(key, frame);\n\n animationFrame = new Frame(key, frame, index, textureFrame);\n\n animationFrame.duration = GetValue(item, 'duration', 0);\n\n animationFrame.isFirst = (!prev);\n\n // The previously created animationFrame\n if (prev)\n {\n prev.nextFrame = animationFrame;\n\n animationFrame.prevFrame = prev;\n }\n\n out.push(animationFrame);\n\n prev = animationFrame;\n\n index++;\n }\n\n if (out.length > 0)\n {\n animationFrame.isLast = true;\n\n // Link them end-to-end, so they loop\n animationFrame.nextFrame = out[0];\n\n out[0].prevFrame = animationFrame;\n\n // Generate the progress data\n\n var slice = 1 / (out.length - 1);\n\n for (i = 0; i < out.length; i++)\n {\n out[i].progress = i * slice;\n }\n }\n\n return out;\n },\n\n /**\n * Called internally. Sets the accumulator and nextTick values of the current Animation.\n *\n * @method Phaser.Animations.Animation#getNextTick\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n getNextTick: function (component)\n {\n // accumulator += delta * _timeScale\n // after a large delta surge (perf issue for example) we need to adjust for it here\n\n // When is the next update due?\n component.accumulator -= component.nextTick;\n\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\n },\n\n /**\n * Loads the Animation values into the Animation Component.\n *\n * @method Phaser.Animations.Animation#load\n * @private\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into.\n * @param {integer} startFrame - The start frame of the animation to load.\n */\n load: function (component, startFrame)\n {\n if (startFrame >= this.frames.length)\n {\n startFrame = 0;\n }\n\n if (component.currentAnim !== this)\n {\n component.currentAnim = this;\n\n component.frameRate = this.frameRate;\n component.duration = this.duration;\n component.msPerFrame = this.msPerFrame;\n component.skipMissedFrames = this.skipMissedFrames;\n\n component._delay = this.delay;\n component._repeat = this.repeat;\n component._repeatDelay = this.repeatDelay;\n component._yoyo = this.yoyo;\n }\n\n var frame = this.frames[startFrame];\n\n if (startFrame === 0 && !component.forward)\n {\n frame = this.getLastFrame();\n }\n\n component.updateFrame(frame);\n },\n\n /**\n * Returns the frame closest to the given progress value between 0 and 1.\n *\n * @method Phaser.Animations.Animation#getFrameByProgress\n * @since 3.4.0\n *\n * @param {number} value - A value between 0 and 1.\n *\n * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value.\n */\n getFrameByProgress: function (value)\n {\n value = Clamp(value, 0, 1);\n\n return FindClosestInSorted(value, this.frames, 'progress');\n },\n\n /**\n * Advance the animation frame.\n *\n * @method Phaser.Animations.Animation#nextFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\n */\n nextFrame: function (component)\n {\n var frame = component.currentFrame;\n\n // TODO: Add frame skip support\n\n if (frame.isLast)\n {\n // We're at the end of the animation\n\n // Yoyo? (happens before repeat)\n if (component._yoyo)\n {\n this.handleYoyoFrame(component, false);\n }\n else if (component.repeatCounter > 0)\n {\n // Repeat (happens before complete)\n\n if (component._reverse && component.forward)\n {\n component.forward = false;\n }\n else\n {\n this.repeatAnimation(component);\n }\n }\n else\n {\n this.completeAnimation(component);\n }\n }\n else\n {\n this.updateAndGetNextTick(component, frame.nextFrame);\n }\n },\n\n /**\n * Handle the yoyo functionality in nextFrame and previousFrame methods.\n *\n * @method Phaser.Animations.Animation#handleYoyoFrame\n * @private\n * @since 3.12.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\n * @param {boolean} isReverse - Is animation in reverse mode? (Default: false)\n */\n handleYoyoFrame: function (component, isReverse)\n {\n if (!isReverse) { isReverse = false; }\n\n if (component._reverse === !isReverse && component.repeatCounter > 0)\n {\n if (!component._repeatDelay || component.pendingRepeat)\n\n {\n component.forward = isReverse;\n }\n\n this.repeatAnimation(component);\n\n return;\n }\n\n if (component._reverse !== isReverse && component.repeatCounter === 0)\n {\n this.completeAnimation(component);\n\n return;\n }\n \n component.forward = isReverse;\n\n var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame;\n\n this.updateAndGetNextTick(component, frame);\n },\n\n /**\n * Returns the animation last frame.\n *\n * @method Phaser.Animations.Animation#getLastFrame\n * @since 3.12.0\n *\n * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame.\n */\n getLastFrame: function ()\n {\n return this.frames[this.frames.length - 1];\n },\n\n /**\n * Called internally when the Animation is playing backwards.\n * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly.\n *\n * @method Phaser.Animations.Animation#previousFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n previousFrame: function (component)\n {\n var frame = component.currentFrame;\n\n // TODO: Add frame skip support\n\n if (frame.isFirst)\n {\n // We're at the start of the animation\n\n if (component._yoyo)\n {\n this.handleYoyoFrame(component, true);\n }\n else if (component.repeatCounter > 0)\n {\n if (component._reverse && !component.forward)\n {\n component.currentFrame = this.getLastFrame();\n this.repeatAnimation(component);\n }\n else\n {\n // Repeat (happens before complete)\n component.forward = true;\n this.repeatAnimation(component);\n }\n }\n else\n {\n this.completeAnimation(component);\n }\n }\n else\n {\n this.updateAndGetNextTick(component, frame.prevFrame);\n }\n },\n\n /**\n * Update Frame and Wait next tick.\n *\n * @method Phaser.Animations.Animation#updateAndGetNextTick\n * @private\n * @since 3.12.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame.\n */\n updateAndGetNextTick: function (component, frame)\n {\n component.updateFrame(frame);\n\n this.getNextTick(component);\n },\n\n /**\n * Removes the given AnimationFrame from this Animation instance.\n * This is a global action. Any Game Object using this Animation will be impacted by this change.\n *\n * @method Phaser.Animations.Animation#removeFrame\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed.\n *\n * @return {this} This Animation object.\n */\n removeFrame: function (frame)\n {\n var index = this.frames.indexOf(frame);\n\n if (index !== -1)\n {\n this.removeFrameAt(index);\n }\n\n return this;\n },\n\n /**\n * Removes a frame from the AnimationFrame array at the provided index\n * and updates the animation accordingly.\n *\n * @method Phaser.Animations.Animation#removeFrameAt\n * @since 3.0.0\n *\n * @param {integer} index - The index in the AnimationFrame array\n *\n * @return {this} This Animation object.\n */\n removeFrameAt: function (index)\n {\n this.frames.splice(index, 1);\n\n this.updateFrameSequence();\n\n return this;\n },\n\n /**\n * Called internally during playback. Forces the animation to repeat, providing there are enough counts left\n * in the repeat counter.\n *\n * @method Phaser.Animations.Animation#repeatAnimation\n * @fires Phaser.Animations.Events#ANIMATION_REPEAT\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n repeatAnimation: function (component)\n {\n if (component._pendingStop === 2)\n {\n return this.completeAnimation(component);\n }\n\n if (component._repeatDelay > 0 && component.pendingRepeat === false)\n {\n component.pendingRepeat = true;\n component.accumulator -= component.nextTick;\n component.nextTick += component._repeatDelay;\n }\n else\n {\n component.repeatCounter--;\n\n component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']);\n\n if (component.isPlaying)\n {\n this.getNextTick(component);\n\n component.pendingRepeat = false;\n\n var frame = component.currentFrame;\n var parent = component.parent;\n\n this.emit(Events.ANIMATION_REPEAT, this, frame);\n\n parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent);\n\n parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent);\n }\n }\n },\n\n /**\n * Sets the texture frame the animation uses for rendering.\n *\n * @method Phaser.Animations.Animation#setFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n setFrame: function (component)\n {\n // Work out which frame should be set next on the child, and set it\n if (component.forward)\n {\n this.nextFrame(component);\n }\n else\n {\n this.previousFrame(component);\n }\n },\n\n /**\n * Converts the animation data to JSON.\n *\n * @method Phaser.Animations.Animation#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object.\n */\n toJSON: function ()\n {\n var output = {\n key: this.key,\n type: this.type,\n frames: [],\n frameRate: this.frameRate,\n duration: this.duration,\n skipMissedFrames: this.skipMissedFrames,\n delay: this.delay,\n repeat: this.repeat,\n repeatDelay: this.repeatDelay,\n yoyo: this.yoyo,\n showOnStart: this.showOnStart,\n hideOnComplete: this.hideOnComplete\n };\n\n this.frames.forEach(function (frame)\n {\n output.frames.push(frame.toJSON());\n });\n\n return output;\n },\n\n /**\n * Called internally whenever frames are added to, or removed from, this Animation.\n *\n * @method Phaser.Animations.Animation#updateFrameSequence\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n updateFrameSequence: function ()\n {\n var len = this.frames.length;\n var slice = 1 / (len - 1);\n\n var frame;\n\n for (var i = 0; i < len; i++)\n {\n frame = this.frames[i];\n\n frame.index = i + 1;\n frame.isFirst = false;\n frame.isLast = false;\n frame.progress = i * slice;\n\n if (i === 0)\n {\n frame.isFirst = true;\n\n if (len === 1)\n {\n frame.isLast = true;\n frame.nextFrame = frame;\n frame.prevFrame = frame;\n }\n else\n {\n frame.isLast = false;\n frame.prevFrame = this.frames[len - 1];\n frame.nextFrame = this.frames[i + 1];\n }\n }\n else if (i === len - 1 && len > 1)\n {\n frame.isLast = true;\n frame.prevFrame = this.frames[len - 2];\n frame.nextFrame = this.frames[0];\n }\n else if (len > 1)\n {\n frame.prevFrame = this.frames[i - 1];\n frame.nextFrame = this.frames[i + 1];\n }\n }\n\n return this;\n },\n\n /**\n * Pauses playback of this Animation. The paused state is set immediately.\n *\n * @method Phaser.Animations.Animation#pause\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n pause: function ()\n {\n this.paused = true;\n\n return this;\n },\n\n /**\n * Resumes playback of this Animation. The paused state is reset immediately.\n *\n * @method Phaser.Animations.Animation#resume\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n resume: function ()\n {\n this.paused = false;\n\n return this;\n },\n\n /**\n * Destroys this Animation instance. It will remove all event listeners,\n * remove this animation and its key from the global Animation Manager,\n * and then destroy all Animation Frames in turn.\n *\n * @method Phaser.Animations.Animation#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.removeAllListeners();\n\n this.manager.off(Events.PAUSE_ALL, this.pause, this);\n this.manager.off(Events.RESUME_ALL, this.resume, this);\n\n this.manager.remove(this.key);\n\n for (var i = 0; i < this.frames.length; i++)\n {\n this.frames[i].destroy();\n }\n\n this.frames = [];\n\n this.manager = null;\n }\n\n});\n\nmodule.exports = Animation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A single frame in an Animation sequence.\n *\n * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other\n * frames in the animation, and index data. It also has the ability to modify the animation timing.\n *\n * AnimationFrames are generated automatically by the Animation class.\n *\n * @class AnimationFrame\n * @memberof Phaser.Animations\n * @constructor\n * @since 3.0.0\n *\n * @param {string} textureKey - The key of the Texture this AnimationFrame uses.\n * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.\n * @param {integer} index - The index of this AnimationFrame within the Animation sequence.\n * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.\n */\nvar AnimationFrame = new Class({\n\n initialize:\n\n function AnimationFrame (textureKey, textureFrame, index, frame)\n {\n /**\n * The key of the Texture this AnimationFrame uses.\n *\n * @name Phaser.Animations.AnimationFrame#textureKey\n * @type {string}\n * @since 3.0.0\n */\n this.textureKey = textureKey;\n\n /**\n * The key of the Frame within the Texture that this AnimationFrame uses.\n *\n * @name Phaser.Animations.AnimationFrame#textureFrame\n * @type {(string|integer)}\n * @since 3.0.0\n */\n this.textureFrame = textureFrame;\n\n /**\n * The index of this AnimationFrame within the Animation sequence.\n *\n * @name Phaser.Animations.AnimationFrame#index\n * @type {integer}\n * @since 3.0.0\n */\n this.index = index;\n\n /**\n * A reference to the Texture Frame this AnimationFrame uses for rendering.\n *\n * @name Phaser.Animations.AnimationFrame#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n this.frame = frame;\n\n /**\n * Is this the first frame in an animation sequence?\n *\n * @name Phaser.Animations.AnimationFrame#isFirst\n * @type {boolean}\n * @default false\n * @readonly\n * @since 3.0.0\n */\n this.isFirst = false;\n\n /**\n * Is this the last frame in an animation sequence?\n *\n * @name Phaser.Animations.AnimationFrame#isLast\n * @type {boolean}\n * @default false\n * @readonly\n * @since 3.0.0\n */\n this.isLast = false;\n\n /**\n * A reference to the AnimationFrame that comes before this one in the animation, if any.\n *\n * @name Phaser.Animations.AnimationFrame#prevFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @readonly\n * @since 3.0.0\n */\n this.prevFrame = null;\n\n /**\n * A reference to the AnimationFrame that comes after this one in the animation, if any.\n *\n * @name Phaser.Animations.AnimationFrame#nextFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @readonly\n * @since 3.0.0\n */\n this.nextFrame = null;\n\n /**\n * Additional time (in ms) that this frame should appear for during playback.\n * The value is added onto the msPerFrame set by the animation.\n *\n * @name Phaser.Animations.AnimationFrame#duration\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.duration = 0;\n\n /**\n * What % through the animation does this frame come?\n * This value is generated when the animation is created and cached here.\n *\n * @name Phaser.Animations.AnimationFrame#progress\n * @type {number}\n * @default 0\n * @readonly\n * @since 3.0.0\n */\n this.progress = 0;\n },\n\n /**\n * Generates a JavaScript object suitable for converting to JSON.\n *\n * @method Phaser.Animations.AnimationFrame#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data.\n */\n toJSON: function ()\n {\n return {\n key: this.textureKey,\n frame: this.textureFrame,\n duration: this.duration\n };\n },\n\n /**\n * Destroys this object by removing references to external resources and callbacks.\n *\n * @method Phaser.Animations.AnimationFrame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.frame = undefined;\n }\n\n});\n\nmodule.exports = AnimationFrame;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Add Animation Event.\n * \n * This event is dispatched when a new animation is added to the global Animation Manager.\n * \n * This can happen either as a result of an animation instance being added to the Animation Manager,\n * or the Animation Manager creating a new animation directly.\n *\n * @event Phaser.Animations.Events#ADD_ANIMATION\n * @since 3.0.0\n * \n * @param {string} key - The key of the Animation that was added to the global Animation Manager.\n * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation.\n */\nmodule.exports = 'add';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Complete Event.\n * \n * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all complete the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Repeat Event.\n * \n * This event is dispatched when a currently playing animation repeats.\n * \n * The event is dispatched directly from the Animation object itself. Which means that listeners\n * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it.\n *\n * @event Phaser.Animations.Events#ANIMATION_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated.\n */\nmodule.exports = 'repeat';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Restart Event.\n * \n * This event is dispatched by an Animation instance when it restarts.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all restart the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'restart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Start Event.\n * \n * This event is dispatched by an Animation instance when it starts playing.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all play the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Pause All Animations Event.\n * \n * This event is dispatched when the global Animation Manager is told to pause.\n * \n * When this happens all current animations will stop updating, although it doesn't necessarily mean\n * that the game has paused as well.\n *\n * @event Phaser.Animations.Events#PAUSE_ALL\n * @since 3.0.0\n */\nmodule.exports = 'pauseall';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Remove Animation Event.\n * \n * This event is dispatched when an animation is removed from the global Animation Manager.\n *\n * @event Phaser.Animations.Events#REMOVE_ANIMATION\n * @since 3.0.0\n * \n * @param {string} key - The key of the Animation that was removed from the global Animation Manager.\n * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation.\n */\nmodule.exports = 'remove';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Resume All Animations Event.\n * \n * This event is dispatched when the global Animation Manager resumes, having been previously paused.\n * \n * When this happens all current animations will continue updating again.\n *\n * @event Phaser.Animations.Events#RESUME_ALL\n * @since 3.0.0\n */\nmodule.exports = 'resumeall';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Complete Event.\n * \n * This event is dispatched by a Sprite when an animation finishes playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'animationcomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Complete Event.\n * \n * This event is dispatched by a Sprite when a specific animation finishes playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'animationcomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Repeat Event.\n * \n * This event is dispatched by a Sprite when a specific animation repeats playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\n */\nmodule.exports = 'animationrepeat-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Restart Event.\n * \n * This event is dispatched by a Sprite when a specific animation restarts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'animationrestart-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Start Event.\n * \n * This event is dispatched by a Sprite when a specific animation starts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'animationstart-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Update Event.\n * \n * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame,\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\n * \n * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\n */\nmodule.exports = 'animationupdate-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Repeat Event.\n * \n * This event is dispatched by a Sprite when an animation repeats playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\n */\nmodule.exports = 'animationrepeat';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Restart Event.\n * \n * This event is dispatched by a Sprite when an animation restarts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrestart', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'animationrestart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Start Event.\n * \n * This event is dispatched by a Sprite when an animation starts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationstart', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'animationstart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Update Event.\n * \n * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame,\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\n * \n * Listen for it on the Sprite using `sprite.on('animationupdate', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\n */\nmodule.exports = 'animationupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Animations.Events\n */\n\nmodule.exports = {\n\n ADD_ANIMATION: require('./ADD_ANIMATION_EVENT'),\n ANIMATION_COMPLETE: require('./ANIMATION_COMPLETE_EVENT'),\n ANIMATION_REPEAT: require('./ANIMATION_REPEAT_EVENT'),\n ANIMATION_RESTART: require('./ANIMATION_RESTART_EVENT'),\n ANIMATION_START: require('./ANIMATION_START_EVENT'),\n PAUSE_ALL: require('./PAUSE_ALL_EVENT'),\n REMOVE_ANIMATION: require('./REMOVE_ANIMATION_EVENT'),\n RESUME_ALL: require('./RESUME_ALL_EVENT'),\n SPRITE_ANIMATION_COMPLETE: require('./SPRITE_ANIMATION_COMPLETE_EVENT'),\n SPRITE_ANIMATION_KEY_COMPLETE: require('./SPRITE_ANIMATION_KEY_COMPLETE_EVENT'),\n SPRITE_ANIMATION_KEY_REPEAT: require('./SPRITE_ANIMATION_KEY_REPEAT_EVENT'),\n SPRITE_ANIMATION_KEY_RESTART: require('./SPRITE_ANIMATION_KEY_RESTART_EVENT'),\n SPRITE_ANIMATION_KEY_START: require('./SPRITE_ANIMATION_KEY_START_EVENT'),\n SPRITE_ANIMATION_KEY_UPDATE: require('./SPRITE_ANIMATION_KEY_UPDATE_EVENT'),\n SPRITE_ANIMATION_REPEAT: require('./SPRITE_ANIMATION_REPEAT_EVENT'),\n SPRITE_ANIMATION_RESTART: require('./SPRITE_ANIMATION_RESTART_EVENT'),\n SPRITE_ANIMATION_START: require('./SPRITE_ANIMATION_START_EVENT'),\n SPRITE_ANIMATION_UPDATE: require('./SPRITE_ANIMATION_UPDATE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Blur Event.\n * \n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\n * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps\n * tab, or if they simply remove focus from the browser to another app.\n *\n * @event Phaser.Core.Events#BLUR\n * @since 3.0.0\n */\nmodule.exports = 'blur';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Boot Event.\n * \n * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.\n * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.\n *\n * @event Phaser.Core.Events#BOOT\n * @since 3.0.0\n */\nmodule.exports = 'boot';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Context Lost Event.\n * \n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.\n * \n * The partner event is `CONTEXT_RESTORED`.\n *\n * @event Phaser.Core.Events#CONTEXT_LOST\n * @since 3.19.0\n */\nmodule.exports = 'contextlost';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Context Restored Event.\n * \n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser.\n * \n * The partner event is `CONTEXT_LOST`.\n *\n * @event Phaser.Core.Events#CONTEXT_RESTORED\n * @since 3.19.0\n */\nmodule.exports = 'contextrestored';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Destroy Event.\n * \n * This event is dispatched when the game instance has been told to destroy itself.\n * Lots of internal systems listen to this event in order to clear themselves out.\n * Custom plugins and game code should also do the same.\n *\n * @event Phaser.Core.Events#DESTROY\n * @since 3.0.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Focus Event.\n * \n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\n * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.\n *\n * @event Phaser.Core.Events#FOCUS\n * @since 3.0.0\n */\nmodule.exports = 'focus';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Hidden Event.\n * \n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\n * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.\n * \n * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which\n * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something\n * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)\n *\n * @event Phaser.Core.Events#HIDDEN\n * @since 3.0.0\n */\nmodule.exports = 'hidden';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pause Event.\n * \n * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.\n *\n * @event Phaser.Core.Events#PAUSE\n * @since 3.0.0\n */\nmodule.exports = 'pause';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Post-Render Event.\n * \n * This event is dispatched right at the end of the render process.\n * \n * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.\n * Use it for any last minute post-processing before the next game step begins.\n *\n * @event Phaser.Core.Events#POST_RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\n */\nmodule.exports = 'postrender';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Post-Step Event.\n * \n * This event is dispatched after the Scene Manager has updated.\n * Hook into it from plugins or systems that need to do things before the render starts.\n *\n * @event Phaser.Core.Events#POST_STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'poststep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pre-Render Event.\n * \n * This event is dispatched immediately before any of the Scenes have started to render.\n * \n * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.\n *\n * @event Phaser.Core.Events#PRE_RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pre-Step Event.\n * \n * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.\n * Hook into it from plugins or systems that need to update before the Scene Manager does.\n *\n * @event Phaser.Core.Events#PRE_STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'prestep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Ready Event.\n * \n * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,\n * and all local systems are now able to start.\n *\n * @event Phaser.Core.Events#READY\n * @since 3.0.0\n */\nmodule.exports = 'ready';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Resume Event.\n * \n * This event is dispatched when the game loop leaves a paused state and resumes running.\n *\n * @event Phaser.Core.Events#RESUME\n * @since 3.0.0\n */\nmodule.exports = 'resume';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Step Event.\n * \n * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.\n * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.\n *\n * @event Phaser.Core.Events#STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'step';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Visible Event.\n * \n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\n * enters a visible state, previously having been hidden.\n * \n * Only browsers that support the Visibility API will cause this event to be emitted.\n *\n * @event Phaser.Core.Events#VISIBLE\n * @since 3.0.0\n */\nmodule.exports = 'visible';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Core.Events\n */\n\nmodule.exports = {\n\n BLUR: require('./BLUR_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CONTEXT_LOST: require('./CONTEXT_LOST_EVENT'),\n CONTEXT_RESTORED: require('./CONTEXT_RESTORED_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n FOCUS: require('./FOCUS_EVENT'),\n HIDDEN: require('./HIDDEN_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_RENDER: require('./POST_RENDER_EVENT'),\n POST_STEP: require('./POST_STEP_EVENT'),\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\n PRE_STEP: require('./PRE_STEP_EVENT'),\n READY: require('./READY_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n STEP: require('./STEP_EVENT'),\n VISIBLE: require('./VISIBLE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Events = require('./events');\n\n/**\n * @callback DataEachCallback\n *\n * @param {*} parent - The parent object of the DataManager.\n * @param {string} key - The key of the value.\n * @param {*} value - The value.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\n */\n\n/**\n * @classdesc\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\n * or have a property called `events` that is an instance of it.\n *\n * @class DataManager\n * @memberof Phaser.Data\n * @constructor\n * @since 3.0.0\n *\n * @param {object} parent - The object that this DataManager belongs to.\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\n */\nvar DataManager = new Class({\n\n initialize:\n\n function DataManager (parent, eventEmitter)\n {\n /**\n * The object that this DataManager belongs to.\n *\n * @name Phaser.Data.DataManager#parent\n * @type {*}\n * @since 3.0.0\n */\n this.parent = parent;\n\n /**\n * The DataManager's event emitter.\n *\n * @name Phaser.Data.DataManager#events\n * @type {Phaser.Events.EventEmitter}\n * @since 3.0.0\n */\n this.events = eventEmitter;\n\n if (!eventEmitter)\n {\n this.events = (parent.events) ? parent.events : parent;\n }\n\n /**\n * The data list.\n *\n * @name Phaser.Data.DataManager#list\n * @type {Object.}\n * @default {}\n * @since 3.0.0\n */\n this.list = {};\n\n /**\n * The public values list. You can use this to access anything you have stored\n * in this Data Manager. For example, if you set a value called `gold` you can\n * access it via:\n *\n * ```javascript\n * this.data.values.gold;\n * ```\n *\n * You can also modify it directly:\n * \n * ```javascript\n * this.data.values.gold += 1000;\n * ```\n *\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\n * \n * Do not modify this object directly. Adding properties directly to this object will not\n * emit any events. Always use `DataManager.set` to create new items the first time around.\n *\n * @name Phaser.Data.DataManager#values\n * @type {Object.}\n * @default {}\n * @since 3.10.0\n */\n this.values = {};\n\n /**\n * Whether setting data is frozen for this DataManager.\n *\n * @name Phaser.Data.DataManager#_frozen\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._frozen = false;\n\n if (!parent.hasOwnProperty('sys') && this.events)\n {\n this.events.once('destroy', this.destroy, this);\n }\n },\n\n /**\n * Retrieves the value for the given key, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n * \n * ```javascript\n * this.data.get('gold');\n * ```\n *\n * Or access the value directly:\n * \n * ```javascript\n * this.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n * \n * ```javascript\n * this.data.get([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.Data.DataManager#get\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n get: function (key)\n {\n var list = this.list;\n\n if (Array.isArray(key))\n {\n var output = [];\n\n for (var i = 0; i < key.length; i++)\n {\n output.push(list[key[i]]);\n }\n\n return output;\n }\n else\n {\n return list[key];\n }\n },\n\n /**\n * Retrieves all data values in a new object.\n *\n * @method Phaser.Data.DataManager#getAll\n * @since 3.0.0\n *\n * @return {Object.} All data values.\n */\n getAll: function ()\n {\n var results = {};\n\n for (var key in this.list)\n {\n if (this.list.hasOwnProperty(key))\n {\n results[key] = this.list[key];\n }\n }\n\n return results;\n },\n\n /**\n * Queries the DataManager for the values of keys matching the given regular expression.\n *\n * @method Phaser.Data.DataManager#query\n * @since 3.0.0\n *\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\n *\n * @return {Object.} The values of the keys matching the search string.\n */\n query: function (search)\n {\n var results = {};\n\n for (var key in this.list)\n {\n if (this.list.hasOwnProperty(key) && key.match(search))\n {\n results[key] = this.list[key];\n }\n }\n\n return results;\n },\n\n /**\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\n * \n * ```javascript\n * data.set('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `get`:\n * \n * ```javascript\n * data.get('gold');\n * ```\n * \n * Or you can access the value directly via the `values` property, where it works like any other variable:\n * \n * ```javascript\n * data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.Data.DataManager#set\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This DataManager object.\n */\n set: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (typeof key === 'string')\n {\n return this.setValue(key, data);\n }\n else\n {\n for (var entry in key)\n {\n this.setValue(entry, key[entry]);\n }\n }\n\n return this;\n },\n\n /**\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\n * \n * When the value is first set, a `setdata` event is emitted.\n * \n * @method Phaser.Data.DataManager#inc\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {Phaser.Data.DataManager} This DataManager object.\n */\n inc: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (data === undefined)\n {\n data = 1;\n }\n\n var value = this.get(key);\n if (value === undefined)\n {\n value = 0;\n }\n\n this.set(key, (value + data));\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\n * \n * When the value is first set, a `setdata` event is emitted.\n * \n * @method Phaser.Data.DataManager#toggle\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {Phaser.Data.DataManager} This DataManager object.\n */\n toggle: function (key)\n {\n if (this._frozen)\n {\n return this;\n }\n\n this.set(key, !this.get(key));\n\n return this;\n },\n\n /**\n * Internal value setter, called automatically by the `set` method.\n *\n * @method Phaser.Data.DataManager#setValue\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @private\n * @since 3.10.0\n *\n * @param {string} key - The key to set the value for.\n * @param {*} data - The value to set.\n *\n * @return {this} This DataManager object.\n */\n setValue: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (this.has(key))\n {\n // Hit the key getter, which will in turn emit the events.\n this.values[key] = data;\n }\n else\n {\n var _this = this;\n var list = this.list;\n var events = this.events;\n var parent = this.parent;\n\n Object.defineProperty(this.values, key, {\n\n enumerable: true,\n \n configurable: true,\n\n get: function ()\n {\n return list[key];\n },\n\n set: function (value)\n {\n if (!_this._frozen)\n {\n var previousValue = list[key];\n list[key] = value;\n\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\n }\n }\n\n });\n\n list[key] = data;\n\n events.emit(Events.SET_DATA, parent, key, data);\n }\n\n return this;\n },\n\n /**\n * Passes all data entries to the given callback.\n *\n * @method Phaser.Data.DataManager#each\n * @since 3.0.0\n *\n * @param {DataEachCallback} callback - The function to call.\n * @param {*} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\n *\n * @return {this} This DataManager object.\n */\n each: function (callback, context)\n {\n var args = [ this.parent, null, undefined ];\n\n for (var i = 1; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (var key in this.list)\n {\n args[1] = key;\n args[2] = this.list[key];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Merge the given object of key value pairs into this DataManager.\n *\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\n * will emit a `changedata` event.\n *\n * @method Phaser.Data.DataManager#merge\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.0.0\n *\n * @param {Object.} data - The data to merge.\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\n *\n * @return {this} This DataManager object.\n */\n merge: function (data, overwrite)\n {\n if (overwrite === undefined) { overwrite = true; }\n\n // Merge data from another component into this one\n for (var key in data)\n {\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\n {\n this.setValue(key, data[key]);\n }\n }\n\n return this;\n },\n\n /**\n * Remove the value for the given key.\n *\n * If the key is found in this Data Manager it is removed from the internal lists and a\n * `removedata` event is emitted.\n * \n * You can also pass in an array of keys, in which case all keys in the array will be removed:\n * \n * ```javascript\n * this.data.remove([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * @method Phaser.Data.DataManager#remove\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\n *\n * @return {this} This DataManager object.\n */\n remove: function (key)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n this.removeValue(key[i]);\n }\n }\n else\n {\n return this.removeValue(key);\n }\n\n return this;\n },\n\n /**\n * Internal value remover, called automatically by the `remove` method.\n *\n * @method Phaser.Data.DataManager#removeValue\n * @private\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.10.0\n *\n * @param {string} key - The key to set the value for.\n *\n * @return {this} This DataManager object.\n */\n removeValue: function (key)\n {\n if (this.has(key))\n {\n var data = this.list[key];\n\n delete this.list[key];\n delete this.values[key];\n\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\n }\n\n return this;\n },\n\n /**\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\n *\n * @method Phaser.Data.DataManager#pop\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n *\n * @param {string} key - The key of the value to retrieve and delete.\n *\n * @return {*} The value of the given key.\n */\n pop: function (key)\n {\n var data = undefined;\n\n if (!this._frozen && this.has(key))\n {\n data = this.list[key];\n\n delete this.list[key];\n delete this.values[key];\n\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\n }\n\n return data;\n },\n\n /**\n * Determines whether the given key is set in this Data Manager.\n * \n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.Data.DataManager#has\n * @since 3.0.0\n *\n * @param {string} key - The key to check.\n *\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\n */\n has: function (key)\n {\n return this.list.hasOwnProperty(key);\n },\n\n /**\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\n * to create new values or update existing ones.\n *\n * @method Phaser.Data.DataManager#setFreeze\n * @since 3.0.0\n *\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\n *\n * @return {this} This DataManager object.\n */\n setFreeze: function (value)\n {\n this._frozen = value;\n\n return this;\n },\n\n /**\n * Delete all data in this Data Manager and unfreeze it.\n *\n * @method Phaser.Data.DataManager#reset\n * @since 3.0.0\n *\n * @return {this} This DataManager object.\n */\n reset: function ()\n {\n for (var key in this.list)\n {\n delete this.list[key];\n delete this.values[key];\n }\n\n this._frozen = false;\n\n return this;\n },\n\n /**\n * Destroy this data manager.\n *\n * @method Phaser.Data.DataManager#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.reset();\n\n this.events.off(Events.CHANGE_DATA);\n this.events.off(Events.SET_DATA);\n this.events.off(Events.REMOVE_DATA);\n\n this.parent = null;\n },\n\n /**\n * Gets or sets the frozen state of this Data Manager.\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\n *\n * @name Phaser.Data.DataManager#freeze\n * @type {boolean}\n * @since 3.0.0\n */\n freeze: {\n\n get: function ()\n {\n return this._frozen;\n },\n\n set: function (value)\n {\n this._frozen = (value) ? true : false;\n }\n\n },\n\n /**\n * Return the total number of entries in this Data Manager.\n *\n * @name Phaser.Data.DataManager#count\n * @type {integer}\n * @since 3.0.0\n */\n count: {\n\n get: function ()\n {\n var i = 0;\n\n for (var key in this.list)\n {\n if (this.list[key] !== undefined)\n {\n i++;\n }\n }\n\n return i;\n }\n\n }\n\n});\n\nmodule.exports = DataManager;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Change Data Event.\n * \n * This event is dispatched by a Data Manager when an item in the data store is changed.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\n * \n * This event is dispatched for all items that change in the Data Manager.\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\n *\n * @event Phaser.Data.Events#CHANGE_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} value - The new value of the item in the Data Manager.\n * @param {any} previousValue - The previous value of the item in the Data Manager.\n */\nmodule.exports = 'changedata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Change Data Key Event.\n * \n * This event is dispatched by a Data Manager when an item in the data store is changed.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\n * then you can listen for `sprite.data.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.16.1\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'changedata-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Remove Data Event.\n * \n * This event is dispatched by a Data Manager when an item is removed from it.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'removedata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Set Data Event.\n * \n * This event is dispatched by a Data Manager when a new item is added to the data store.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'setdata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Data.Events\n */\n\nmodule.exports = {\n\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Given a hex color value, such as 0xff00ff (for purple), it will return a\n * numeric representation of it (i.e. 16711935) for use in WebGL tinting.\n *\n * @function Phaser.Display.Color.GetColorFromValue\n * @since 3.50.0\n *\n * @param {number} red - The hex color value, such as 0xff0000.\n *\n * @return {number} The combined color value.\n */\nvar GetColorFromValue = function (value)\n{\n return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n};\n\nmodule.exports = GetColorFromValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameEvents = require('../../core/events');\n\n/**\n * @classdesc\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\n * not a clipping path. It is only available when using the WebGL Renderer.\n *\n * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s).\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\n * Bitmap Mask doesn't matter.\n *\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\n * corresponding pixel in the mask.\n *\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\n * masked objects. Moving or transforming the underlying Game Object will change the mask\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\n * will not affect the mask.\n *\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\n * render as a normal Game Object and will also serve as a mask.\n *\n * @class BitmapMask\n * @memberof Phaser.Display.Masks\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in.\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, renderable)\n {\n var renderer = scene.sys.game.renderer;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Mask is using.\n *\n * @name Phaser.Display.Masks.BitmapMask#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.11.0\n */\n this.renderer = renderer;\n\n /**\n * A renderable Game Object that uses a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {Phaser.GameObjects.GameObject}\n * @since 3.0.0\n */\n this.bitmapMask = renderable;\n\n /**\n * The texture used for the mask's framebuffer.\n *\n * @name Phaser.Display.Masks.BitmapMask#maskTexture\n * @type {WebGLTexture}\n * @default null\n * @since 3.0.0\n */\n this.maskTexture = null;\n\n /**\n * The texture used for the main framebuffer.\n *\n * @name Phaser.Display.Masks.BitmapMask#mainTexture\n * @type {WebGLTexture}\n * @default null\n * @since 3.0.0\n */\n this.mainTexture = null;\n\n /**\n * Whether the Bitmap Mask is dirty and needs to be updated.\n *\n * @name Phaser.Display.Masks.BitmapMask#dirty\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.dirty = true;\n\n /**\n * The framebuffer to which a masked Game Object is rendered.\n *\n * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.0.0\n */\n this.mainFramebuffer = null;\n\n /**\n * The framebuffer to which the Bitmap Mask's masking Game Object is rendered.\n *\n * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.0.0\n */\n this.maskFramebuffer = null;\n\n /**\n * The previous framebuffer set in the renderer before this one was enabled.\n *\n * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.17.0\n */\n this.prevFramebuffer = null;\n\n /**\n * Whether to invert the masks alpha.\n *\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\n *\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\n * @type {boolean}\n * @since 3.1.2\n */\n this.invertAlpha = false;\n\n /**\n * Is this mask a stencil mask?\n *\n * @name Phaser.Display.Masks.BitmapMask#isStencil\n * @type {boolean}\n * @readonly\n * @since 3.17.0\n */\n this.isStencil = false;\n\n if (renderer && renderer.gl)\n {\n var width = renderer.width;\n var height = renderer.height;\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\n var gl = renderer.gl;\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\n var filter = gl.LINEAR;\n\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\n\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\n {\n var width = renderer.width;\n var height = renderer.height;\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\n var gl = renderer.gl;\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\n var filter = gl.LINEAR;\n\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\n\n }, this);\n }\n },\n\n /**\n * Sets a new masking Game Object for the Bitmap Mask.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\n */\n setBitmap: function (renderable)\n {\n this.bitmapMask = renderable;\n },\n\n /**\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\n *\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\n *\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n */\n preRenderWebGL: function (renderer, maskedObject, camera)\n {\n renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera);\n },\n\n /**\n * Finalizes rendering of a masked Game Object.\n *\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\n *\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\n */\n postRenderWebGL: function (renderer, camera)\n {\n renderer.pipelines.BitmapMaskPipeline.endMask(this, camera);\n },\n\n /**\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\n *\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n */\n preRenderCanvas: function ()\n {\n // NOOP\n },\n\n /**\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\n *\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\n */\n postRenderCanvas: function ()\n {\n // NOOP\n },\n\n /**\n * Destroys this BitmapMask and nulls any references it holds.\n * \n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\n *\n * @method Phaser.Display.Masks.BitmapMask#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.bitmapMask = null;\n\n var renderer = this.renderer;\n\n if (renderer && renderer.gl)\n {\n renderer.deleteTexture(this.mainTexture);\n renderer.deleteTexture(this.maskTexture);\n renderer.deleteFramebuffer(this.mainFramebuffer);\n renderer.deleteFramebuffer(this.maskFramebuffer);\n }\n\n this.mainTexture = null;\n this.maskTexture = null;\n this.mainFramebuffer = null;\n this.maskFramebuffer = null;\n this.prevFramebuffer = null;\n this.renderer = null;\n }\n\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\n\n/**\n * @classdesc\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\n *\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\n * alpha of the pixel from the Geometry Mask do not matter.\n *\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\n *\n * @class GeometryMask\n * @memberof Phaser.Display.Masks\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - This parameter is not used.\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\n */\nvar GeometryMask = new Class({\n\n initialize:\n\n function GeometryMask (scene, graphicsGeometry)\n {\n /**\n * The Graphics object which describes the Geometry Mask.\n *\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\n * @type {Phaser.GameObjects.Graphics}\n * @since 3.0.0\n */\n this.geometryMask = graphicsGeometry;\n\n /**\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\n * drawn to the Geometry Mask.\n *\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\n * @type {boolean}\n * @since 3.16.0\n */\n this.invertAlpha = false;\n\n /**\n * Is this mask a stencil mask?\n *\n * @name Phaser.Display.Masks.GeometryMask#isStencil\n * @type {boolean}\n * @readonly\n * @since 3.17.0\n */\n this.isStencil = true;\n\n /**\n * The current stencil level.\n *\n * @name Phaser.Display.Masks.GeometryMask#level\n * @type {boolean}\n * @private\n * @since 3.17.0\n */\n this.level = 0;\n },\n\n /**\n * Sets a new Graphics object for the Geometry Mask.\n *\n * @method Phaser.Display.Masks.GeometryMask#setShape\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\n * \n * @return {this} This Geometry Mask\n */\n setShape: function (graphicsGeometry)\n {\n this.geometryMask = graphicsGeometry;\n\n return this;\n },\n\n /**\n * Sets the `invertAlpha` property of this Geometry Mask.\n * Inverting the alpha essentially flips the way the mask works.\n *\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\n * @since 3.17.0\n *\n * @param {boolean} [value=true] - Invert the alpha of this mask?\n * \n * @return {this} This Geometry Mask\n */\n setInvertAlpha: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.invertAlpha = value;\n\n return this;\n },\n\n /**\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\n *\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n */\n preRenderWebGL: function (renderer, child, camera)\n {\n var gl = renderer.gl;\n\n // Force flushing before drawing to stencil buffer\n renderer.flush();\n\n if (renderer.maskStack.length === 0)\n {\n gl.enable(gl.STENCIL_TEST);\n gl.clear(gl.STENCIL_BUFFER_BIT);\n\n renderer.maskCount = 0;\n }\n\n if (renderer.currentCameraMask.mask !== this)\n {\n renderer.currentMask.mask = this;\n }\n\n renderer.maskStack.push({ mask: this, camera: camera });\n\n this.applyStencil(renderer, camera, true);\n\n renderer.maskCount++;\n },\n\n /**\n * Applies the current stencil mask to the renderer.\n *\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\n * @since 3.17.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\n */\n applyStencil: function (renderer, camera, inc)\n {\n var gl = renderer.gl;\n var geometryMask = this.geometryMask;\n var level = renderer.maskCount;\n\n gl.colorMask(false, false, false, false);\n\n if (inc)\n {\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\n }\n\n // Write stencil buffer\n geometryMask.renderWebGL(renderer, geometryMask, 0, camera);\n\n renderer.flush();\n\n gl.colorMask(true, true, true, true);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\n\n if (inc)\n {\n if (this.invertAlpha)\n {\n gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\n }\n }\n else if (this.invertAlpha)\n {\n gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\n }\n },\n\n /**\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\n *\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\n */\n postRenderWebGL: function (renderer)\n {\n var gl = renderer.gl;\n\n renderer.maskStack.pop();\n\n renderer.maskCount--;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n renderer.flush();\n\n renderer.currentMask.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\n {\n // Force flush before disabling stencil test\n renderer.flush();\n\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\n\n prev.mask.applyStencil(renderer, prev.camera, false);\n\n if (renderer.currentCameraMask.mask !== prev.mask)\n {\n renderer.currentMask.mask = prev.mask;\n renderer.currentMask.camera = prev.camera;\n }\n else\n {\n renderer.currentMask.mask = null;\n }\n }\n },\n\n /**\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\n *\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n */\n preRenderCanvas: function (renderer, mask, camera)\n {\n var geometryMask = this.geometryMask;\n\n renderer.currentContext.save();\n\n geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true);\n\n renderer.currentContext.clip();\n },\n\n /**\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\n *\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\n */\n postRenderCanvas: function (renderer)\n {\n renderer.currentContext.restore();\n },\n\n /**\n * Destroys this GeometryMask and nulls any references it holds.\n *\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\n *\n * @method Phaser.Display.Masks.GeometryMask#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.geometryMask = null;\n }\n\n});\n\nmodule.exports = GeometryMask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BlendModes = require('../renderer/BlendModes');\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\n\n/**\n * Builds a Game Object using the provided configuration object.\n *\n * @function Phaser.GameObjects.BuildGameObject\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene.\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\n *\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\n */\nvar BuildGameObject = function (scene, gameObject, config)\n{\n // Position\n\n gameObject.x = GetAdvancedValue(config, 'x', 0);\n gameObject.y = GetAdvancedValue(config, 'y', 0);\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\n\n // Flip\n\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\n\n // Scale\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\n\n var scale = GetAdvancedValue(config, 'scale', null);\n\n if (typeof scale === 'number')\n {\n gameObject.setScale(scale);\n }\n else if (scale !== null)\n {\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\n }\n\n // ScrollFactor\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\n\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\n\n if (typeof scrollFactor === 'number')\n {\n gameObject.setScrollFactor(scrollFactor);\n }\n else if (scrollFactor !== null)\n {\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\n }\n\n // Rotation\n\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\n\n var angle = GetAdvancedValue(config, 'angle', null);\n\n if (angle !== null)\n {\n gameObject.angle = angle;\n }\n\n // Alpha\n\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\n\n // Origin\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\n\n var origin = GetAdvancedValue(config, 'origin', null);\n\n if (typeof origin === 'number')\n {\n gameObject.setOrigin(origin);\n }\n else if (origin !== null)\n {\n var ox = GetAdvancedValue(origin, 'x', 0.5);\n var oy = GetAdvancedValue(origin, 'y', 0.5);\n\n gameObject.setOrigin(ox, oy);\n }\n\n // BlendMode\n\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\n\n // Visible\n\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\n\n // Add to Scene\n\n var add = GetAdvancedValue(config, 'add', true);\n\n if (add)\n {\n scene.sys.displayList.add(gameObject);\n }\n\n if (gameObject.preUpdate)\n {\n scene.sys.updateList.add(gameObject);\n }\n\n return gameObject;\n};\n\nmodule.exports = BuildGameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar ComponentsToJSON = require('./components/ToJSON');\nvar DataManager = require('../data/DataManager');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\n\n/**\n * @classdesc\n * The base class that all Game Objects extend.\n * You don't create GameObjects directly and they cannot be added to the display list.\n * Instead, use them as the base for your own custom classes.\n *\n * @class GameObject\n * @memberof Phaser.GameObjects\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\n */\nvar GameObject = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function GameObject (scene, type)\n {\n EventEmitter.call(this);\n\n /**\n * The Scene to which this Game Object belongs.\n * Game Objects can only belong to one Scene.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A textual representation of this Game Object, i.e. `sprite`.\n * Used internally by Phaser but is available for your own custom classes to populate.\n *\n * @name Phaser.GameObjects.GameObject#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = type;\n\n /**\n * The current state of this Game Object.\n *\n * Phaser itself will never modify this value, although plugins may do so.\n *\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @name Phaser.GameObjects.GameObject#state\n * @type {(integer|string)}\n * @since 3.16.0\n */\n this.state = 0;\n\n /**\n * The parent Container of this Game Object, if it has one.\n *\n * @name Phaser.GameObjects.GameObject#parentContainer\n * @type {Phaser.GameObjects.Container}\n * @since 3.4.0\n */\n this.parentContainer = null;\n\n /**\n * The name of this Game Object.\n * Empty by default and never populated by Phaser, this is left for developers to use.\n *\n * @name Phaser.GameObjects.GameObject#name\n * @type {string}\n * @default ''\n * @since 3.0.0\n */\n this.name = '';\n\n /**\n * The active state of this Game Object.\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\n * An active object is one which is having its logic and internal systems updated.\n *\n * @name Phaser.GameObjects.GameObject#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * The Tab Index of the Game Object.\n * Reserved for future use by plugins and the Input Manager.\n *\n * @name Phaser.GameObjects.GameObject#tabIndex\n * @type {integer}\n * @default -1\n * @since 3.0.0\n */\n this.tabIndex = -1;\n\n /**\n * A Data Manager.\n * It allows you to store, query and get key/value paired information specific to this Game Object.\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\n *\n * @name Phaser.GameObjects.GameObject#data\n * @type {Phaser.Data.DataManager}\n * @default null\n * @since 3.0.0\n */\n this.data = null;\n\n /**\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\n * If those components are not used by your custom class then you can use this bitmask as you wish.\n *\n * @name Phaser.GameObjects.GameObject#renderFlags\n * @type {integer}\n * @default 15\n * @since 3.0.0\n */\n this.renderFlags = 15;\n\n /**\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\n * Not usually set directly, instead call `Camera.ignore`, however you can\n * set this property directly using the Camera.id property:\n *\n * @example\n * this.cameraFilter |= camera.id\n *\n * @name Phaser.GameObjects.GameObject#cameraFilter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.cameraFilter = 0;\n\n /**\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\n *\n * @name Phaser.GameObjects.GameObject#input\n * @type {?Phaser.Types.Input.InteractiveObject}\n * @default null\n * @since 3.0.0\n */\n this.input = null;\n\n /**\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\n *\n * @name Phaser.GameObjects.GameObject#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n\n /**\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\n * This includes calls that may come from a Group, Container or the Scene itself.\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\n * responsible for managing references to and from this Game Object.\n *\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\n * @type {boolean}\n * @default false\n * @since 3.5.0\n */\n this.ignoreDestroy = false;\n\n // Tell the Scene to re-sort the children\n scene.sys.queueDepthSort();\n },\n\n /**\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\n *\n * @method Phaser.GameObjects.GameObject#setActive\n * @since 3.0.0\n *\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\n *\n * @return {this} This GameObject.\n */\n setActive: function (value)\n {\n this.active = value;\n\n return this;\n },\n\n /**\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\n * The `name` property is not populated by Phaser and is presented for your own use.\n *\n * @method Phaser.GameObjects.GameObject#setName\n * @since 3.0.0\n *\n * @param {string} value - The name to be given to this Game Object.\n *\n * @return {this} This GameObject.\n */\n setName: function (value)\n {\n this.name = value;\n\n return this;\n },\n\n /**\n * Sets the current state of this Game Object.\n *\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\n *\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\n * The state value should typically be an integer (ideally mapped to a constant\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @method Phaser.GameObjects.GameObject#setState\n * @since 3.16.0\n *\n * @param {(integer|string)} value - The state of the Game Object.\n *\n * @return {this} This GameObject.\n */\n setState: function (value)\n {\n this.state = value;\n\n return this;\n },\n\n /**\n * Adds a Data Manager component to this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#setDataEnabled\n * @since 3.0.0\n * @see Phaser.Data.DataManager\n *\n * @return {this} This GameObject.\n */\n setDataEnabled: function ()\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this;\n },\n\n /**\n * Allows you to store a key value pair within this Game Objects Data Manager.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * ```javascript\n * sprite.setData('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `getData`:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or you can access the value directly via the `values` property, where it works like any other variable:\n *\n * ```javascript\n * sprite.data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.GameObjects.GameObject#setData\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This GameObject.\n */\n setData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.set(key, value);\n\n return this;\n },\n\n /**\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#incData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {this} This GameObject.\n */\n incData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.inc(key, value);\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toggleData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {this} This GameObject.\n */\n toggleData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.toggle(key);\n\n return this;\n },\n\n /**\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or access the value directly:\n *\n * ```javascript\n * sprite.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n *\n * ```javascript\n * sprite.getData([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.GameObjects.GameObject#getData\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n getData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this.data.get(key);\n },\n\n /**\n * Pass this Game Object to the Input Manager to enable it for Input.\n *\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\n * input detection.\n *\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\n * shape for it to use.\n *\n * You can also provide an Input Configuration Object as the only argument to this method.\n *\n * @example\n * sprite.setInteractive();\n *\n * @example\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\n *\n * @example\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\n *\n * @method Phaser.GameObjects.GameObject#setInteractive\n * @since 3.0.0\n *\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\n *\n * @return {this} This GameObject.\n */\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\n {\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will disable it.\n *\n * An object that is disabled for input stops processing or being considered for\n * input events, but can be turned back on again at any time by simply calling\n * `setInteractive()` with no arguments provided.\n *\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\n *\n * @method Phaser.GameObjects.GameObject#disableInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n disableInteractive: function ()\n {\n if (this.input)\n {\n this.input.enabled = false;\n }\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will queue it\n * for removal, causing it to no longer be interactive. The removal happens on\n * the next game step, it is not immediate.\n *\n * The Interactive Object that was assigned to this Game Object will be destroyed,\n * removed from the Input Manager and cleared from this Game Object.\n *\n * If you wish to re-enable this Game Object at a later date you will need to\n * re-create its InteractiveObject by calling `setInteractive` again.\n *\n * If you wish to only temporarily stop an object from receiving input then use\n * `disableInteractive` instead, as that toggles the interactive state, where-as\n * this erases it completely.\n *\n * If you wish to resize a hit area, don't remove and then set it as being\n * interactive. Instead, access the hitarea object directly and resize the shape\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\n * shape is a Rectangle, which it is by default.)\n *\n * @method Phaser.GameObjects.GameObject#removeInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n removeInteractive: function ()\n {\n this.scene.sys.input.clear(this);\n\n this.input = undefined;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is added to a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to add themselves into the Update List.\n *\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#addedToScene\n * @since 3.50.0\n */\n addedToScene: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is removed from a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to removed themselves from the Update List.\n *\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#removedFromScene\n * @since 3.50.0\n */\n removedFromScene: function ()\n {\n },\n\n /**\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\n *\n * @method Phaser.GameObjects.GameObject#update\n * @since 3.0.0\n *\n * @param {...*} [args] - args\n */\n update: function ()\n {\n },\n\n /**\n * Returns a JSON representation of the Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\n toJSON: function ()\n {\n return ComponentsToJSON(this);\n },\n\n /**\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\n * Also checks the Game Object against the given Cameras exclusion list.\n *\n * @method Phaser.GameObjects.GameObject#willRender\n * @since 3.0.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\n *\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\n */\n willRender: function (camera)\n {\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\n },\n\n /**\n * Returns an array containing the display list index of either this Game Object, or if it has one,\n * its parent Container. It then iterates up through all of the parent containers until it hits the\n * root of the display list (which is index 0 in the returned array).\n *\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\n * this Game Object and all of its ancestors.\n *\n * @method Phaser.GameObjects.GameObject#getIndexList\n * @since 3.4.0\n *\n * @return {integer[]} An array of display list position indexes.\n */\n getIndexList: function ()\n {\n // eslint-disable-next-line consistent-this\n var child = this;\n var parent = this.parentContainer;\n\n var indexes = [];\n\n while (parent)\n {\n // indexes.unshift([parent.getIndex(child), parent.name]);\n indexes.unshift(parent.getIndex(child));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n\n return indexes;\n },\n\n /**\n * Destroys this Game Object removing it from the Display List and Update List and\n * severing all ties to parent resources.\n *\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\n *\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\n * As long as no reference to it exists within your own code it should become free for\n * garbage collection by the browser.\n *\n * If you just want to temporarily disable an object then look at using the\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\n *\n * @method Phaser.GameObjects.GameObject#destroy\n * @fires Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n *\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\n */\n destroy: function (fromScene)\n {\n if (fromScene === undefined) { fromScene = false; }\n\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this);\n\n var sys = this.scene.sys;\n\n if (!fromScene)\n {\n sys.displayList.remove(this);\n }\n\n if (this.input)\n {\n sys.input.clear(this);\n this.input = undefined;\n }\n\n if (this.data)\n {\n this.data.destroy();\n\n this.data = undefined;\n }\n\n if (this.body)\n {\n this.body.destroy();\n this.body = undefined;\n }\n\n // Tell the Scene to re-sort the children\n if (!fromScene)\n {\n sys.queueDepthSort();\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n\n this.parentContainer = undefined;\n\n this.removeAllListeners();\n }\n\n});\n\n/**\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\n *\n * @constant {integer} RENDER_MASK\n * @memberof Phaser.GameObjects.GameObject\n * @default\n */\nGameObject.RENDER_MASK = 15;\n\nmodule.exports = GameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../../math/Clamp');\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 2; // 0010\n\n/**\n * Provides methods used for setting the alpha properties of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Alpha\n * @since 3.0.0\n */\n\nvar Alpha = {\n\n /**\n * Private internal value. Holds the global alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alpha\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alpha: 1,\n\n /**\n * Private internal value. Holds the top-left alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaTL: 1,\n\n /**\n * Private internal value. Holds the top-right alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaTR: 1,\n\n /**\n * Private internal value. Holds the bottom-left alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaBL: 1,\n\n /**\n * Private internal value. Holds the bottom-right alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaBR: 1,\n\n /**\n * Clears all alpha values associated with this Game Object.\n *\n * Immediately sets the alpha levels back to 1 (fully opaque).\n *\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearAlpha: function ()\n {\n return this.setAlpha(1);\n },\n\n /**\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\n *\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\n * @since 3.0.0\n *\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n if (topLeft === undefined) { topLeft = 1; }\n\n // Treat as if there is only one alpha value for the whole Game Object\n if (topRight === undefined)\n {\n this.alpha = topLeft;\n }\n else\n {\n this._alphaTL = Clamp(topLeft, 0, 1);\n this._alphaTR = Clamp(topRight, 0, 1);\n this._alphaBL = Clamp(bottomLeft, 0, 1);\n this._alphaBR = Clamp(bottomRight, 0, 1);\n }\n\n return this;\n },\n\n /**\n * The alpha value of the Game Object.\n *\n * This is a global value, impacting the entire Game Object, not just a region of it.\n *\n * @name Phaser.GameObjects.Components.Alpha#alpha\n * @type {number}\n * @since 3.0.0\n */\n alpha: {\n\n get: function ()\n {\n return this._alpha;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alpha = v;\n this._alphaTL = v;\n this._alphaTR = v;\n this._alphaBL = v;\n this._alphaBR = v;\n\n if (v === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the top-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaTopLeft: {\n\n get: function ()\n {\n return this._alphaTL;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaTL = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the top-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaTopRight: {\n\n get: function ()\n {\n return this._alphaTR;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaTR = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the bottom-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaBottomLeft: {\n\n get: function ()\n {\n return this._alphaBL;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaBL = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the bottom-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaBottomRight: {\n\n get: function ()\n {\n return this._alphaBR;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaBR = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n }\n\n};\n\nmodule.exports = Alpha;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../../math/Clamp');\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 2; // 0010\n\n/**\n * Provides methods used for setting the alpha property of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.AlphaSingle\n * @since 3.22.0\n */\n\nvar AlphaSingle = {\n\n /**\n * Private internal value. Holds the global alpha value.\n *\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alpha: 1,\n\n /**\n * Clears all alpha values associated with this Game Object.\n *\n * Immediately sets the alpha levels back to 1 (fully opaque).\n *\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearAlpha: function ()\n {\n return this.setAlpha(1);\n },\n\n /**\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\n * @since 3.0.0\n *\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (value)\n {\n if (value === undefined) { value = 1; }\n\n this.alpha = value;\n\n return this;\n },\n\n /**\n * The alpha value of the Game Object.\n *\n * This is a global value, impacting the entire Game Object, not just a region of it.\n *\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\n * @type {number}\n * @since 3.0.0\n */\n alpha: {\n\n get: function ()\n {\n return this._alpha;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alpha = v;\n\n if (v === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n }\n\n};\n\nmodule.exports = AlphaSingle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BaseAnimation = require('../../animations/Animation');\nvar Class = require('../../utils/Class');\nvar Events = require('../../animations/events');\n\n/**\n * @classdesc\n * A Game Object Animation Controller.\n *\n * This controller lives as an instance within a Game Object, accessible as `sprite.anims`.\n *\n * @class Animation\n * @memberof Phaser.GameObjects.Components\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs.\n */\nvar Animation = new Class({\n\n initialize:\n\n function Animation (parent)\n {\n /**\n * The Game Object to which this animation controller belongs.\n *\n * @name Phaser.GameObjects.Components.Animation#parent\n * @type {Phaser.GameObjects.GameObject}\n * @since 3.0.0\n */\n this.parent = parent;\n\n /**\n * A reference to the global Animation Manager.\n *\n * @name Phaser.GameObjects.Components.Animation#animationManager\n * @type {Phaser.Animations.AnimationManager}\n * @since 3.0.0\n */\n this.animationManager = parent.scene.sys.anims;\n\n this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this);\n\n /**\n * Is an animation currently playing or not?\n *\n * @name Phaser.GameObjects.Components.Animation#isPlaying\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.isPlaying = false;\n\n /**\n * The current Animation loaded into this Animation Controller.\n *\n * @name Phaser.GameObjects.Components.Animation#currentAnim\n * @type {?Phaser.Animations.Animation}\n * @default null\n * @since 3.0.0\n */\n this.currentAnim = null;\n\n /**\n * The current AnimationFrame being displayed by this Animation Controller.\n *\n * @name Phaser.GameObjects.Components.Animation#currentFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @since 3.0.0\n */\n this.currentFrame = null;\n\n /**\n * The key of the next Animation to be loaded into this Animation Controller when the current animation completes.\n *\n * @name Phaser.GameObjects.Components.Animation#nextAnim\n * @type {?string}\n * @default null\n * @since 3.16.0\n */\n this.nextAnim = null;\n\n /**\n * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes.\n *\n * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue\n * @type {string[]}\n * @since 3.24.0\n */\n this.nextAnimsQueue = [];\n\n /**\n * Time scale factor.\n *\n * @name Phaser.GameObjects.Components.Animation#_timeScale\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n this._timeScale = 1;\n\n /**\n * The frame rate of playback in frames per second.\n * The default is 24 if the `duration` property is `null`.\n *\n * @name Phaser.GameObjects.Components.Animation#frameRate\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.frameRate = 0;\n\n /**\n * How long the animation should play for, in milliseconds.\n * If the `frameRate` property has been set then it overrides this value,\n * otherwise the `frameRate` is derived from `duration`.\n *\n * @name Phaser.GameObjects.Components.Animation#duration\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.duration = 0;\n\n /**\n * ms per frame, not including frame specific modifiers that may be present in the Animation data.\n *\n * @name Phaser.GameObjects.Components.Animation#msPerFrame\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.msPerFrame = 0;\n\n /**\n * Skip frames if the time lags, or always advanced anyway?\n *\n * @name Phaser.GameObjects.Components.Animation#skipMissedFrames\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.skipMissedFrames = true;\n\n /**\n * A delay before starting playback, in milliseconds.\n *\n * @name Phaser.GameObjects.Components.Animation#_delay\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._delay = 0;\n\n /**\n * Number of times to repeat the animation (-1 for infinity)\n *\n * @name Phaser.GameObjects.Components.Animation#_repeat\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._repeat = 0;\n\n /**\n * Delay before the repeat starts, in milliseconds.\n *\n * @name Phaser.GameObjects.Components.Animation#_repeatDelay\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._repeatDelay = 0;\n\n /**\n * Should the animation yoyo? (reverse back down to the start) before repeating?\n *\n * @name Phaser.GameObjects.Components.Animation#_yoyo\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._yoyo = false;\n\n /**\n * Will the playhead move forwards (`true`) or in reverse (`false`).\n *\n * @name Phaser.GameObjects.Components.Animation#forward\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.forward = true;\n\n /**\n * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'),\n * needed because forward can be changed by yoyo feature.\n *\n * @name Phaser.GameObjects.Components.Animation#_reverse\n * @type {boolean}\n * @default false\n * @private\n * @since 3.12.0\n */\n this._reverse = false;\n\n /**\n * Internal time overflow accumulator.\n *\n * @name Phaser.GameObjects.Components.Animation#accumulator\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.accumulator = 0;\n\n /**\n * The time point at which the next animation frame will change.\n *\n * @name Phaser.GameObjects.Components.Animation#nextTick\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.nextTick = 0;\n\n /**\n * An internal counter keeping track of how many repeats are left to play.\n *\n * @name Phaser.GameObjects.Components.Animation#repeatCounter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.repeatCounter = 0;\n\n /**\n * An internal flag keeping track of pending repeats.\n *\n * @name Phaser.GameObjects.Components.Animation#pendingRepeat\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.pendingRepeat = false;\n\n /**\n * Is the Animation paused?\n *\n * @name Phaser.GameObjects.Components.Animation#_paused\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._paused = false;\n\n /**\n * Was the animation previously playing before being paused?\n *\n * @name Phaser.GameObjects.Components.Animation#_wasPlaying\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._wasPlaying = false;\n\n /**\n * Internal property tracking if this Animation is waiting to stop.\n *\n * 0 = No\n * 1 = Waiting for ms to pass\n * 2 = Waiting for repeat\n * 3 = Waiting for specific frame\n *\n * @name Phaser.GameObjects.Components.Animation#_pendingStop\n * @type {integer}\n * @private\n * @since 3.4.0\n */\n this._pendingStop = 0;\n\n /**\n * Internal property used by _pendingStop.\n *\n * @name Phaser.GameObjects.Components.Animation#_pendingStopValue\n * @type {any}\n * @private\n * @since 3.4.0\n */\n this._pendingStopValue;\n },\n\n /**\n * Sets an animation to be played immediately after the current one completes.\n *\n * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it.\n *\n * An animation set to repeat forever will never enter a completed state.\n *\n * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback).\n * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing.\n *\n * Call this method with no arguments to reset the chained animation.\n *\n * @method Phaser.GameObjects.Components.Animation#chain\n * @since 3.16.0\n *\n * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n chain: function (key)\n {\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (this.nextAnim === null)\n {\n this.nextAnim = key;\n }\n else\n {\n this.nextAnimsQueue.push(key);\n }\n\n return this.parent;\n },\n\n /**\n * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback.\n *\n * @method Phaser.GameObjects.Components.Animation#setDelay\n * @since 3.4.0\n *\n * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setDelay: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this._delay = value;\n\n return this.parent;\n },\n\n /**\n * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback.\n *\n * @method Phaser.GameObjects.Components.Animation#getDelay\n * @since 3.4.0\n *\n * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback.\n */\n getDelay: function ()\n {\n return this._delay;\n },\n\n /**\n * Waits for the specified delay, in milliseconds, then starts playback of the requested animation.\n *\n * @method Phaser.GameObjects.Components.Animation#delayedPlay\n * @since 3.0.0\n *\n * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing.\n * @param {string} key - The key of the animation to play.\n * @param {integer} [startFrame=0] - The frame of the animation to start from.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n delayedPlay: function (delay, key, startFrame)\n {\n this.play(key, true, startFrame);\n\n this.nextTick += delay;\n\n return this.parent;\n },\n\n /**\n * Returns the key of the animation currently loaded into this component.\n *\n * @method Phaser.GameObjects.Components.Animation#getCurrentKey\n * @since 3.0.0\n *\n * @return {string} The key of the Animation loaded into this component.\n */\n getCurrentKey: function ()\n {\n if (this.currentAnim)\n {\n return this.currentAnim.key;\n }\n },\n\n /**\n * Internal method used to load an animation into this component.\n *\n * @method Phaser.GameObjects.Components.Animation#load\n * @protected\n * @since 3.0.0\n *\n * @param {string} key - The key of the animation to load.\n * @param {integer} [startFrame=0] - The start frame of the animation to load.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n load: function (key, startFrame)\n {\n if (startFrame === undefined) { startFrame = 0; }\n\n if (this.isPlaying)\n {\n this.stop();\n }\n\n // Load the new animation in\n this.animationManager.load(this, key, startFrame);\n\n return this.parent;\n },\n\n /**\n * Pause the current animation and set the `isPlaying` property to `false`.\n * You can optionally pause it at a specific frame.\n *\n * @method Phaser.GameObjects.Components.Animation#pause\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n pause: function (atFrame)\n {\n if (!this._paused)\n {\n this._paused = true;\n this._wasPlaying = this.isPlaying;\n this.isPlaying = false;\n }\n\n if (atFrame !== undefined)\n {\n this.updateFrame(atFrame);\n }\n\n return this.parent;\n },\n\n /**\n * Resumes playback of a paused animation and sets the `isPlaying` property to `true`.\n * You can optionally tell it to start playback from a specific frame.\n *\n * @method Phaser.GameObjects.Components.Animation#resume\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n resume: function (fromFrame)\n {\n if (this._paused)\n {\n this._paused = false;\n this.isPlaying = this._wasPlaying;\n }\n\n if (fromFrame !== undefined)\n {\n this.updateFrame(fromFrame);\n }\n\n return this.parent;\n },\n\n /**\n * `true` if the current animation is paused, otherwise `false`.\n *\n * @name Phaser.GameObjects.Components.Animation#isPaused\n * @readonly\n * @type {boolean}\n * @since 3.4.0\n */\n isPaused: {\n\n get: function ()\n {\n return this._paused;\n }\n\n },\n\n /**\n * Plays an Animation on a Game Object that has the Animation component, such as a Sprite.\n *\n * Animations are stored in the global Animation Manager and are referenced by a unique string-based key.\n *\n * @method Phaser.GameObjects.Components.Animation#play\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\n * @since 3.0.0\n *\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n play: function (key, ignoreIfPlaying, startFrame)\n {\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n if (startFrame === undefined) { startFrame = 0; }\n\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\n {\n return this.parent;\n }\n\n this.forward = true;\n this._reverse = false;\n this._paused = false;\n this._wasPlaying = true;\n\n return this._startAnimation(key, startFrame);\n },\n\n /**\n * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component.\n *\n * @method Phaser.GameObjects.Components.Animation#playReverse\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\n * @since 3.12.0\n *\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n playReverse: function (key, ignoreIfPlaying, startFrame)\n {\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n if (startFrame === undefined) { startFrame = 0; }\n\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\n {\n return this.parent;\n }\n\n this.forward = false;\n this._reverse = true;\n\n return this._startAnimation(key, startFrame);\n },\n\n /**\n * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method.\n *\n * @method Phaser.GameObjects.Components.Animation#_startAnimation\n * @fires Phaser.Animations.Events#ANIMATION_START\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\n * @since 3.12.0\n *\n * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n _startAnimation: function (key, startFrame)\n {\n this.load(key, startFrame);\n\n var anim = this.currentAnim;\n var gameObject = this.parent;\n\n if (!anim)\n {\n return gameObject;\n }\n\n // Should give us 9,007,199,254,740,991 safe repeats\n this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;\n\n anim.getFirstTick(this);\n\n this.isPlaying = true;\n this.pendingRepeat = false;\n\n if (anim.showOnStart)\n {\n gameObject.visible = true;\n }\n\n var frame = this.currentFrame;\n\n anim.emit(Events.ANIMATION_START, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject);\n\n return gameObject;\n },\n\n /**\n * Reverse the Animation that is already playing on the Game Object.\n *\n * @method Phaser.GameObjects.Components.Animation#reverse\n * @since 3.12.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n reverse: function ()\n {\n if (this.isPlaying)\n {\n this._reverse = !this._reverse;\n\n this.forward = !this.forward;\n }\n\n return this.parent;\n },\n\n /**\n * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos.\n * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different\n * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does.\n *\n * @method Phaser.GameObjects.Components.Animation#getProgress\n * @since 3.4.0\n *\n * @return {number} The progress of the current animation, between 0 and 1.\n */\n getProgress: function ()\n {\n var p = this.currentFrame.progress;\n\n if (!this.forward)\n {\n p = 1 - p;\n }\n\n return p;\n },\n\n /**\n * Takes a value between 0 and 1 and uses it to set how far this animation is through playback.\n * Does not factor in repeats or yoyos, but does handle playing forwards or backwards.\n *\n * @method Phaser.GameObjects.Components.Animation#setProgress\n * @since 3.4.0\n *\n * @param {number} [value=0] - The progress value, between 0 and 1.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setProgress: function (value)\n {\n if (!this.forward)\n {\n value = 1 - value;\n }\n\n this.setCurrentFrame(this.currentAnim.getFrameByProgress(value));\n\n return this.parent;\n },\n\n /**\n * Handle the removal of an animation from the Animation Manager.\n *\n * @method Phaser.GameObjects.Components.Animation#remove\n * @since 3.0.0\n *\n * @param {string} [key] - The key of the removed Animation.\n * @param {Phaser.Animations.Animation} [animation] - The removed Animation.\n */\n remove: function (key, animation)\n {\n if (animation === undefined) { animation = this.currentAnim; }\n\n if (this.isPlaying && animation.key === this.currentAnim.key)\n {\n this.stop();\n\n this.setCurrentFrame(this.currentAnim.frames[0]);\n }\n },\n\n /**\n * Gets the number of times that the animation will repeat\n * after its first iteration. For example, if returns 1, the animation will\n * play a total of twice (the initial play plus 1 repeat).\n * A value of -1 means the animation will repeat indefinitely.\n *\n * @method Phaser.GameObjects.Components.Animation#getRepeat\n * @since 3.4.0\n *\n * @return {integer} The number of times that the animation will repeat.\n */\n getRepeat: function ()\n {\n return this._repeat;\n },\n\n /**\n * Sets the number of times that the animation should repeat\n * after its first iteration. For example, if repeat is 1, the animation will\n * play a total of twice (the initial play plus 1 repeat).\n * To repeat indefinitely, use -1. repeat should always be an integer.\n *\n * @method Phaser.GameObjects.Components.Animation#setRepeat\n * @since 3.4.0\n *\n * @param {integer} value - The number of times that the animation should repeat.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setRepeat: function (value)\n {\n this._repeat = value;\n\n this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value;\n\n return this.parent;\n },\n\n /**\n * Gets the amount of delay between repeats, if any.\n *\n * @method Phaser.GameObjects.Components.Animation#getRepeatDelay\n * @since 3.4.0\n *\n * @return {number} The delay between repeats.\n */\n getRepeatDelay: function ()\n {\n return this._repeatDelay;\n },\n\n /**\n * Sets the amount of time in seconds between repeats.\n * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially,\n * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds\n * before doing its final repeat.\n *\n * @method Phaser.GameObjects.Components.Animation#setRepeatDelay\n * @since 3.4.0\n *\n * @param {number} value - The delay to wait between repeats, in seconds.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setRepeatDelay: function (value)\n {\n this._repeatDelay = value;\n\n return this.parent;\n },\n\n /**\n * Restarts the current animation from its beginning, optionally including its delay value.\n *\n * @method Phaser.GameObjects.Components.Animation#restart\n * @fires Phaser.Animations.Events#ANIMATION_RESTART\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\n * @since 3.0.0\n *\n * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n restart: function (includeDelay)\n {\n if (includeDelay === undefined) { includeDelay = false; }\n\n var anim = this.currentAnim;\n\n anim.getFirstTick(this, includeDelay);\n\n this.forward = true;\n this.isPlaying = true;\n this.pendingRepeat = false;\n this._paused = false;\n\n // Set frame\n this.updateFrame(anim.frames[0]);\n\n var gameObject = this.parent;\n var frame = this.currentFrame;\n\n anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject);\n\n return this.parent;\n },\n\n /**\n * Immediately stops the current animation from playing and dispatches the `animationcomplete` event.\n *\n * If no animation is set, no event will be dispatched.\n *\n * If there is another animation queued (via the `chain` method) then it will start playing immediately.\n *\n * @method Phaser.GameObjects.Components.Animation#stop\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.0.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stop: function ()\n {\n this._pendingStop = 0;\n\n this.isPlaying = false;\n\n var gameObject = this.parent;\n var anim = this.currentAnim;\n var frame = this.currentFrame;\n\n if (anim)\n {\n anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject);\n }\n\n if (this.nextAnim)\n {\n var key = this.nextAnim;\n\n this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null;\n\n this.play(key);\n }\n\n return gameObject;\n },\n\n /**\n * Stops the current animation from playing after the specified time delay, given in milliseconds.\n *\n * @method Phaser.GameObjects.Components.Animation#stopAfterDelay\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @param {integer} delay - The number of milliseconds to wait before stopping this animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopAfterDelay: function (delay)\n {\n this._pendingStop = 1;\n this._pendingStopValue = delay;\n\n return this.parent;\n },\n\n /**\n * Stops the current animation from playing when it next repeats.\n *\n * @method Phaser.GameObjects.Components.Animation#stopOnRepeat\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopOnRepeat: function ()\n {\n this._pendingStop = 2;\n\n return this.parent;\n },\n\n /**\n * Stops the current animation from playing when it next sets the given frame.\n * If this frame doesn't exist within the animation it will not stop it from playing.\n *\n * @method Phaser.GameObjects.Components.Animation#stopOnFrame\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopOnFrame: function (frame)\n {\n this._pendingStop = 3;\n this._pendingStopValue = frame;\n\n return this.parent;\n },\n\n /**\n * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default.\n * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc.\n *\n * @method Phaser.GameObjects.Components.Animation#setTimeScale\n * @since 3.4.0\n *\n * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setTimeScale: function (value)\n {\n if (value === undefined) { value = 1; }\n\n this._timeScale = value;\n\n return this.parent;\n },\n\n /**\n * Gets the Time Scale factor.\n *\n * @method Phaser.GameObjects.Components.Animation#getTimeScale\n * @since 3.4.0\n *\n * @return {number} The Time Scale value.\n */\n getTimeScale: function ()\n {\n return this._timeScale;\n },\n\n /**\n * Returns the total number of frames in this animation.\n *\n * @method Phaser.GameObjects.Components.Animation#getTotalFrames\n * @since 3.4.0\n *\n * @return {integer} The total number of frames in this animation.\n */\n getTotalFrames: function ()\n {\n return this.currentAnim.frames.length;\n },\n\n /**\n * The internal update loop for the Animation Component.\n *\n * @method Phaser.GameObjects.Components.Animation#update\n * @since 3.0.0\n *\n * @param {number} time - The current timestamp.\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\n */\n update: function (time, delta)\n {\n if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused)\n {\n return;\n }\n\n this.accumulator += delta * this._timeScale;\n\n if (this._pendingStop === 1)\n {\n this._pendingStopValue -= delta;\n\n if (this._pendingStopValue <= 0)\n {\n return this.currentAnim.completeAnimation(this);\n }\n }\n\n if (this.accumulator >= this.nextTick)\n {\n this.currentAnim.setFrame(this);\n }\n },\n\n /**\n * Sets the given Animation Frame as being the current frame\n * and applies it to the parent Game Object, adjusting its size and origin as needed.\n *\n * @method Phaser.GameObjects.Components.Animation#setCurrentFrame\n * @since 3.4.0\n *\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n setCurrentFrame: function (animationFrame)\n {\n var gameObject = this.parent;\n\n this.currentFrame = animationFrame;\n\n gameObject.texture = animationFrame.frame.texture;\n gameObject.frame = animationFrame.frame;\n\n if (gameObject.isCropped)\n {\n gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY);\n }\n\n gameObject.setSizeToFrame();\n\n if (gameObject._originComponent)\n {\n if (animationFrame.frame.customPivot)\n {\n gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY);\n }\n else\n {\n gameObject.updateDisplayOrigin();\n }\n }\n\n return gameObject;\n },\n\n /**\n * Internal frame change handler.\n *\n * @method Phaser.GameObjects.Components.Animation#updateFrame\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\n * @private\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to.\n */\n updateFrame: function (animationFrame)\n {\n var gameObject = this.setCurrentFrame(animationFrame);\n\n if (this.isPlaying)\n {\n if (animationFrame.setAlpha)\n {\n gameObject.alpha = animationFrame.alpha;\n }\n\n var anim = this.currentAnim;\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject);\n\n if (this._pendingStop === 3 && this._pendingStopValue === animationFrame)\n {\n this.currentAnim.completeAnimation(this);\n }\n }\n },\n\n /**\n * Advances the animation to the next frame, regardless of the time or animation state.\n * If the animation is set to repeat, or yoyo, this will still take effect.\n *\n * Calling this does not change the direction of the animation. I.e. if it was currently\n * playing in reverse, calling this method doesn't then change the direction to forwards.\n *\n * @method Phaser.GameObjects.Components.Animation#nextFrame\n * @since 3.16.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n nextFrame: function ()\n {\n if (this.currentAnim)\n {\n this.currentAnim.nextFrame(this);\n }\n\n return this.parent;\n },\n\n /**\n * Advances the animation to the previous frame, regardless of the time or animation state.\n * If the animation is set to repeat, or yoyo, this will still take effect.\n *\n * Calling this does not change the direction of the animation. I.e. if it was currently\n * playing in forwards, calling this method doesn't then change the direction to backwards.\n *\n * @method Phaser.GameObjects.Components.Animation#previousFrame\n * @since 3.16.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n previousFrame: function ()\n {\n if (this.currentAnim)\n {\n this.currentAnim.previousFrame(this);\n }\n\n return this.parent;\n },\n\n /**\n * Sets if the current Animation will yoyo when it reaches the end.\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\n *\n * @method Phaser.GameObjects.Components.Animation#setYoyo\n * @since 3.4.0\n *\n * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n setYoyo: function (value)\n {\n if (value === undefined) { value = false; }\n\n this._yoyo = value;\n\n return this.parent;\n },\n\n /**\n * Gets if the current Animation will yoyo when it reaches the end.\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\n *\n * @method Phaser.GameObjects.Components.Animation#getYoyo\n * @since 3.4.0\n *\n * @return {boolean} `true` if the animation is set to yoyo, `false` if not.\n */\n getYoyo: function ()\n {\n return this._yoyo;\n },\n\n /**\n * Destroy this Animation component.\n *\n * Unregisters event listeners and cleans up its references.\n *\n * @method Phaser.GameObjects.Components.Animation#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this);\n\n this.animationManager = null;\n this.parent = null;\n this.nextAnimsQueue.length = 0;\n\n this.currentAnim = null;\n this.currentFrame = null;\n }\n\n});\n\nmodule.exports = Animation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BlendModes = require('../../renderer/BlendModes');\n\n/**\n * Provides methods used for setting the blend mode of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.BlendMode\n * @since 3.0.0\n */\n\nvar BlendMode = {\n\n /**\n * Private internal value. Holds the current blend mode.\n * \n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\n * @type {integer}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _blendMode: BlendModes.NORMAL,\n\n /**\n * Sets the Blend Mode being used by this Game Object.\n *\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\n *\n * Under WebGL only the following Blend Modes are available:\n *\n * * ADD\n * * MULTIPLY\n * * SCREEN\n * * ERASE\n *\n * Canvas has more available depending on browser support.\n *\n * You can also create your own custom Blend Modes in WebGL.\n *\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\n * are used.\n *\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\n * @type {(Phaser.BlendModes|string)}\n * @since 3.0.0\n */\n blendMode: {\n\n get: function ()\n {\n return this._blendMode;\n },\n\n set: function (value)\n {\n if (typeof value === 'string')\n {\n value = BlendModes[value];\n }\n\n value |= 0;\n\n if (value >= -1)\n {\n this._blendMode = value;\n }\n }\n\n },\n\n /**\n * Sets the Blend Mode being used by this Game Object.\n *\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\n *\n * Under WebGL only the following Blend Modes are available:\n *\n * * ADD\n * * MULTIPLY\n * * SCREEN\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\n *\n * Canvas has more available depending on browser support.\n *\n * You can also create your own custom Blend Modes in WebGL.\n *\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\n * are used.\n *\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\n * @since 3.0.0\n *\n * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST.\n *\n * @return {this} This Game Object instance.\n */\n setBlendMode: function (value)\n {\n this.blendMode = value;\n\n return this;\n }\n\n};\n\nmodule.exports = BlendMode;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.ComputedSize\n * @since 3.0.0\n */\n\nvar ComputedSize = {\n\n /**\n * The native (un-scaled) width of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayWidth` property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#width\n * @type {number}\n * @since 3.0.0\n */\n width: 0,\n\n /**\n * The native (un-scaled) height of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayHeight` property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#height\n * @type {number}\n * @since 3.0.0\n */\n height: 0,\n\n /**\n * The displayed width of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\n * @type {number}\n * @since 3.0.0\n */\n displayWidth: {\n\n get: function ()\n {\n return this.scaleX * this.width;\n },\n\n set: function (value)\n {\n this.scaleX = value / this.width;\n }\n\n },\n\n /**\n * The displayed height of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\n * @type {number}\n * @since 3.0.0\n */\n displayHeight: {\n\n get: function ()\n {\n return this.scaleY * this.height;\n },\n\n set: function (value)\n {\n this.scaleY = value / this.height;\n }\n\n },\n\n /**\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.ComputedSize#setSize\n * @since 3.4.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setSize: function (width, height)\n {\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Sets the display size of this Game Object.\n * \n * Calling this will adjust the scale.\n * \n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\n * @since 3.4.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDisplaySize: function (width, height)\n {\n this.displayWidth = width;\n this.displayHeight = height;\n\n return this;\n }\n\n};\n\nmodule.exports = ComputedSize;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Crop\n * @since 3.12.0\n */\n\nvar Crop = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Crop#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Crop#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * A boolean flag indicating if this Game Object is being cropped or not.\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\n *\n * @name Phaser.GameObjects.Components.Crop#isCropped\n * @type {boolean}\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\n * \n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\n * \n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\n * changes what is shown when rendered.\n * \n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\n * \n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\n * \n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\n * \n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\n * \n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\n * \n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\n * the renderer to skip several internal calculations.\n *\n * @method Phaser.GameObjects.Components.Crop#setCrop\n * @since 3.11.0\n *\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\n * @param {number} [y] - The y coordinate to start the crop from.\n * @param {number} [width] - The width of the crop rectangle in pixels.\n * @param {number} [height] - The height of the crop rectangle in pixels.\n *\n * @return {this} This Game Object instance.\n */\n setCrop: function (x, y, width, height)\n {\n if (x === undefined)\n {\n this.isCropped = false;\n }\n else if (this.frame)\n {\n if (typeof x === 'number')\n {\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\n }\n else\n {\n var rect = x;\n\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\n }\n\n this.isCropped = true;\n }\n\n return this;\n },\n\n /**\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\n *\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\n * @private\n * @since 3.12.0\n * \n * @return {object} The crop object.\n */\n resetCropObject: function ()\n {\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\n }\n\n};\n\nmodule.exports = Crop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the depth of a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Depth\n * @since 3.0.0\n */\n\nvar Depth = {\n\n /**\n * Private internal value. Holds the depth of the Game Object.\n * \n * @name Phaser.GameObjects.Components.Depth#_depth\n * @type {integer}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _depth: 0,\n\n /**\n * The depth of this Game Object within the Scene.\n * \n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\n * of Game Objects, without actually moving their position in the display list.\n *\n * The default depth is zero. A Game Object with a higher depth\n * value will always render in front of one with a lower value.\n *\n * Setting the depth will queue a depth sort event within the Scene.\n * \n * @name Phaser.GameObjects.Components.Depth#depth\n * @type {number}\n * @since 3.0.0\n */\n depth: {\n\n get: function ()\n {\n return this._depth;\n },\n\n set: function (value)\n {\n this.scene.sys.queueDepthSort();\n this._depth = value;\n }\n\n },\n\n /**\n * The depth of this Game Object within the Scene.\n * \n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\n * of Game Objects, without actually moving their position in the display list.\n *\n * The default depth is zero. A Game Object with a higher depth\n * value will always render in front of one with a lower value.\n *\n * Setting the depth will queue a depth sort event within the Scene.\n * \n * @method Phaser.GameObjects.Components.Depth#setDepth\n * @since 3.0.0\n *\n * @param {integer} value - The depth of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDepth: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.depth = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Depth;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for visually flipping a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Flip\n * @since 3.0.0\n */\n\nvar Flip = {\n\n /**\n * The horizontally flipped state of the Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @name Phaser.GameObjects.Components.Flip#flipX\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n flipX: false,\n\n /**\n * The vertically flipped state of the Game Object.\n * \n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @name Phaser.GameObjects.Components.Flip#flipY\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n flipY: false,\n\n /**\n * Toggles the horizontal flipped state of this Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\n * @since 3.0.0\n * \n * @return {this} This Game Object instance.\n */\n toggleFlipX: function ()\n {\n this.flipX = !this.flipX;\n\n return this;\n },\n\n /**\n * Toggles the vertical flipped state of this Game Object.\n * \n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\n * @since 3.0.0\n * \n * @return {this} This Game Object instance.\n */\n toggleFlipY: function ()\n {\n this.flipY = !this.flipY;\n\n return this;\n },\n\n /**\n * Sets the horizontal flipped state of this Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlipX\n * @since 3.0.0\n *\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlipX: function (value)\n {\n this.flipX = value;\n\n return this;\n },\n\n /**\n * Sets the vertical flipped state of this Game Object.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlipY\n * @since 3.0.0\n *\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlipY: function (value)\n {\n this.flipY = value;\n\n return this;\n },\n\n /**\n * Sets the horizontal and vertical flipped state of this Game Object.\n * \n * A Game Object that is flipped will render inversed on the flipped axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlip\n * @since 3.0.0\n *\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlip: function (x, y)\n {\n this.flipX = x;\n this.flipY = y;\n\n return this;\n },\n\n /**\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\n * \n * @method Phaser.GameObjects.Components.Flip#resetFlip\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n resetFlip: function ()\n {\n this.flipX = false;\n this.flipY = false;\n\n return this;\n }\n\n};\n\nmodule.exports = Flip;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Rectangle = require('../../geom/rectangle/Rectangle');\nvar RotateAround = require('../../math/RotateAround');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * Provides methods used for obtaining the bounds of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.GetBounds\n * @since 3.0.0\n */\n\nvar GetBounds = {\n\n /**\n * Processes the bounds output vector before returning it.\n *\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\n * @private\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n prepareBoundsOutput: function (output, includeParent)\n {\n if (includeParent === undefined) { includeParent = false; }\n\n if (this.rotation !== 0)\n {\n RotateAround(output, this.x, this.y, this.rotation);\n }\n\n if (includeParent && this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n\n parentMatrix.transformPoint(output.x, output.y, output);\n }\n\n return output;\n },\n\n /**\n * Gets the center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getCenter: function (output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\n\n return output;\n },\n\n /**\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopLeft: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the top-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopRight: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the left-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getLeftCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the right-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getRightCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomLeft: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomRight: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bounds of this Game Object, regardless of origin.\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\n *\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\n *\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\n */\n getBounds: function (output)\n {\n if (output === undefined) { output = new Rectangle(); }\n\n // We can use the output object to temporarily store the x/y coords in:\n\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\n\n // Instead of doing a check if parent container is \n // defined per corner we only do it once.\n if (this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n\n this.getTopLeft(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n TLx = output.x;\n TLy = output.y;\n\n this.getTopRight(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n TRx = output.x;\n TRy = output.y;\n\n this.getBottomLeft(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n BLx = output.x;\n BLy = output.y;\n\n this.getBottomRight(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n BRx = output.x;\n BRy = output.y;\n }\n else\n {\n this.getTopLeft(output);\n\n TLx = output.x;\n TLy = output.y;\n\n this.getTopRight(output);\n\n TRx = output.x;\n TRy = output.y;\n\n this.getBottomLeft(output);\n\n BLx = output.x;\n BLy = output.y;\n\n this.getBottomRight(output);\n\n BRx = output.x;\n BRy = output.y;\n }\n\n output.x = Math.min(TLx, TRx, BLx, BRx);\n output.y = Math.min(TLy, TRy, BLy, BRy);\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\n\n return output;\n }\n\n};\n\nmodule.exports = GetBounds;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BitmapMask = require('../../display/mask/BitmapMask');\nvar GeometryMask = require('../../display/mask/GeometryMask');\n\n/**\n * Provides methods used for getting and setting the mask of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Mask\n * @since 3.0.0\n */\n\nvar Mask = {\n\n /**\n * The Mask this Game Object is using during render.\n *\n * @name Phaser.GameObjects.Components.Mask#mask\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\n * @since 3.0.0\n */\n mask: null,\n\n /**\n * Sets the mask that this Game Object will use to render with.\n *\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\n *\n * If a mask is already set on this Game Object it will be immediately replaced.\n * \n * Masks are positioned in global space and are not relative to the Game Object to which they\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\n * \n * Masks have no impact on physics or input detection. They are purely a rendering component\n * that allows you to limit what is visible during the render pass.\n *\n * @method Phaser.GameObjects.Components.Mask#setMask\n * @since 3.6.2\n *\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\n *\n * @return {this} This Game Object instance.\n */\n setMask: function (mask)\n {\n this.mask = mask;\n\n return this;\n },\n\n /**\n * Clears the mask that this Game Object was using.\n *\n * @method Phaser.GameObjects.Components.Mask#clearMask\n * @since 3.6.2\n *\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\n *\n * @return {this} This Game Object instance.\n */\n clearMask: function (destroyMask)\n {\n if (destroyMask === undefined) { destroyMask = false; }\n\n if (destroyMask && this.mask)\n {\n this.mask.destroy();\n }\n\n this.mask = null;\n\n return this;\n },\n\n /**\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\n * including this one.\n *\n * To create the mask you need to pass in a reference to a renderable Game Object.\n * A renderable Game Object is one that uses a texture to render with, such as an\n * Image, Sprite, Render Texture or BitmapText.\n *\n * If you do not provide a renderable object, and this Game Object has a texture,\n * it will use itself as the object. This means you can call this method to create\n * a Bitmap Mask from any renderable Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n * \n * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (renderable)\n {\n if (renderable === undefined && (this.texture || this.shader))\n {\n // eslint-disable-next-line consistent-this\n renderable = this;\n }\n\n return new BitmapMask(this.scene, renderable);\n },\n\n /**\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\n * including this one.\n *\n * To create the mask you need to pass in a reference to a Graphics Game Object.\n *\n * If you do not provide a graphics object, and this Game Object is an instance\n * of a Graphics object, then it will use itself to create the mask.\n * \n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\n * @since 3.6.2\n * \n * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask.\n *\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\n */\n createGeometryMask: function (graphics)\n {\n if (graphics === undefined && this.type === 'Graphics')\n {\n // eslint-disable-next-line consistent-this\n graphics = this;\n }\n\n return new GeometryMask(this.scene, graphics);\n }\n\n};\n\nmodule.exports = Mask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the origin of a Game Object.\n * Values are normalized, given in the range 0 to 1.\n * Display values contain the calculated pixel values.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Origin\n * @since 3.0.0\n */\n\nvar Origin = {\n\n /**\n * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Origin#_originComponent\n * @type {boolean}\n * @private\n * @default true\n * @since 3.2.0\n */\n _originComponent: true,\n\n /**\n * The horizontal origin of this Game Object.\n * The origin maps the relationship between the size and position of the Game Object.\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\n * Setting the value to 0 means the position now relates to the left of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Origin#originX\n * @type {number}\n * @default 0.5\n * @since 3.0.0\n */\n originX: 0.5,\n\n /**\n * The vertical origin of this Game Object.\n * The origin maps the relationship between the size and position of the Game Object.\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\n * Setting the value to 0 means the position now relates to the top of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Origin#originY\n * @type {number}\n * @default 0.5\n * @since 3.0.0\n */\n originY: 0.5,\n\n // private + read only\n _displayOriginX: 0,\n _displayOriginY: 0,\n\n /**\n * The horizontal display origin of this Game Object.\n * The origin is a normalized value between 0 and 1.\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\n *\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\n * @type {number}\n * @since 3.0.0\n */\n displayOriginX: {\n\n get: function ()\n {\n return this._displayOriginX;\n },\n\n set: function (value)\n {\n this._displayOriginX = value;\n this.originX = value / this.width;\n }\n\n },\n\n /**\n * The vertical display origin of this Game Object.\n * The origin is a normalized value between 0 and 1.\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\n *\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\n * @type {number}\n * @since 3.0.0\n */\n displayOriginY: {\n\n get: function ()\n {\n return this._displayOriginY;\n },\n\n set: function (value)\n {\n this._displayOriginY = value;\n this.originY = value / this.height;\n }\n\n },\n\n /**\n * Sets the origin of this Game Object.\n *\n * The values are given in the range 0 to 1.\n *\n * @method Phaser.GameObjects.Components.Origin#setOrigin\n * @since 3.0.0\n *\n * @param {number} [x=0.5] - The horizontal origin value.\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\n *\n * @return {this} This Game Object instance.\n */\n setOrigin: function (x, y)\n {\n if (x === undefined) { x = 0.5; }\n if (y === undefined) { y = x; }\n\n this.originX = x;\n this.originY = y;\n\n return this.updateDisplayOrigin();\n },\n\n /**\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\n *\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n setOriginFromFrame: function ()\n {\n if (!this.frame || !this.frame.customPivot)\n {\n return this.setOrigin();\n }\n else\n {\n this.originX = this.frame.pivotX;\n this.originY = this.frame.pivotY;\n }\n\n return this.updateDisplayOrigin();\n },\n\n /**\n * Sets the display origin of this Game Object.\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\n *\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\n * @since 3.0.0\n *\n * @param {number} [x=0] - The horizontal display origin value.\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\n *\n * @return {this} This Game Object instance.\n */\n setDisplayOrigin: function (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n this.displayOriginX = x;\n this.displayOriginY = y;\n\n return this;\n },\n\n /**\n * Updates the Display Origin cached values internally stored on this Game Object.\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\n *\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n updateDisplayOrigin: function ()\n {\n this._displayOriginX = this.originX * this.width;\n this._displayOriginY = this.originY * this.height;\n\n return this;\n }\n\n};\n\nmodule.exports = Origin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DegToRad = require('../../math/DegToRad');\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\nvar GetValue = require('../../utils/object/GetValue');\nvar TWEEN_CONST = require('../../tweens/tween/const');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * Provides methods used for managing a Game Object following a Path.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.PathFollower\n * @since 3.17.0\n */\n\nvar PathFollower = {\n\n /**\n * The Path this PathFollower is following. It can only follow one Path at a time.\n *\n * @name Phaser.GameObjects.Components.PathFollower#path\n * @type {Phaser.Curves.Path}\n * @since 3.0.0\n */\n path: null,\n\n /**\n * Should the PathFollower automatically rotate to point in the direction of the Path?\n *\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n rotateToPath: false,\n\n /**\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\n * the angle of the rotation as well.\n *\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n pathRotationOffset: 0,\n\n /**\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\n * Path coordinates.\n *\n * @name Phaser.GameObjects.PathFollower#pathOffset\n * @type {Phaser.Math.Vector2}\n * @since 3.0.0\n */\n pathOffset: null,\n\n /**\n * A Vector2 that stores the current point of the path the follower is on.\n *\n * @name Phaser.GameObjects.PathFollower#pathVector\n * @type {Phaser.Math.Vector2}\n * @since 3.0.0\n */\n pathVector: null,\n\n /**\n * The distance the follower has traveled from the previous point to the current one, at the last update.\n *\n * @name Phaser.GameObjects.PathFollower#pathDelta\n * @type {Phaser.Math.Vector2}\n * @since 3.23.0\n */\n pathDelta: null,\n\n /**\n * The Tween used for following the Path.\n *\n * @name Phaser.GameObjects.PathFollower#pathTween\n * @type {Phaser.Tweens.Tween}\n * @since 3.0.0\n */\n pathTween: null,\n\n /**\n * Settings for the PathFollower.\n *\n * @name Phaser.GameObjects.PathFollower#pathConfig\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\n * @default null\n * @since 3.0.0\n */\n pathConfig: null,\n\n /**\n * Records the direction of the follower so it can change direction.\n *\n * @name Phaser.GameObjects.PathFollower#_prevDirection\n * @type {integer}\n * @private\n * @since 3.0.0\n */\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\n\n /**\n * Set the Path that this PathFollower should follow.\n *\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\n *\n * @method Phaser.GameObjects.Components.PathFollower#setPath\n * @since 3.0.0\n *\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\n *\n * @return {this} This Game Object.\n */\n setPath: function (path, config)\n {\n if (config === undefined) { config = this.pathConfig; }\n\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n this.path = path;\n\n if (config)\n {\n this.startFollow(config);\n }\n\n return this;\n },\n\n /**\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\n *\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\n * @since 3.0.0\n *\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\n * @param {number} [offset=0] - Rotation offset in degrees.\n *\n * @return {this} This Game Object.\n */\n setRotateToPath: function (value, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.rotateToPath = value;\n\n this.pathRotationOffset = offset;\n\n return this;\n },\n\n /**\n * Is this PathFollower actively following a Path or not?\n *\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\n *\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\n * @since 3.0.0\n *\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\n */\n isFollowing: function ()\n {\n var tween = this.pathTween;\n\n return (tween && tween.isPlaying());\n },\n\n /**\n * Starts this PathFollower following its given Path.\n *\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\n * @since 3.3.0\n *\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n startFollow: function (config, startAt)\n {\n if (config === undefined) { config = {}; }\n if (startAt === undefined) { startAt = 0; }\n\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n if (typeof config === 'number')\n {\n config = { duration: config };\n }\n\n // Override in case they've been specified in the config\n config.from = GetValue(config, 'from', 0);\n config.to = GetValue(config, 'to', 1);\n\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\n\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\n\n // This works, but it's not an ideal way of doing it as the follower jumps position\n var seek = GetValue(config, 'startAt', startAt);\n\n if (seek)\n {\n config.onStart = function (tween)\n {\n var tweenData = tween.data[0];\n tweenData.progress = seek;\n tweenData.elapsed = tweenData.duration * seek;\n var v = tweenData.ease(tweenData.progress);\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\n tweenData.target[tweenData.key] = tweenData.current;\n };\n }\n\n if (!this.pathOffset)\n {\n this.pathOffset = new Vector2(this.x, this.y);\n }\n\n if (!this.pathVector)\n {\n this.pathVector = new Vector2();\n }\n\n if (!this.pathDelta)\n {\n this.pathDelta = new Vector2();\n }\n\n this.pathDelta.reset();\n\n this.pathTween = this.scene.sys.tweens.addCounter(config);\n\n // The starting point of the path, relative to this follower\n this.path.getStartPoint(this.pathOffset);\n\n if (positionOnPath)\n {\n this.x = this.pathOffset.x;\n this.y = this.pathOffset.y;\n }\n\n this.pathOffset.x = this.x - this.pathOffset.x;\n this.pathOffset.y = this.y - this.pathOffset.y;\n\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\n\n if (this.rotateToPath)\n {\n // Set the rotation now (in case the tween has a delay on it, etc)\n var nextPoint = this.path.getPoint(0.1);\n\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\n }\n\n this.pathConfig = config;\n\n return this;\n },\n\n /**\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\n * point on the Path at which you paused it.\n *\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n pauseFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.pause();\n }\n\n return this;\n },\n\n /**\n * Resumes a previously paused PathFollower.\n *\n * If the PathFollower was not paused this has no effect.\n *\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n resumeFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPaused())\n {\n tween.resume();\n }\n\n return this;\n },\n\n /**\n * Stops this PathFollower from following the path any longer.\n *\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\n *\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n stopFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n return this;\n },\n\n /**\n * Internal update handler that advances this PathFollower along the path.\n *\n * Called automatically by the Scene step, should not typically be called directly.\n *\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\n * @since 3.17.0\n */\n pathUpdate: function ()\n {\n var tween = this.pathTween;\n\n if (tween)\n {\n var tweenData = tween.data[0];\n var pathDelta = this.pathDelta;\n var pathVector = this.pathVector;\n\n pathDelta.copy(pathVector).negate();\n\n if (tweenData.state === TWEEN_CONST.COMPLETE)\n {\n this.path.getPoint(1, pathVector);\n\n pathDelta.add(pathVector);\n pathVector.add(this.pathOffset);\n\n this.setPosition(pathVector.x, pathVector.y);\n\n return;\n }\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\n {\n // If delayed, etc then bail out\n return;\n }\n\n this.path.getPoint(tween.getValue(), pathVector);\n\n pathDelta.add(pathVector);\n pathVector.add(this.pathOffset);\n\n var oldX = this.x;\n var oldY = this.y;\n\n this.setPosition(pathVector.x, pathVector.y);\n\n var speedX = this.x - oldX;\n var speedY = this.y - oldY;\n\n if (speedX === 0 && speedY === 0)\n {\n // Bail out early\n return;\n }\n\n if (tweenData.state !== this._prevDirection)\n {\n // We've changed direction, so don't do a rotate this frame\n this._prevDirection = tweenData.state;\n\n return;\n }\n\n if (this.rotateToPath)\n {\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\n }\n }\n }\n\n};\n\nmodule.exports = PathFollower;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Pipeline\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Pipeline = {\n\n /**\n * The initial WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n defaultPipeline: null,\n\n /**\n * The current WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n pipeline: null,\n\n /**\n * Sets the initial WebGL Pipeline of this Game Object.\n *\n * This should only be called during the instantiation of the Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipelineName)\n {\n if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; }\n\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.defaultPipeline = renderer.getPipeline(pipelineName);\n this.pipeline = this.defaultPipeline;\n\n return true;\n }\n\n return false;\n },\n\n /**\n * Sets the active WebGL Pipeline of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} pipelineName - The name of the pipeline to set on this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipelineName)\n {\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.pipeline = renderer.getPipeline(pipelineName);\n }\n\n return this;\n },\n\n /**\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n resetPipeline: function ()\n {\n this.pipeline = this.defaultPipeline;\n\n return (this.pipeline !== null);\n },\n\n /**\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\n * @webglOnly\n * @since 3.0.0\n *\n * @return {string} The string-based name of the pipeline being used by this Game Object.\n */\n getPipelineName: function ()\n {\n return this.pipeline.name;\n }\n\n};\n\nmodule.exports = Pipeline;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.ScrollFactor\n * @since 3.0.0\n */\n\nvar ScrollFactor = {\n\n /**\n * The horizontal scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scrollFactorX: 1,\n\n /**\n * The vertical scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scrollFactorY: 1,\n\n /**\n * Sets the scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scroll factor of this Game Object.\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScrollFactor: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.scrollFactorX = x;\n this.scrollFactorY = y;\n\n return this;\n }\n\n};\n\nmodule.exports = ScrollFactor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the size of a Game Object.\n * \n * @namespace Phaser.GameObjects.Components.Size\n * @since 3.0.0\n */\n\nvar Size = {\n\n /**\n * A property indicating that a Game Object has this component.\n * \n * @name Phaser.GameObjects.Components.Size#_sizeComponent\n * @type {boolean}\n * @private\n * @default true\n * @since 3.2.0\n */\n _sizeComponent: true,\n\n /**\n * The native (un-scaled) width of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayWidth` property.\n * \n * @name Phaser.GameObjects.Components.Size#width\n * @type {number}\n * @since 3.0.0\n */\n width: 0,\n\n /**\n * The native (un-scaled) height of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayHeight` property.\n * \n * @name Phaser.GameObjects.Components.Size#height\n * @type {number}\n * @since 3.0.0\n */\n height: 0,\n\n /**\n * The displayed width of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.Size#displayWidth\n * @type {number}\n * @since 3.0.0\n */\n displayWidth: {\n\n get: function ()\n {\n return Math.abs(this.scaleX * this.frame.realWidth);\n },\n\n set: function (value)\n {\n this.scaleX = value / this.frame.realWidth;\n }\n\n },\n\n /**\n * The displayed height of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.Size#displayHeight\n * @type {number}\n * @since 3.0.0\n */\n displayHeight: {\n\n get: function ()\n {\n return Math.abs(this.scaleY * this.frame.realHeight);\n },\n\n set: function (value)\n {\n this.scaleY = value / this.frame.realHeight;\n }\n\n },\n\n /**\n * Sets the size of this Game Object to be that of the given Frame.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on.\n * \n * @return {this} This Game Object instance.\n */\n setSizeToFrame: function (frame)\n {\n if (frame === undefined) { frame = this.frame; }\n\n this.width = frame.realWidth;\n this.height = frame.realHeight;\n\n return this;\n },\n\n /**\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.Size#setSize\n * @since 3.0.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setSize: function (width, height)\n {\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Sets the display size of this Game Object.\n * \n * Calling this will adjust the scale.\n * \n * @method Phaser.GameObjects.Components.Size#setDisplaySize\n * @since 3.0.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDisplaySize: function (width, height)\n {\n this.displayWidth = width;\n this.displayHeight = height;\n\n return this;\n }\n\n};\n\nmodule.exports = Size;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 8; // 1000\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Texture\n * @since 3.0.0\n */\n\nvar Texture = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Texture#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Texture#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * Internal flag. Not to be set by this Game Object.\n *\n * @name Phaser.GameObjects.Components.Texture#isCropped\n * @type {boolean}\n * @private\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Sets the texture and frame this Game Object will use to render with.\n *\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\n *\n * @method Phaser.GameObjects.Components.Texture#setTexture\n * @since 3.0.0\n *\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\n *\n * @return {this} This Game Object instance.\n */\n setTexture: function (key, frame)\n {\n this.texture = this.scene.sys.textures.get(key);\n\n return this.setFrame(frame);\n },\n\n /**\n * Sets the frame this Game Object will use to render with.\n *\n * The Frame has to belong to the current Texture being used.\n *\n * It can be either a string or an index.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\n *\n * @method Phaser.GameObjects.Components.Texture#setFrame\n * @since 3.0.0\n *\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\n *\n * @return {this} This Game Object instance.\n */\n setFrame: function (frame, updateSize, updateOrigin)\n {\n if (updateSize === undefined) { updateSize = true; }\n if (updateOrigin === undefined) { updateOrigin = true; }\n\n this.frame = this.texture.get(frame);\n\n if (!this.frame.cutWidth || !this.frame.cutHeight)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n\n if (this._sizeComponent && updateSize)\n {\n this.setSizeToFrame();\n }\n\n if (this._originComponent && updateOrigin)\n {\n if (this.frame.customPivot)\n {\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\n }\n else\n {\n this.updateDisplayOrigin();\n }\n }\n\n return this;\n }\n\n};\n\nmodule.exports = Texture;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 8; // 1000\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.TextureCrop\n * @since 3.0.0\n */\n\nvar TextureCrop = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * A boolean flag indicating if this Game Object is being cropped or not.\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\n * @type {boolean}\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\n * \n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\n * \n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\n * changes what is shown when rendered.\n * \n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\n * \n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\n * \n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\n * \n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\n * \n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\n * \n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\n * the renderer to skip several internal calculations.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\n * @since 3.11.0\n *\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\n * @param {number} [y] - The y coordinate to start the crop from.\n * @param {number} [width] - The width of the crop rectangle in pixels.\n * @param {number} [height] - The height of the crop rectangle in pixels.\n *\n * @return {this} This Game Object instance.\n */\n setCrop: function (x, y, width, height)\n {\n if (x === undefined)\n {\n this.isCropped = false;\n }\n else if (this.frame)\n {\n if (typeof x === 'number')\n {\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\n }\n else\n {\n var rect = x;\n\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\n }\n\n this.isCropped = true;\n }\n\n return this;\n },\n\n /**\n * Sets the texture and frame this Game Object will use to render with.\n *\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\n * @since 3.0.0\n *\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\n *\n * @return {this} This Game Object instance.\n */\n setTexture: function (key, frame)\n {\n this.texture = this.scene.sys.textures.get(key);\n\n return this.setFrame(frame);\n },\n\n /**\n * Sets the frame this Game Object will use to render with.\n *\n * The Frame has to belong to the current Texture being used.\n *\n * It can be either a string or an index.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\n * @since 3.0.0\n *\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\n *\n * @return {this} This Game Object instance.\n */\n setFrame: function (frame, updateSize, updateOrigin)\n {\n if (updateSize === undefined) { updateSize = true; }\n if (updateOrigin === undefined) { updateOrigin = true; }\n\n this.frame = this.texture.get(frame);\n\n if (!this.frame.cutWidth || !this.frame.cutHeight)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n\n if (this._sizeComponent && updateSize)\n {\n this.setSizeToFrame();\n }\n\n if (this._originComponent && updateOrigin)\n {\n if (this.frame.customPivot)\n {\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\n }\n else\n {\n this.updateDisplayOrigin();\n }\n }\n\n if (this.isCropped)\n {\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\n }\n\n return this;\n },\n\n /**\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\n * @private\n * @since 3.12.0\n * \n * @return {object} The crop object.\n */\n resetCropObject: function ()\n {\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\n }\n\n};\n\nmodule.exports = TextureCrop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetColorFromValue = require('../../display/color/GetColorFromValue');\n\n/**\n * Provides methods used for setting the tint of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Tint\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Tint = {\n\n /**\n * Private internal value. Holds the top-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTL: 16777215,\n\n /**\n * Private internal value. Holds the top-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTR: 16777215,\n\n /**\n * Private internal value. Holds the bottom-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBL: 16777215,\n\n /**\n * Private internal value. Holds the bottom-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBR: 16777215,\n\n /**\n * Private internal value. Holds if the Game Object is tinted or not.\n *\n * @name Phaser.GameObjects.Components.Tint#_isTinted\n * @type {boolean}\n * @private\n * @default false\n * @since 3.11.0\n */\n _isTinted: false,\n\n /**\n * Fill or additive?\n *\n * @name Phaser.GameObjects.Components.Tint#tintFill\n * @type {boolean}\n * @default false\n * @since 3.11.0\n */\n tintFill: false,\n\n /**\n * Clears all tint values associated with this Game Object.\n *\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\n * which results in no visible change to the texture.\n *\n * @method Phaser.GameObjects.Components.Tint#clearTint\n * @webglOnly\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearTint: function ()\n {\n this.setTint(0xffffff);\n\n this._isTinted = false;\n\n return this;\n },\n\n /**\n * Sets an additive tint on this Game Object.\n *\n * The tint works by taking the pixel color values from the Game Objects texture, and then\n * multiplying it by the color value of the tint. You can provide either one color value,\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\n * per corner. The colors are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTint\n * @webglOnly\n * @since 3.0.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n if (topLeft === undefined) { topLeft = 0xffffff; }\n\n if (topRight === undefined)\n {\n topRight = topLeft;\n bottomLeft = topLeft;\n bottomRight = topLeft;\n }\n\n this._tintTL = GetColorFromValue(topLeft);\n this._tintTR = GetColorFromValue(topRight);\n this._tintBL = GetColorFromValue(bottomLeft);\n this._tintBR = GetColorFromValue(bottomRight);\n\n this._isTinted = true;\n\n this.tintFill = false;\n\n return this;\n },\n\n /**\n * Sets a fill-based tint on this Game Object.\n *\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\n * with those in the tint. You can use this for effects such as making a player flash 'white'\n * if hit by something. You can provide either one color value, in which case the whole\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\n * are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTintFill\n * @webglOnly\n * @since 3.11.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\n\n this.tintFill = true;\n\n return this;\n },\n\n /**\n * The tint value being applied to the top-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopLeft: {\n\n get: function ()\n {\n return this._tintTL;\n },\n\n set: function (value)\n {\n this._tintTL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the top-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopRight: {\n\n get: function ()\n {\n return this._tintTR;\n },\n\n set: function (value)\n {\n this._tintTR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomLeft: {\n\n get: function ()\n {\n return this._tintBL;\n },\n\n set: function (value)\n {\n this._tintBL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomRight: {\n\n get: function ()\n {\n return this._tintBR;\n },\n\n set: function (value)\n {\n this._tintBR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the whole of the Game Object.\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#tint\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tint: {\n\n set: function (value)\n {\n this.setTint(value, value, value, value);\n }\n },\n\n /**\n * Does this Game Object have a tint applied to it or not?\n *\n * @name Phaser.GameObjects.Components.Tint#isTinted\n * @type {boolean}\n * @webglOnly\n * @readonly\n * @since 3.11.0\n */\n isTinted: {\n\n get: function ()\n {\n return this._isTinted;\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Build a JSON representation of the given Game Object.\n *\n * This is typically extended further by Game Object specific implementations.\n *\n * @method Phaser.GameObjects.Components.ToJSON\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\nvar ToJSON = function (gameObject)\n{\n var out = {\n name: gameObject.name,\n type: gameObject.type,\n x: gameObject.x,\n y: gameObject.y,\n depth: gameObject.depth,\n scale: {\n x: gameObject.scaleX,\n y: gameObject.scaleY\n },\n origin: {\n x: gameObject.originX,\n y: gameObject.originY\n },\n flipX: gameObject.flipX,\n flipY: gameObject.flipY,\n rotation: gameObject.rotation,\n alpha: gameObject.alpha,\n visible: gameObject.visible,\n blendMode: gameObject.blendMode,\n textureKey: '',\n frameKey: '',\n data: {}\n };\n\n if (gameObject.texture)\n {\n out.textureKey = gameObject.texture.key;\n out.frameKey = gameObject.frame.name;\n }\n\n return out;\n};\n\nmodule.exports = ToJSON;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../../math/const');\nvar TransformMatrix = require('./TransformMatrix');\nvar TransformXY = require('../../math/TransformXY');\nvar WrapAngle = require('../../math/angle/Wrap');\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\nvar Vector2 = require('../../math/Vector2');\n\n// global bitmask flag for GameObject.renderMask (used by Scale)\nvar _FLAG = 4; // 0100\n\n/**\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Transform\n * @since 3.0.0\n */\n\nvar Transform = {\n\n /**\n * Private internal value. Holds the horizontal scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleX\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleX: 1,\n\n /**\n * Private internal value. Holds the vertical scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleY\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleY: 1,\n\n /**\n * Private internal value. Holds the rotation value in radians.\n *\n * @name Phaser.GameObjects.Components.Transform#_rotation\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _rotation: 0,\n\n /**\n * The x position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n x: 0,\n\n /**\n * The y position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n y: 0,\n\n /**\n * The z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\n *\n * @name Phaser.GameObjects.Components.Transform#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n z: 0,\n\n /**\n * The w position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n w: 0,\n\n /**\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\n *\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\n *\n * @name Phaser.GameObjects.Components.Transform#scale\n * @type {number}\n * @default 1\n * @since 3.18.0\n */\n scale: {\n\n get: function ()\n {\n return (this._scaleX + this._scaleY) / 2;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The horizontal scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The vertical scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The angle of this Game Object as expressed in degrees.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\n * and -90 is up.\n *\n * If you prefer to work in radians, see the `rotation` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#angle\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n angle: {\n\n get: function ()\n {\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\n },\n\n set: function (value)\n {\n // value is in degrees\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\n }\n },\n\n /**\n * The angle of this Game Object in radians.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\n * and -PI/2 is up.\n *\n * If you prefer to work in degrees, see the `angle` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#rotation\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n rotation: {\n\n get: function ()\n {\n return this._rotation;\n },\n\n set: function (value)\n {\n // value is in radians\n this._rotation = WrapAngle(value);\n }\n },\n\n /**\n * Sets the position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setPosition\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x position of this Game Object.\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\n * @param {number} [z=0] - The z position of this Game Object.\n * @param {number} [w=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPosition: function (x, y, z, w)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n if (z === undefined) { z = 0; }\n if (w === undefined) { w = 0; }\n\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n\n return this;\n },\n\n /**\n * Sets the position of this Game Object to be a random position within the confines of\n * the given area.\n *\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\n *\n * The position does not factor in the size of this Game Object, meaning that only the origin is\n * guaranteed to be within the area.\n *\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\n * @since 3.8.0\n *\n * @param {number} [x=0] - The x position of the top-left of the random area.\n * @param {number} [y=0] - The y position of the top-left of the random area.\n * @param {number} [width] - The width of the random area.\n * @param {number} [height] - The height of the random area.\n *\n * @return {this} This Game Object instance.\n */\n setRandomPosition: function (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = this.scene.sys.scale.width; }\n if (height === undefined) { height = this.scene.sys.scale.height; }\n\n this.x = x + (Math.random() * width);\n this.y = y + (Math.random() * height);\n\n return this;\n },\n\n /**\n * Sets the rotation of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setRotation\n * @since 3.0.0\n *\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\n *\n * @return {this} This Game Object instance.\n */\n setRotation: function (radians)\n {\n if (radians === undefined) { radians = 0; }\n\n this.rotation = radians;\n\n return this;\n },\n\n /**\n * Sets the angle of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setAngle\n * @since 3.0.0\n *\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\n *\n * @return {this} This Game Object instance.\n */\n setAngle: function (degrees)\n {\n if (degrees === undefined) { degrees = 0; }\n\n this.angle = degrees;\n\n return this;\n },\n\n /**\n * Sets the scale of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setScale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale of this Game Object.\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScale: function (x, y)\n {\n if (x === undefined) { x = 1; }\n if (y === undefined) { y = x; }\n\n this.scaleX = x;\n this.scaleY = y;\n\n return this;\n },\n\n /**\n * Sets the x position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setX\n * @since 3.0.0\n *\n * @param {number} [value=0] - The x position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setX: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.x = value;\n\n return this;\n },\n\n /**\n * Sets the y position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setY\n * @since 3.0.0\n *\n * @param {number} [value=0] - The y position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setY: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.y = value;\n\n return this;\n },\n\n /**\n * Sets the z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\n *\n * @method Phaser.GameObjects.Components.Transform#setZ\n * @since 3.0.0\n *\n * @param {number} [value=0] - The z position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setZ: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.z = value;\n\n return this;\n },\n\n /**\n * Sets the w position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setW\n * @since 3.0.0\n *\n * @param {number} [value=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setW: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.w = value;\n\n return this;\n },\n\n /**\n * Gets the local transform matrix for this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getLocalTransformMatrix: function (tempMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n },\n\n /**\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\n *\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\n\n var parent = this.parentContainer;\n\n if (!parent)\n {\n return this.getLocalTransformMatrix(tempMatrix);\n }\n\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n\n while (parent)\n {\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\n\n parentMatrix.multiply(tempMatrix, tempMatrix);\n\n parent = parent.parentContainer;\n }\n\n return tempMatrix;\n },\n\n /**\n * Takes the given `x` and `y` coordinates and converts them into local space for this\n * Game Object, taking into account parent and local transforms, and the Display Origin.\n *\n * The returned Vector2 contains the translated point in its properties.\n *\n * A Camera needs to be provided in order to handle modified scroll factors. If no\n * camera is specified, it will use the `main` camera from the Scene to which this\n * Game Object belongs.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\n * @since 3.50.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\n *\n * @return {Phaser.Math.Vector2} The translated point.\n */\n getLocalPoint: function (x, y, point, camera)\n {\n if (!point) { point = new Vector2(); }\n if (!camera) { camera = this.scene.sys.cameras.main; }\n\n var csx = camera.scrollX;\n var csy = camera.scrollY;\n\n var px = x + (csx * this.scrollFactorX) - csx;\n var py = y + (csy * this.scrollFactorY) - csy;\n\n if (this.parentContainer)\n {\n this.getWorldTransformMatrix().applyInverse(px, py, point);\n }\n else\n {\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\n }\n\n // Normalize origin\n if (this._originComponent)\n {\n point.x += this._displayOriginX;\n point.y += this._displayOriginY;\n }\n\n return point;\n },\n\n /**\n * Gets the sum total rotation of all of this Game Objects parent Containers.\n *\n * The returned value is in radians and will be zero if this Game Object has no parent container.\n *\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\n * @since 3.18.0\n *\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\n */\n getParentRotation: function ()\n {\n var rotation = 0;\n\n var parent = this.parentContainer;\n\n while (parent)\n {\n rotation += parent.rotation;\n\n parent = parent.parentContainer;\n }\n\n return rotation;\n }\n\n};\n\nmodule.exports = Transform;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar MATH_CONST = require('../../math/const');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * A Matrix used for display transformations for rendering.\n *\n * It is represented like so:\n *\n * ```\n * | a | c | tx |\n * | b | d | ty |\n * | 0 | 0 | 1 |\n * ```\n *\n * @class TransformMatrix\n * @memberof Phaser.GameObjects.Components\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [a=1] - The Scale X value.\n * @param {number} [b=0] - The Skew Y value.\n * @param {number} [c=0] - The Skew X value.\n * @param {number} [d=1] - The Scale Y value.\n * @param {number} [tx=0] - The Translate X value.\n * @param {number} [ty=0] - The Translate Y value.\n */\nvar TransformMatrix = new Class({\n\n initialize:\n\n function TransformMatrix (a, b, c, d, tx, ty)\n {\n if (a === undefined) { a = 1; }\n if (b === undefined) { b = 0; }\n if (c === undefined) { c = 0; }\n if (d === undefined) { d = 1; }\n if (tx === undefined) { tx = 0; }\n if (ty === undefined) { ty = 0; }\n\n /**\n * The matrix values.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\n\n /**\n * The decomposed matrix.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\n * @type {object}\n * @since 3.0.0\n */\n this.decomposedMatrix = {\n translateX: 0,\n translateY: 0,\n scaleX: 1,\n scaleY: 1,\n rotation: 0\n };\n },\n\n /**\n * The Scale X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#a\n * @type {number}\n * @since 3.4.0\n */\n a: {\n\n get: function ()\n {\n return this.matrix[0];\n },\n\n set: function (value)\n {\n this.matrix[0] = value;\n }\n\n },\n\n /**\n * The Skew Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#b\n * @type {number}\n * @since 3.4.0\n */\n b: {\n\n get: function ()\n {\n return this.matrix[1];\n },\n\n set: function (value)\n {\n this.matrix[1] = value;\n }\n\n },\n\n /**\n * The Skew X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#c\n * @type {number}\n * @since 3.4.0\n */\n c: {\n\n get: function ()\n {\n return this.matrix[2];\n },\n\n set: function (value)\n {\n this.matrix[2] = value;\n }\n\n },\n\n /**\n * The Scale Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#d\n * @type {number}\n * @since 3.4.0\n */\n d: {\n\n get: function ()\n {\n return this.matrix[3];\n },\n\n set: function (value)\n {\n this.matrix[3] = value;\n }\n\n },\n\n /**\n * The Translate X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#e\n * @type {number}\n * @since 3.11.0\n */\n e: {\n\n get: function ()\n {\n return this.matrix[4];\n },\n\n set: function (value)\n {\n this.matrix[4] = value;\n }\n\n },\n\n /**\n * The Translate Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#f\n * @type {number}\n * @since 3.11.0\n */\n f: {\n\n get: function ()\n {\n return this.matrix[5];\n },\n\n set: function (value)\n {\n this.matrix[5] = value;\n }\n\n },\n\n /**\n * The Translate X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\n * @type {number}\n * @since 3.4.0\n */\n tx: {\n\n get: function ()\n {\n return this.matrix[4];\n },\n\n set: function (value)\n {\n this.matrix[4] = value;\n }\n\n },\n\n /**\n * The Translate Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\n * @type {number}\n * @since 3.4.0\n */\n ty: {\n\n get: function ()\n {\n return this.matrix[5];\n },\n\n set: function (value)\n {\n this.matrix[5] = value;\n }\n\n },\n\n /**\n * The rotation of the Matrix. Value is in radians.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n rotation: {\n\n get: function ()\n {\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\n }\n\n },\n\n /**\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\n * clockwise rotation space. Value is in radians.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\n * @type {number}\n * @readonly\n * @since 3.19.0\n */\n rotationNormalized: {\n\n get: function ()\n {\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n if (a || b)\n {\n // var r = Math.sqrt(a * a + b * b);\n \n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\n }\n else if (c || d)\n {\n // var s = Math.sqrt(c * c + d * d);\n \n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\n }\n else\n {\n return 0;\n }\n }\n\n },\n\n /**\n * The decomposed horizontal scale of the Matrix. This value is always positive.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n scaleX: {\n\n get: function ()\n {\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\n }\n\n },\n\n /**\n * The decomposed vertical scale of the Matrix. This value is always positive.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n scaleY: {\n\n get: function ()\n {\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\n }\n\n },\n\n /**\n * Reset the Matrix to an identity matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\n * @since 3.0.0\n *\n * @return {this} This TransformMatrix.\n */\n loadIdentity: function ()\n {\n var matrix = this.matrix;\n\n matrix[0] = 1;\n matrix[1] = 0;\n matrix[2] = 0;\n matrix[3] = 1;\n matrix[4] = 0;\n matrix[5] = 0;\n\n return this;\n },\n\n /**\n * Translate the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\n * @since 3.0.0\n *\n * @param {number} x - The horizontal translation value.\n * @param {number} y - The vertical translation value.\n *\n * @return {this} This TransformMatrix.\n */\n translate: function (x, y)\n {\n var matrix = this.matrix;\n\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\n\n return this;\n },\n\n /**\n * Scale the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale value.\n * @param {number} y - The vertical scale value.\n *\n * @return {this} This TransformMatrix.\n */\n scale: function (x, y)\n {\n var matrix = this.matrix;\n\n matrix[0] *= x;\n matrix[1] *= x;\n matrix[2] *= y;\n matrix[3] *= y;\n\n return this;\n },\n\n /**\n * Rotate the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\n * @since 3.0.0\n *\n * @param {number} angle - The angle of rotation in radians.\n *\n * @return {this} This TransformMatrix.\n */\n rotate: function (angle)\n {\n var sin = Math.sin(angle);\n var cos = Math.cos(angle);\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n matrix[0] = a * cos + c * sin;\n matrix[1] = b * cos + d * sin;\n matrix[2] = a * -sin + c * cos;\n matrix[3] = b * -sin + d * cos;\n\n return this;\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n * \n * If an `out` Matrix is given then the results will be stored in it.\n * If it is not given, this matrix will be updated in place instead.\n * Use an `out` Matrix if you do not wish to mutate this matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\n *\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\n */\n multiply: function (rhs, out)\n {\n var matrix = this.matrix;\n var source = rhs.matrix;\n\n var localA = matrix[0];\n var localB = matrix[1];\n var localC = matrix[2];\n var localD = matrix[3];\n var localE = matrix[4];\n var localF = matrix[5];\n\n var sourceA = source[0];\n var sourceB = source[1];\n var sourceC = source[2];\n var sourceD = source[3];\n var sourceE = source[4];\n var sourceF = source[5];\n\n var destinationMatrix = (out === undefined) ? this : out;\n\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\n\n return destinationMatrix;\n },\n\n /**\n * Multiply this Matrix by the matrix given, including the offset.\n * \n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\n * @since 3.11.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\n *\n * @return {this} This TransformMatrix.\n */\n multiplyWithOffset: function (src, offsetX, offsetY)\n {\n var matrix = this.matrix;\n var otherMatrix = src.matrix;\n\n var a0 = matrix[0];\n var b0 = matrix[1];\n var c0 = matrix[2];\n var d0 = matrix[3];\n var tx0 = matrix[4];\n var ty0 = matrix[5];\n\n var pse = offsetX * a0 + offsetY * c0 + tx0;\n var psf = offsetX * b0 + offsetY * d0 + ty0;\n\n var a1 = otherMatrix[0];\n var b1 = otherMatrix[1];\n var c1 = otherMatrix[2];\n var d1 = otherMatrix[3];\n var tx1 = otherMatrix[4];\n var ty1 = otherMatrix[5];\n\n matrix[0] = a1 * a0 + b1 * c0;\n matrix[1] = a1 * b0 + b1 * d0;\n matrix[2] = c1 * a0 + d1 * c0;\n matrix[3] = c1 * b0 + d1 * d0;\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\n\n return this;\n },\n\n /**\n * Transform the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\n * @since 3.0.0\n *\n * @param {number} a - The Scale X value.\n * @param {number} b - The Shear Y value.\n * @param {number} c - The Shear X value.\n * @param {number} d - The Scale Y value.\n * @param {number} tx - The Translate X value.\n * @param {number} ty - The Translate Y value.\n *\n * @return {this} This TransformMatrix.\n */\n transform: function (a, b, c, d, tx, ty)\n {\n var matrix = this.matrix;\n\n var a0 = matrix[0];\n var b0 = matrix[1];\n var c0 = matrix[2];\n var d0 = matrix[3];\n var tx0 = matrix[4];\n var ty0 = matrix[5];\n\n matrix[0] = a * a0 + b * c0;\n matrix[1] = a * b0 + b * d0;\n matrix[2] = c * a0 + d * c0;\n matrix[3] = c * b0 + d * d0;\n matrix[4] = tx * a0 + ty * c0 + tx0;\n matrix[5] = tx * b0 + ty * d0 + ty0;\n\n return this;\n },\n\n /**\n * Transform a point using this Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\n * @since 3.0.0\n *\n * @param {number} x - The x coordinate of the point to transform.\n * @param {number} y - The y coordinate of the point to transform.\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\n *\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\n */\n transformPoint: function (x, y, point)\n {\n if (point === undefined) { point = { x: 0, y: 0 }; }\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n point.x = x * a + y * c + tx;\n point.y = x * b + y * d + ty;\n\n return point;\n },\n\n /**\n * Invert the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\n * @since 3.0.0\n *\n * @return {this} This TransformMatrix.\n */\n invert: function ()\n {\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n var n = a * d - b * c;\n\n matrix[0] = d / n;\n matrix[1] = -b / n;\n matrix[2] = -c / n;\n matrix[3] = a / n;\n matrix[4] = (c * ty - d * tx) / n;\n matrix[5] = -(a * ty - b * tx) / n;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix to copy those of the matrix given.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\n * @since 3.11.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\n *\n * @return {this} This TransformMatrix.\n */\n copyFrom: function (src)\n {\n var matrix = this.matrix;\n\n matrix[0] = src.a;\n matrix[1] = src.b;\n matrix[2] = src.c;\n matrix[3] = src.d;\n matrix[4] = src.e;\n matrix[5] = src.f;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix to copy those of the array given.\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\n * @since 3.11.0\n *\n * @param {array} src - The array of values to set into this matrix.\n *\n * @return {this} This TransformMatrix.\n */\n copyFromArray: function (src)\n {\n var matrix = this.matrix;\n\n matrix[0] = src[0];\n matrix[1] = src[1];\n matrix[2] = src[2];\n matrix[3] = src[3];\n matrix[4] = src[4];\n matrix[5] = src[5];\n\n return this;\n },\n\n /**\n * Copy the values from this Matrix to the given Canvas Rendering Context.\n * This will use the Context.transform method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\n * @since 3.12.0\n *\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\n *\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\n */\n copyToContext: function (ctx)\n {\n var matrix = this.matrix;\n\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n\n return ctx;\n },\n\n /**\n * Copy the values from this Matrix to the given Canvas Rendering Context.\n * This will use the Context.setTransform method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\n * @since 3.12.0\n *\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\n *\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\n */\n setToContext: function (ctx)\n {\n var matrix = this.matrix;\n\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n\n return ctx;\n },\n\n /**\n * Copy the values in this Matrix to the array given.\n * \n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\n * @since 3.12.0\n *\n * @param {array} [out] - The array to copy the matrix values in to.\n *\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\n */\n copyToArray: function (out)\n {\n var matrix = this.matrix;\n\n if (out === undefined)\n {\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\n }\n else\n {\n out[0] = matrix[0];\n out[1] = matrix[1];\n out[2] = matrix[2];\n out[3] = matrix[3];\n out[4] = matrix[4];\n out[5] = matrix[5];\n }\n\n return out;\n },\n\n /**\n * Set the values of this Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\n * @since 3.0.0\n *\n * @param {number} a - The Scale X value.\n * @param {number} b - The Shear Y value.\n * @param {number} c - The Shear X value.\n * @param {number} d - The Scale Y value.\n * @param {number} tx - The Translate X value.\n * @param {number} ty - The Translate Y value.\n *\n * @return {this} This TransformMatrix.\n */\n setTransform: function (a, b, c, d, tx, ty)\n {\n var matrix = this.matrix;\n\n matrix[0] = a;\n matrix[1] = b;\n matrix[2] = c;\n matrix[3] = d;\n matrix[4] = tx;\n matrix[5] = ty;\n\n return this;\n },\n\n /**\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\n * \n * The result must be applied in the following order to reproduce the current matrix:\n * \n * translate -> rotate -> scale\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\n * @since 3.0.0\n *\n * @return {object} The decomposed Matrix.\n */\n decomposeMatrix: function ()\n {\n var decomposedMatrix = this.decomposedMatrix;\n\n var matrix = this.matrix;\n\n // a = scale X (1)\n // b = shear Y (0)\n // c = shear X (0)\n // d = scale Y (1)\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n var determ = a * d - b * c;\n\n decomposedMatrix.translateX = matrix[4];\n decomposedMatrix.translateY = matrix[5];\n\n if (a || b)\n {\n var r = Math.sqrt(a * a + b * b);\n\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\n decomposedMatrix.scaleX = r;\n decomposedMatrix.scaleY = determ / r;\n }\n else if (c || d)\n {\n var s = Math.sqrt(c * c + d * d);\n\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\n decomposedMatrix.scaleX = determ / s;\n decomposedMatrix.scaleY = s;\n }\n else\n {\n decomposedMatrix.rotation = 0;\n decomposedMatrix.scaleX = 0;\n decomposedMatrix.scaleY = 0;\n }\n\n return decomposedMatrix;\n },\n\n /**\n * Apply the identity, translate, rotate and scale operations on the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\n * @since 3.0.0\n *\n * @param {number} x - The horizontal translation.\n * @param {number} y - The vertical translation.\n * @param {number} rotation - The angle of rotation in radians.\n * @param {number} scaleX - The horizontal scale.\n * @param {number} scaleY - The vertical scale.\n *\n * @return {this} This TransformMatrix.\n */\n applyITRS: function (x, y, rotation, scaleX, scaleY)\n {\n var matrix = this.matrix;\n\n var radianSin = Math.sin(rotation);\n var radianCos = Math.cos(rotation);\n\n // Translate\n matrix[4] = x;\n matrix[5] = y;\n\n // Rotate and Scale\n matrix[0] = radianCos * scaleX;\n matrix[1] = radianSin * scaleX;\n matrix[2] = -radianSin * scaleY;\n matrix[3] = radianCos * scaleY;\n\n return this;\n },\n\n /**\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\n * the current matrix with its transformation applied.\n * \n * Can be used to translate points from world to local space.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\n * @since 3.12.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\n *\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\n */\n applyInverse: function (x, y, output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n var id = 1 / ((a * d) + (c * -b));\n\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\n\n return output;\n },\n\n /**\n * Returns the X component of this matrix multiplied by the given values.\n * This is the same as `x * a + y * c + e`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\n * @since 3.12.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n *\n * @return {number} The calculated x value.\n */\n getX: function (x, y)\n {\n return x * this.a + y * this.c + this.e;\n },\n\n /**\n * Returns the Y component of this matrix multiplied by the given values.\n * This is the same as `x * b + y * d + f`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\n * @since 3.12.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n *\n * @return {number} The calculated y value.\n */\n getY: function (x, y)\n {\n return x * this.b + y * this.d + this.f;\n },\n\n /**\n * Returns the X component of this matrix multiplied by the given values.\n * \n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\n * @since 3.50.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {boolean} [round=false] - Math.round the resulting value?\n *\n * @return {number} The calculated x value.\n */\n getXRound: function (x, y, round)\n {\n var v = this.getX(x, y);\n\n if (round)\n {\n v = Math.round(v);\n }\n\n return v;\n },\n\n /**\n * Returns the Y component of this matrix multiplied by the given values.\n * \n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\n * @since 3.50.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {boolean} [round=false] - Math.round the resulting value?\n *\n * @return {number} The calculated y value.\n */\n getYRound: function (x, y, round)\n {\n var v = this.getY(x, y);\n\n if (round)\n {\n v = Math.round(v);\n }\n\n return v;\n },\n\n /**\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\n * @since 3.12.0\n *\n * @return {string} A string containing the CSS Transform matrix values.\n */\n getCSSMatrix: function ()\n {\n var m = this.matrix;\n\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\n },\n\n /**\n * Destroys this Transform Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\n * @since 3.4.0\n */\n destroy: function ()\n {\n this.matrix = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 1; // 0001\n\n/**\n * Provides methods used for setting the visibility of a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Visible\n * @since 3.0.0\n */\n\nvar Visible = {\n\n /**\n * Private internal value. Holds the visible value.\n * \n * @name Phaser.GameObjects.Components.Visible#_visible\n * @type {boolean}\n * @private\n * @default true\n * @since 3.0.0\n */\n _visible: true,\n\n /**\n * The visible state of the Game Object.\n * \n * An invisible Game Object will skip rendering, but will still process update logic.\n * \n * @name Phaser.GameObjects.Components.Visible#visible\n * @type {boolean}\n * @since 3.0.0\n */\n visible: {\n\n get: function ()\n {\n return this._visible;\n },\n\n set: function (value)\n {\n if (value)\n {\n this._visible = true;\n this.renderFlags |= _FLAG;\n }\n else\n {\n this._visible = false;\n this.renderFlags &= ~_FLAG;\n }\n }\n\n },\n\n /**\n * Sets the visibility of this Game Object.\n * \n * An invisible Game Object will skip rendering, but will still process update logic.\n *\n * @method Phaser.GameObjects.Components.Visible#setVisible\n * @since 3.0.0\n *\n * @param {boolean} value - The visible state of the Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setVisible: function (value)\n {\n this.visible = value;\n\n return this;\n }\n};\n\nmodule.exports = Visible;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Components\n */\n\nmodule.exports = {\n\n Alpha: require('./Alpha'),\n AlphaSingle: require('./AlphaSingle'),\n Animation: require('./Animation'),\n BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n GetBounds: require('./GetBounds'),\n Mask: require('./Mask'),\n Origin: require('./Origin'),\n PathFollower: require('./PathFollower'),\n Pipeline: require('./Pipeline'),\n ScrollFactor: require('./ScrollFactor'),\n Size: require('./Size'),\n Texture: require('./Texture'),\n TextureCrop: require('./TextureCrop'),\n Tint: require('./Tint'),\n ToJSON: require('./ToJSON'),\n Transform: require('./Transform'),\n TransformMatrix: require('./TransformMatrix'),\n Visible: require('./Visible')\n\n};\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArrayUtils = require('../../utils/array');\nvar BlendModes = require('../../renderer/BlendModes');\nvar Class = require('../../utils/Class');\nvar Components = require('../components');\nvar Events = require('../events');\nvar GameObject = require('../GameObject');\nvar GameObjectEvents = require('../events');\nvar Rectangle = require('../../geom/rectangle/Rectangle');\nvar Render = require('./ContainerRender');\nvar Union = require('../../geom/rectangle/Union');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * A Container Game Object.\n *\n * A Container, as the name implies, can 'contain' other types of Game Object.\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\n *\n * The position of the Game Object automatically becomes relative to the position of the Container.\n *\n * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\n * the Container, and position children positively and negative around it as required.\n *\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\n *\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\n * automatically influence all children as well.\n *\n * Containers can include other Containers for deeply nested transforms.\n *\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\n *\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\n *\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\n * your game to work around this.\n *\n * It's important to understand the impact of using Containers. They add additional processing overhead into\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\n * for input events. You also loose the ability to set the display depth of Container children in the same\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\n * every time you create one, try to structure your game around avoiding that where possible.\n *\n * @class Container\n * @extends Phaser.GameObjects.GameObject\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.4.0\n *\n * @extends Phaser.GameObjects.Components.AlphaSingle\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.ComputedSize\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Mask\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\n */\nvar Container = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n Components.AlphaSingle,\n Components.BlendMode,\n Components.ComputedSize,\n Components.Depth,\n Components.Mask,\n Components.Transform,\n Components.Visible,\n Render\n ],\n\n initialize:\n\n function Container (scene, x, y, children)\n {\n GameObject.call(this, scene, 'Container');\n\n /**\n * An array holding the children of this Container.\n *\n * @name Phaser.GameObjects.Container#list\n * @type {Phaser.GameObjects.GameObject[]}\n * @since 3.4.0\n */\n this.list = [];\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @name Phaser.GameObjects.Container#exclusive\n * @type {boolean}\n * @default true\n * @since 3.4.0\n */\n this.exclusive = true;\n\n /**\n * Containers can have an optional maximum size. If set to anything above 0 it\n * will constrict the addition of new Game Objects into the Container, capping off\n * the maximum limit the Container can grow in size to.\n *\n * @name Phaser.GameObjects.Container#maxSize\n * @type {integer}\n * @default -1\n * @since 3.4.0\n */\n this.maxSize = -1;\n\n /**\n * The cursor position.\n *\n * @name Phaser.GameObjects.Container#position\n * @type {integer}\n * @since 3.4.0\n */\n this.position = 0;\n\n /**\n * Internal Transform Matrix used for local space conversion.\n *\n * @name Phaser.GameObjects.Container#localTransform\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @since 3.4.0\n */\n this.localTransform = new Components.TransformMatrix();\n\n /**\n * Internal temporary Transform Matrix used to avoid object creation.\n *\n * @name Phaser.GameObjects.Container#tempTransformMatrix\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @private\n * @since 3.4.0\n */\n this.tempTransformMatrix = new Components.TransformMatrix();\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.Container#_displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @private\n * @since 3.4.0\n */\n this._displayList = scene.sys.displayList;\n\n /**\n * The property key to sort by.\n *\n * @name Phaser.GameObjects.Container#_sortKey\n * @type {string}\n * @private\n * @since 3.4.0\n */\n this._sortKey = '';\n\n /**\n * A reference to the Scene Systems Event Emitter.\n *\n * @name Phaser.GameObjects.Container#_sysEvents\n * @type {Phaser.Events.EventEmitter}\n * @private\n * @since 3.9.0\n */\n this._sysEvents = scene.sys.events;\n\n /**\n * The horizontal scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorX = 1;\n\n /**\n * The vertical scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorY = 1;\n\n this.setPosition(x, y);\n\n this.clearAlpha();\n\n this.setBlendMode(BlendModes.SKIP_CHECK);\n\n if (children)\n {\n this.add(children);\n }\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originX: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originY: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginX: {\n\n get: function ()\n {\n return this.width * 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginY: {\n\n get: function ()\n {\n return this.height * 0.5;\n }\n\n },\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @method Phaser.GameObjects.Container#setExclusive\n * @since 3.4.0\n *\n * @param {boolean} [value=true] - The exclusive state of this Container.\n *\n * @return {this} This Container.\n */\n setExclusive: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.exclusive = value;\n\n return this;\n },\n\n /**\n * Gets the bounds of this Container. It works by iterating all children of the Container,\n * getting their respective bounds, and then working out a min-max rectangle from that.\n * It does not factor in if the children render or not, all are included.\n *\n * Some children are unable to return their bounds, such as Graphics objects, in which case\n * they are skipped.\n *\n * Depending on the quantity of children in this Container it could be a really expensive call,\n * so cache it and only poll it as needed.\n *\n * The values are stored and returned in a Rectangle object.\n *\n * @method Phaser.GameObjects.Container#getBounds\n * @since 3.4.0\n *\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\n *\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\n */\n getBounds: function (output)\n {\n if (output === undefined) { output = new Rectangle(); }\n\n output.setTo(this.x, this.y, 0, 0);\n\n if (this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\n\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\n }\n\n if (this.list.length > 0)\n {\n var children = this.list;\n var tempRect = new Rectangle();\n var hasSetFirst = false;\n\n output.setEmpty();\n\n for (var i = 0; i < children.length; i++)\n {\n var entry = children[i];\n\n if (entry.getBounds)\n {\n entry.getBounds(tempRect);\n\n if (!hasSetFirst)\n {\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\n hasSetFirst = true;\n }\n else\n {\n Union(tempRect, output, output);\n }\n }\n }\n }\n\n return output;\n },\n\n /**\n * Internal add handler.\n *\n * @method Phaser.GameObjects.Container#addHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\n */\n addHandler: function (gameObject)\n {\n gameObject.once(Events.DESTROY, this.remove, this);\n\n if (this.exclusive)\n {\n this._displayList.remove(gameObject);\n\n if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Internal remove handler.\n *\n * @method Phaser.GameObjects.Container#removeHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\n */\n removeHandler: function (gameObject)\n {\n gameObject.off(Events.DESTROY, this.remove);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\n * and transforms it into the space of this Container, then returns it in the output object.\n *\n * @method Phaser.GameObjects.Container#pointToContainer\n * @since 3.4.0\n *\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\n */\n pointToContainer: function (source, output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n if (this.parentContainer)\n {\n this.parentContainer.pointToContainer(source, output);\n }\n else\n {\n output = new Vector2(source.x, source.y);\n }\n\n var tempMatrix = this.tempTransformMatrix;\n\n // No need to loadIdentity because applyITRS overwrites every value anyway\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\n\n tempMatrix.invert();\n\n tempMatrix.transformPoint(source.x, source.y, output);\n\n return output;\n },\n\n /**\n * Returns the world transform matrix as used for Bounds checks.\n *\n * The returned matrix is temporal and shouldn't be stored.\n *\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\n * @since 3.4.0\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\n */\n getBoundsTransformMatrix: function ()\n {\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#add\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n *\n * @return {this} This Container instance.\n */\n add: function (child)\n {\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\n *\n * Existing Game Objects in the Container are shifted up.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#addAt\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n * @param {integer} [index=0] - The position to insert the Game Object/s at.\n *\n * @return {this} This Container instance.\n */\n addAt: function (child, index)\n {\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Returns the Game Object at the given position in this Container.\n *\n * @method Phaser.GameObjects.Container#getAt\n * @since 3.4.0\n *\n * @param {integer} index - The position to get the Game Object from.\n *\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\n */\n getAt: function (index)\n {\n return this.list[index];\n },\n\n /**\n * Returns the index of the given Game Object in this Container.\n *\n * @method Phaser.GameObjects.Container#getIndex\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {integer} The index of the Game Object in this Container, or -1 if not found.\n */\n getIndex: function (child)\n {\n return this.list.indexOf(child);\n },\n\n /**\n * Sort the contents of this Container so the items are in order based on the given property.\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\n *\n * @method Phaser.GameObjects.Container#sort\n * @since 3.4.0\n *\n * @param {string} property - The property to lexically sort by.\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\n *\n * @return {this} This Container instance.\n */\n sort: function (property, handler)\n {\n if (!property)\n {\n return this;\n }\n\n if (handler === undefined)\n {\n handler = function (childA, childB)\n {\n return childA[property] - childB[property];\n };\n }\n\n ArrayUtils.StableSort.inplace(this.list, handler);\n\n return this;\n },\n\n /**\n * Searches for the first instance of a child with its `name` property matching the given argument.\n * Should more than one child have the same name only the first is returned.\n *\n * @method Phaser.GameObjects.Container#getByName\n * @since 3.4.0\n *\n * @param {string} name - The name to search for.\n *\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\n */\n getByName: function (name)\n {\n return ArrayUtils.GetFirst(this.list, 'name', name);\n },\n\n /**\n * Returns a random Game Object from this Container.\n *\n * @method Phaser.GameObjects.Container#getRandom\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index.\n * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\n *\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\n */\n getRandom: function (startIndex, length)\n {\n return ArrayUtils.GetRandom(this.list, startIndex, length);\n },\n\n /**\n * Gets the first Game Object in this Container.\n *\n * You can also specify a property and value to search for, in which case it will return the first\n * Game Object in this Container with a matching property and / or value.\n *\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\n *\n * You can limit the search to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#getFirst\n * @since 3.4.0\n *\n * @param {string} property - The property to test on each Game Object in the Container.\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\n */\n getFirst: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns all Game Objects in this Container.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('body')` would return only Game Objects that have a body property.\n *\n * You can also specify a value to compare the property to:\n *\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#getAll\n * @since 3.4.0\n *\n * @param {string} [property] - The property to test on each Game Object in the Container.\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\n */\n getAll: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns the total number of Game Objects in this Container that have a property\n * matching the given value.\n *\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\n *\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#count\n * @since 3.4.0\n *\n * @param {string} property - The property to check.\n * @param {any} value - The value to check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {integer} The total number of Game Objects in this Container with a property matching the given value.\n */\n count: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Swaps the position of two Game Objects in this Container.\n * Both Game Objects must belong to this Container.\n *\n * @method Phaser.GameObjects.Container#swap\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\n *\n * @return {this} This Container instance.\n */\n swap: function (child1, child2)\n {\n ArrayUtils.Swap(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object to a new position within this Container.\n *\n * The Game Object must already be a child of this Container.\n *\n * The Game Object is removed from its old position and inserted into the new one.\n * Therefore the Container size does not change. Other children will change position accordingly.\n *\n * @method Phaser.GameObjects.Container#moveTo\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {integer} index - The new position of the Game Object in this Container.\n *\n * @return {this} This Container instance.\n */\n moveTo: function (child, index)\n {\n ArrayUtils.MoveTo(this.list, child, index);\n\n return this;\n },\n\n /**\n * Removes the given Game Object, or array of Game Objects, from this Container.\n *\n * The Game Objects must already be children of this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#remove\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n remove: function (child, destroyChild)\n {\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n if (!Array.isArray(removed))\n {\n removed = [ removed ];\n }\n\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes the Game Object at the given position in this Container.\n *\n * You can also optionally call `destroy` on the Game Object, if one is found.\n *\n * @method Phaser.GameObjects.Container#removeAt\n * @since 3.4.0\n *\n * @param {integer} index - The index of the Game Object to be removed.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAt: function (index, destroyChild)\n {\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n removed.destroy();\n }\n\n return this;\n },\n\n /**\n * Removes the Game Objects between the given positions in this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeBetween\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeBetween: function (startIndex, endIndex, destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes all Game Objects from this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeAll\n * @since 3.4.0\n *\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAll: function (destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Brings the given Game Object to the top of this Container.\n * This will cause it to render on-top of any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#bringToTop\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\n *\n * @return {this} This Container instance.\n */\n bringToTop: function (child)\n {\n ArrayUtils.BringToTop(this.list, child);\n\n return this;\n },\n\n /**\n * Sends the given Game Object to the bottom of this Container.\n * This will cause it to render below any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#sendToBack\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\n *\n * @return {this} This Container instance.\n */\n sendToBack: function (child)\n {\n ArrayUtils.SendToBack(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\n *\n * @method Phaser.GameObjects.Container#moveUp\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveUp: function (child)\n {\n ArrayUtils.MoveUp(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\n *\n * @method Phaser.GameObjects.Container#moveDown\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveDown: function (child)\n {\n ArrayUtils.MoveDown(this.list, child);\n\n return this;\n },\n\n /**\n * Reverses the order of all Game Objects in this Container.\n *\n * @method Phaser.GameObjects.Container#reverse\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n reverse: function ()\n {\n this.list.reverse();\n\n return this;\n },\n\n /**\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\n *\n * @method Phaser.GameObjects.Container#shuffle\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n shuffle: function ()\n {\n ArrayUtils.Shuffle(this.list);\n\n return this;\n },\n\n /**\n * Replaces a Game Object in this Container with the new Game Object.\n * The new Game Object cannot already be a child of this Container.\n *\n * @method Phaser.GameObjects.Container#replace\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n replace: function (oldChild, newChild, destroyChild)\n {\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\n\n if (moved)\n {\n this.addHandler(newChild);\n this.removeHandler(oldChild);\n\n if (destroyChild)\n {\n oldChild.destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Returns `true` if the given Game Object is a direct child of this Container.\n *\n * This check does not scan nested Containers.\n *\n * @method Phaser.GameObjects.Container#exists\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\n *\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\n */\n exists: function (child)\n {\n return (this.list.indexOf(child) > -1);\n },\n\n /**\n * Sets the property to the given value on all Game Objects in this Container.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#setAll\n * @since 3.4.0\n *\n * @param {string} property - The property that must exist on the Game Object.\n * @param {any} value - The value to get the property to.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {this} This Container instance.\n */\n setAll: function (property, value, startIndex, endIndex)\n {\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\n\n return this;\n },\n\n /**\n * @callback EachContainerCallback\n * @generic I - [item]\n *\n * @param {*} item - The child Game Object of the Container.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n */\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * A copy of the Container is made before passing each entry to your callback.\n * This protects against the callback itself modifying the Container.\n *\n * If you know for sure that the callback will not change the size of this Container\n * then you can use the more performant `Container.iterate` method instead.\n *\n * @method Phaser.GameObjects.Container#each\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n each: function (callback, context)\n {\n var args = [ null ];\n var i;\n var temp = this.list.slice();\n var len = temp.length;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < len; i++)\n {\n args[0] = temp[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * Only use this method when you absolutely know that the Container will not be modified during\n * the iteration, i.e. by removing or adding to its contents.\n *\n * @method Phaser.GameObjects.Container#iterate\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n iterate: function (callback, context)\n {\n var args = [ null ];\n var i;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < this.list.length; i++)\n {\n args[0] = this.list[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Sets the scroll factor of this Container and optionally all of its children.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @method Phaser.GameObjects.Container#setScrollFactor\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scroll factor of this Game Object.\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\n *\n * @return {this} This Game Object instance.\n */\n setScrollFactor: function (x, y, updateChildren)\n {\n if (y === undefined) { y = x; }\n if (updateChildren === undefined) { updateChildren = false; }\n\n this.scrollFactorX = x;\n this.scrollFactorY = y;\n\n if (updateChildren)\n {\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\n }\n\n return this;\n },\n\n /**\n * The number of Game Objects inside this Container.\n *\n * @name Phaser.GameObjects.Container#length\n * @type {integer}\n * @readonly\n * @since 3.4.0\n */\n length: {\n\n get: function ()\n {\n return this.list.length;\n }\n\n },\n\n /**\n * Returns the first Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#first\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n first: {\n\n get: function ()\n {\n this.position = 0;\n\n if (this.list.length > 0)\n {\n return this.list[0];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the last Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#last\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n last: {\n\n get: function ()\n {\n if (this.list.length > 0)\n {\n this.position = this.list.length - 1;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the next Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#next\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n next: {\n\n get: function ()\n {\n if (this.position < this.list.length)\n {\n this.position++;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the previous Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#previous\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n previous: {\n\n get: function ()\n {\n if (this.position > 0)\n {\n this.position--;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method Phaser.GameObjects.Container#preDestroy\n * @protected\n * @since 3.9.0\n */\n preDestroy: function ()\n {\n this.removeAll(!!this.exclusive);\n\n this.localTransform.destroy();\n this.tempTransformMatrix.destroy();\n\n this.list = [];\n this._displayList = null;\n }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = ContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../utils/NOOP');\nvar renderCanvas = require('../../utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./ContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./ContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderWebGL\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n \n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container.alpha;\n\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n var list = children;\n var childCount = children.length;\n\n for (var i = 0; i < childCount; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlphaTopLeft;\n var childAlphaTopRight;\n var childAlphaBottomLeft;\n var childAlphaBottomRight;\n\n if (child.alphaTopLeft !== undefined)\n {\n childAlphaTopLeft = child.alphaTopLeft;\n childAlphaTopRight = child.alphaTopRight;\n childAlphaBottomLeft = child.alphaBottomLeft;\n childAlphaBottomRight = child.alphaBottomRight;\n }\n else\n {\n var childAlpha = child.alpha;\n\n childAlphaTopLeft = childAlpha;\n childAlphaTopRight = childAlpha;\n childAlphaBottomLeft = childAlpha;\n childAlphaBottomRight = childAlpha;\n }\n\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n var mask = child.mask;\n\n if (mask)\n {\n mask.preRenderWebGL(renderer, child, camera);\n }\n\n var type = child.type;\n\n if (type !== renderer.currentType)\n {\n renderer.newType = true;\n renderer.currentType = type;\n }\n\n renderer.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === renderer.currentType) : false;\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\n\n // Render\n child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\n\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n\n if (mask)\n {\n mask.postRenderWebGL(renderer, camera);\n }\n\n renderer.newType = false;\n }\n};\n\nmodule.exports = ContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Destroy Event.\n * \n * This event is dispatched when a Game Object instance is being destroyed.\n * \n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\n *\n * @event Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n * \n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Complete Event.\n * \n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\n * is also dispatched if a video marker sequence is being played and reaches the end.\n * \n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\n * so never technically 'complete'.\n * \n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\n * `VIDEO_STOP` event instead of this one.\n * \n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Created Event.\n * \n * This event is dispatched when the texture for a Video has been created. This happens\n * when enough of the video source has been loaded that the browser is able to render a\n * frame from it.\n * \n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {integer} width - The width of the video.\n * @param {integer} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Error Event.\n * \n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\n * \n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\n * @param {Event} event - The native DOM event the browser raised during playback.\n */\nmodule.exports = 'error';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Loop Event.\n * \n * This event is dispatched when a Video that is currently playing has looped. This only\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\n * they have no duration.\n * \n * Looping is based on the result of the Video `timeupdate` event. This event is not\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\n * event to be time or frame precise.\n * \n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\n */\nmodule.exports = 'loop';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Play Event.\n * \n * This event is dispatched when a Video begins playback. For videos that do not require\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\n * However, for videos that require unlocking, it is fired once playback begins after\n * they've been unlocked.\n * \n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\n */\nmodule.exports = 'play';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Seeked Event.\n * \n * This event is dispatched when a Video completes seeking to a new point in its timeline.\n * \n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\n */\nmodule.exports = 'seeked';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Seeking Event.\n * \n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\n * \n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\n */\nmodule.exports = 'seeking';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Stopped Event.\n * \n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\n * \n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_STOP\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\n */\nmodule.exports = 'stop';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Timeout Event.\n * \n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\n * source to start playback.\n * \n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\n */\nmodule.exports = 'timeout';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Unlocked Event.\n * \n * This event is dispatched when a Video that was prevented from playback due to the browsers\n * Media Engagement Interaction policy, is unlocked by a user gesture.\n * \n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n */\nmodule.exports = 'unlocked';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GEOM_CONST = {\n\n /**\n * A Circle Geometry object type.\n * \n * @name Phaser.Geom.CIRCLE\n * @type {integer}\n * @since 3.19.0\n */\n CIRCLE: 0,\n\n /**\n * An Ellipse Geometry object type.\n * \n * @name Phaser.Geom.ELLIPSE\n * @type {integer}\n * @since 3.19.0\n */\n ELLIPSE: 1,\n\n /**\n * A Line Geometry object type.\n * \n * @name Phaser.Geom.LINE\n * @type {integer}\n * @since 3.19.0\n */\n LINE: 2,\n\n /**\n * A Point Geometry object type.\n * \n * @name Phaser.Geom.POINT\n * @type {integer}\n * @since 3.19.0\n */\n POINT: 3,\n\n /**\n * A Polygon Geometry object type.\n * \n * @name Phaser.Geom.POLYGON\n * @type {integer}\n * @since 3.19.0\n */\n POLYGON: 4,\n\n /**\n * A Rectangle Geometry object type.\n * \n * @name Phaser.Geom.RECTANGLE\n * @type {integer}\n * @since 3.19.0\n */\n RECTANGLE: 5,\n\n /**\n * A Triangle Geometry object type.\n * \n * @name Phaser.Geom.TRIANGLE\n * @type {integer}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Get a point on a line that's a given percentage along its length.\n *\n * @function Phaser.Geom.Line.GetPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The line.\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\n *\n * @return {(Phaser.Geom.Point|object)} The point on the line.\n */\nvar GetPoint = function (line, position, out)\n{\n if (out === undefined) { out = new Point(); }\n\n out.x = line.x1 + (line.x2 - line.x1) * position;\n out.y = line.y1 + (line.y2 - line.y1) * position;\n\n return out;\n};\n\nmodule.exports = GetPoint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Length = require('./Length');\nvar Point = require('../point/Point');\n\n/**\n * Get a number of points along a line's length.\n *\n * Provide a `quantity` to get an exact number of points along the line.\n *\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\n * providing a `stepRate`.\n *\n * @function Phaser.Geom.Line.GetPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The line.\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\n */\nvar GetPoints = function (line, quantity, stepRate, out)\n{\n if (out === undefined) { out = []; }\n\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\n if (!quantity && stepRate > 0)\n {\n quantity = Length(line) / stepRate;\n }\n\n var x1 = line.x1;\n var y1 = line.y1;\n\n var x2 = line.x2;\n var y2 = line.y2;\n\n for (var i = 0; i < quantity; i++)\n {\n var position = i / quantity;\n\n var x = x1 + (x2 - x1) * position;\n var y = y1 + (y2 - y1) * position;\n\n out.push(new Point(x, y));\n }\n\n return out;\n};\n\nmodule.exports = GetPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the length of the given line.\n *\n * @function Phaser.Geom.Line.Length\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\n *\n * @return {number} The length of the line.\n */\nvar Length = function (line)\n{\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\n};\n\nmodule.exports = Length;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GetPoint = require('./GetPoint');\nvar GetPoints = require('./GetPoints');\nvar GEOM_CONST = require('../const');\nvar Random = require('./Random');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * Defines a Line segment, a part of a line between two endpoints.\n *\n * @class Line\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\n */\nvar Line = new Class({\n\n initialize:\n\n function Line (x1, y1, x2, y2)\n {\n if (x1 === undefined) { x1 = 0; }\n if (y1 === undefined) { y1 = 0; }\n if (x2 === undefined) { x2 = 0; }\n if (y2 === undefined) { y2 = 0; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Line#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.LINE;\n\n /**\n * The x coordinate of the lines starting point.\n *\n * @name Phaser.Geom.Line#x1\n * @type {number}\n * @since 3.0.0\n */\n this.x1 = x1;\n\n /**\n * The y coordinate of the lines starting point.\n *\n * @name Phaser.Geom.Line#y1\n * @type {number}\n * @since 3.0.0\n */\n this.y1 = y1;\n\n /**\n * The x coordinate of the lines ending point.\n *\n * @name Phaser.Geom.Line#x2\n * @type {number}\n * @since 3.0.0\n */\n this.x2 = x2;\n\n /**\n * The y coordinate of the lines ending point.\n *\n * @name Phaser.Geom.Line#y2\n * @type {number}\n * @since 3.0.0\n */\n this.y2 = y2;\n },\n\n /**\n * Get a point on a line that's a given percentage along its length.\n *\n * @method Phaser.Geom.Line#getPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [output,$return]\n *\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\n *\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\n */\n getPoint: function (position, output)\n {\n return GetPoint(this, position, output);\n },\n\n /**\n * Get a number of points along a line's length.\n *\n * Provide a `quantity` to get an exact number of points along the line.\n *\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\n * providing a `stepRate`.\n *\n * @method Phaser.Geom.Line#getPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\n *\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\n * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\n */\n getPoints: function (quantity, stepRate, output)\n {\n return GetPoints(this, quantity, stepRate, output);\n },\n\n /**\n * Get a random Point on the Line.\n *\n * @method Phaser.Geom.Line#getRandomPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\n *\n * @return {Phaser.Geom.Point} A random Point on the Line.\n */\n getRandomPoint: function (point)\n {\n return Random(this, point);\n },\n\n /**\n * Set new coordinates for the line endpoints.\n *\n * @method Phaser.Geom.Line#setTo\n * @since 3.0.0\n *\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\n *\n * @return {this} This Line object.\n */\n setTo: function (x1, y1, x2, y2)\n {\n if (x1 === undefined) { x1 = 0; }\n if (y1 === undefined) { y1 = 0; }\n if (x2 === undefined) { x2 = 0; }\n if (y2 === undefined) { y2 = 0; }\n\n this.x1 = x1;\n this.y1 = y1;\n\n this.x2 = x2;\n this.y2 = y2;\n\n return this;\n },\n\n /**\n * Returns a Vector2 object that corresponds to the start of this Line.\n *\n * @method Phaser.Geom.Line#getPointA\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\n *\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\n */\n getPointA: function (vec2)\n {\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n vec2.set(this.x1, this.y1);\n\n return vec2;\n },\n\n /**\n * Returns a Vector2 object that corresponds to the end of this Line.\n *\n * @method Phaser.Geom.Line#getPointB\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\n *\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\n */\n getPointB: function (vec2)\n {\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n vec2.set(this.x2, this.y2);\n\n return vec2;\n },\n\n /**\n * The left position of the Line.\n *\n * @name Phaser.Geom.Line#left\n * @type {number}\n * @since 3.0.0\n */\n left: {\n\n get: function ()\n {\n return Math.min(this.x1, this.x2);\n },\n\n set: function (value)\n {\n if (this.x1 <= this.x2)\n {\n this.x1 = value;\n }\n else\n {\n this.x2 = value;\n }\n }\n\n },\n\n /**\n * The right position of the Line.\n *\n * @name Phaser.Geom.Line#right\n * @type {number}\n * @since 3.0.0\n */\n right: {\n\n get: function ()\n {\n return Math.max(this.x1, this.x2);\n },\n\n set: function (value)\n {\n if (this.x1 > this.x2)\n {\n this.x1 = value;\n }\n else\n {\n this.x2 = value;\n }\n }\n\n },\n\n /**\n * The top position of the Line.\n *\n * @name Phaser.Geom.Line#top\n * @type {number}\n * @since 3.0.0\n */\n top: {\n\n get: function ()\n {\n return Math.min(this.y1, this.y2);\n },\n\n set: function (value)\n {\n if (this.y1 <= this.y2)\n {\n this.y1 = value;\n }\n else\n {\n this.y2 = value;\n }\n }\n\n },\n\n /**\n * The bottom position of the Line.\n *\n * @name Phaser.Geom.Line#bottom\n * @type {number}\n * @since 3.0.0\n */\n bottom: {\n\n get: function ()\n {\n return Math.max(this.y1, this.y2);\n },\n\n set: function (value)\n {\n if (this.y1 > this.y2)\n {\n this.y1 = value;\n }\n else\n {\n this.y2 = value;\n }\n }\n\n }\n\n});\n\nmodule.exports = Line;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Returns a random point on a given Line.\n *\n * @function Phaser.Geom.Line.Random\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\n *\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\n */\nvar Random = function (line, out)\n{\n if (out === undefined) { out = new Point(); }\n\n var t = Math.random();\n\n out.x = line.x1 + t * (line.x2 - line.x1);\n out.y = line.y1 + t * (line.y2 - line.y1);\n\n return out;\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GEOM_CONST = require('../const');\n\n/**\n * @classdesc\n * Defines a Point in 2D space, with an x and y component.\n *\n * @class Point\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x coordinate of this Point.\n * @param {number} [y=x] - The y coordinate of this Point.\n */\nvar Point = new Class({\n\n initialize:\n\n function Point (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Point#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.POINT;\n\n /**\n * The x coordinate of this Point.\n *\n * @name Phaser.Geom.Point#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = x;\n\n /**\n * The y coordinate of this Point.\n *\n * @name Phaser.Geom.Point#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = y;\n },\n\n /**\n * Set the x and y coordinates of the point to the given values.\n *\n * @method Phaser.Geom.Point#setTo\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x coordinate of this Point.\n * @param {number} [y=x] - The y coordinate of this Point.\n *\n * @return {this} This Point object.\n */\n setTo: function (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n }\n\n});\n\nmodule.exports = Point;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if a given point is inside a Rectangle's bounds.\n *\n * @function Phaser.Geom.Rectangle.Contains\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\n * @param {number} x - The X coordinate of the point to check.\n * @param {number} y - The Y coordinate of the point to check.\n *\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\n */\nvar Contains = function (rect, x, y)\n{\n if (rect.width <= 0 || rect.height <= 0)\n {\n return false;\n }\n\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\n};\n\nmodule.exports = Contains;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Perimeter = require('./Perimeter');\nvar Point = require('../point/Point');\n\n/**\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\n * \n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\n * \n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\n *\n * @function Phaser.Geom.Rectangle.GetPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\n *\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\n */\nvar GetPoint = function (rectangle, position, out)\n{\n if (out === undefined) { out = new Point(); }\n\n if (position <= 0 || position >= 1)\n {\n out.x = rectangle.x;\n out.y = rectangle.y;\n\n return out;\n }\n\n var p = Perimeter(rectangle) * position;\n\n if (position > 0.5)\n {\n p -= (rectangle.width + rectangle.height);\n\n if (p <= rectangle.width)\n {\n // Face 3\n out.x = rectangle.right - p;\n out.y = rectangle.bottom;\n }\n else\n {\n // Face 4\n out.x = rectangle.x;\n out.y = rectangle.bottom - (p - rectangle.width);\n }\n }\n else if (p <= rectangle.width)\n {\n // Face 1\n out.x = rectangle.x + p;\n out.y = rectangle.y;\n }\n else\n {\n // Face 2\n out.x = rectangle.right;\n out.y = rectangle.y + (p - rectangle.width);\n }\n\n return out;\n};\n\nmodule.exports = GetPoint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetPoint = require('./GetPoint');\nvar Perimeter = require('./Perimeter');\n\n// Return an array of points from the perimeter of the rectangle\n// each spaced out based on the quantity or step required\n\n/**\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\n *\n * @function Phaser.Geom.Rectangle.GetPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\n * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\n */\nvar GetPoints = function (rectangle, quantity, stepRate, out)\n{\n if (out === undefined) { out = []; }\n\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\n if (!quantity && stepRate > 0)\n {\n quantity = Perimeter(rectangle) / stepRate;\n }\n\n for (var i = 0; i < quantity; i++)\n {\n var position = i / quantity;\n\n out.push(GetPoint(rectangle, position));\n }\n\n return out;\n};\n\nmodule.exports = GetPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the perimeter of a Rectangle.\n *\n * @function Phaser.Geom.Rectangle.Perimeter\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\n *\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\n */\nvar Perimeter = function (rect)\n{\n return 2 * (rect.width + rect.height);\n};\n\nmodule.exports = Perimeter;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Returns a random point within a Rectangle.\n *\n * @function Phaser.Geom.Rectangle.Random\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\n *\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\n */\nvar Random = function (rect, out)\n{\n if (out === undefined) { out = new Point(); }\n\n out.x = rect.x + (Math.random() * rect.width);\n out.y = rect.y + (Math.random() * rect.height);\n\n return out;\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar Contains = require('./Contains');\nvar GetPoint = require('./GetPoint');\nvar GetPoints = require('./GetPoints');\nvar GEOM_CONST = require('../const');\nvar Line = require('../line/Line');\nvar Random = require('./Random');\n\n/**\n * @classdesc\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\n *\n * @class Rectangle\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\n * @param {number} [width=0] - The width of the Rectangle.\n * @param {number} [height=0] - The height of the Rectangle.\n */\nvar Rectangle = new Class({\n\n initialize:\n\n function Rectangle (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = 0; }\n if (height === undefined) { height = 0; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Rectangle#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.RECTANGLE;\n\n /**\n * The X coordinate of the top left corner of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = x;\n\n /**\n * The Y coordinate of the top left corner of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = y;\n\n /**\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\n *\n * @name Phaser.Geom.Rectangle#width\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.width = width;\n\n /**\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\n *\n * @name Phaser.Geom.Rectangle#height\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.height = height;\n },\n\n /**\n * Checks if the given point is inside the Rectangle's bounds.\n *\n * @method Phaser.Geom.Rectangle#contains\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the point to check.\n * @param {number} y - The Y coordinate of the point to check.\n *\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\n */\n contains: function (x, y)\n {\n return Contains(this, x, y);\n },\n\n /**\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\n * \n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\n * \n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\n *\n * @method Phaser.Geom.Rectangle#getPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [output,$return]\n *\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\n *\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\n */\n getPoint: function (position, output)\n {\n return GetPoint(this, position, output);\n },\n\n /**\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\n *\n * @method Phaser.Geom.Rectangle#getPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\n *\n * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\n *\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\n */\n getPoints: function (quantity, stepRate, output)\n {\n return GetPoints(this, quantity, stepRate, output);\n },\n\n /**\n * Returns a random point within the Rectangle's bounds.\n *\n * @method Phaser.Geom.Rectangle#getRandomPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [point,$return]\n *\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\n *\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\n */\n getRandomPoint: function (point)\n {\n return Random(this, point);\n },\n\n /**\n * Sets the position, width, and height of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setTo\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\n * @param {number} width - The width of the Rectangle.\n * @param {number} height - The height of the Rectangle.\n *\n * @return {this} This Rectangle object.\n */\n setTo: function (x, y, width, height)\n {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Resets the position, width, and height of the Rectangle to 0.\n *\n * @method Phaser.Geom.Rectangle#setEmpty\n * @since 3.0.0\n *\n * @return {this} This Rectangle object.\n */\n setEmpty: function ()\n {\n return this.setTo(0, 0, 0, 0);\n },\n\n /**\n * Sets the position of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setPosition\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\n *\n * @return {this} This Rectangle object.\n */\n setPosition: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n },\n\n /**\n * Sets the width and height of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setSize\n * @since 3.0.0\n *\n * @param {number} width - The width to set the Rectangle to.\n * @param {number} [height=width] - The height to set the Rectangle to.\n *\n * @return {this} This Rectangle object.\n */\n setSize: function (width, height)\n {\n if (height === undefined) { height = width; }\n\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\n *\n * @method Phaser.Geom.Rectangle#isEmpty\n * @since 3.0.0\n *\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\n */\n isEmpty: function ()\n {\n return (this.width <= 0 || this.height <= 0);\n },\n\n /**\n * Returns a Line object that corresponds to the top of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineA\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\n */\n getLineA: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.x, this.y, this.right, this.y);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the right of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineB\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\n */\n getLineB: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.right, this.y, this.right, this.bottom);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the bottom of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineC\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\n */\n getLineC: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.right, this.bottom, this.x, this.bottom);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the left of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineD\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\n */\n getLineD: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.x, this.bottom, this.x, this.y);\n\n return line;\n },\n\n /**\n * The x coordinate of the left of the Rectangle.\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\n *\n * @name Phaser.Geom.Rectangle#left\n * @type {number}\n * @since 3.0.0\n */\n left: {\n\n get: function ()\n {\n return this.x;\n },\n\n set: function (value)\n {\n if (value >= this.right)\n {\n this.width = 0;\n }\n else\n {\n this.width = this.right - value;\n }\n\n this.x = value;\n }\n\n },\n\n /**\n * The sum of the x and width properties.\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\n *\n * @name Phaser.Geom.Rectangle#right\n * @type {number}\n * @since 3.0.0\n */\n right: {\n\n get: function ()\n {\n return this.x + this.width;\n },\n\n set: function (value)\n {\n if (value <= this.x)\n {\n this.width = 0;\n }\n else\n {\n this.width = value - this.x;\n }\n }\n\n },\n\n /**\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\n * However it does affect the height property, whereas changing the y value does not affect the height property.\n *\n * @name Phaser.Geom.Rectangle#top\n * @type {number}\n * @since 3.0.0\n */\n top: {\n\n get: function ()\n {\n return this.y;\n },\n\n set: function (value)\n {\n if (value >= this.bottom)\n {\n this.height = 0;\n }\n else\n {\n this.height = (this.bottom - value);\n }\n\n this.y = value;\n }\n\n },\n\n /**\n * The sum of the y and height properties.\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\n *\n * @name Phaser.Geom.Rectangle#bottom\n * @type {number}\n * @since 3.0.0\n */\n bottom: {\n\n get: function ()\n {\n return this.y + this.height;\n },\n\n set: function (value)\n {\n if (value <= this.y)\n {\n this.height = 0;\n }\n else\n {\n this.height = value - this.y;\n }\n }\n\n },\n\n /**\n * The x coordinate of the center of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#centerX\n * @type {number}\n * @since 3.0.0\n */\n centerX: {\n\n get: function ()\n {\n return this.x + (this.width / 2);\n },\n\n set: function (value)\n {\n this.x = value - (this.width / 2);\n }\n\n },\n\n /**\n * The y coordinate of the center of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#centerY\n * @type {number}\n * @since 3.0.0\n */\n centerY: {\n\n get: function ()\n {\n return this.y + (this.height / 2);\n },\n\n set: function (value)\n {\n this.y = value - (this.height / 2);\n }\n\n }\n\n});\n\nmodule.exports = Rectangle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Rectangle = require('./Rectangle');\n\n/**\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\n *\n * @function Phaser.Geom.Rectangle.Union\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\n *\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\n */\nvar Union = function (rectA, rectB, out)\n{\n if (out === undefined) { out = new Rectangle(); }\n\n // Cache vars so we can use one of the input rects as the output rect\n var x = Math.min(rectA.x, rectB.x);\n var y = Math.min(rectA.y, rectB.y);\n var w = Math.max(rectA.right, rectB.right) - x;\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\n\n return out.setTo(x, y, w, h);\n};\n\nmodule.exports = Union;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar CONST = require('./const');\nvar Events = require('./events');\nvar GetFastValue = require('../utils/object/GetFastValue');\nvar GetURL = require('./GetURL');\nvar MergeXHRSettings = require('./MergeXHRSettings');\nvar XHRLoader = require('./XHRLoader');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * @classdesc\n * The base File class used by all File Types that the Loader can support.\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class File\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\n */\nvar File = new Class({\n\n initialize:\n\n function File (loader, fileConfig)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.File#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.0.0\n */\n this.loader = loader;\n\n /**\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\n *\n * @name Phaser.Loader.File#cache\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\n * @since 3.7.0\n */\n this.cache = GetFastValue(fileConfig, 'cache', false);\n\n /**\n * The file type string (image, json, etc) for sorting within the Loader.\n *\n * @name Phaser.Loader.File#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = GetFastValue(fileConfig, 'type', false);\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.File#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = GetFastValue(fileConfig, 'key', false);\n\n var loadKey = this.key;\n\n if (loader.prefix && loader.prefix !== '')\n {\n this.key = loader.prefix + loadKey;\n }\n\n if (!this.type || !this.key)\n {\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\n }\n\n /**\n * The URL of the file, not including baseURL.\n *\n * Automatically has Loader.path prepended to it if a string.\n *\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\n *\n * @name Phaser.Loader.File#url\n * @type {object|string}\n * @since 3.0.0\n */\n this.url = GetFastValue(fileConfig, 'url');\n\n if (this.url === undefined)\n {\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0)\n {\n this.url = loader.path + this.url;\n }\n\n /**\n * The final URL this file will load from, including baseURL and path.\n * Set automatically when the Loader calls 'load' on this file.\n *\n * @name Phaser.Loader.File#src\n * @type {string}\n * @since 3.0.0\n */\n this.src = '';\n\n /**\n * The merged XHRSettings for this file.\n *\n * @name Phaser.Loader.File#xhrSettings\n * @type {Phaser.Types.Loader.XHRSettingsObject}\n * @since 3.0.0\n */\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\n\n if (GetFastValue(fileConfig, 'xhrSettings', false))\n {\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\n }\n\n /**\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\n *\n * @name Phaser.Loader.File#xhrLoader\n * @type {?XMLHttpRequest}\n * @since 3.0.0\n */\n this.xhrLoader = null;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.File#state\n * @type {integer}\n * @since 3.0.0\n */\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\n\n /**\n * The total size of this file.\n * Set by onProgress and only if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesTotal\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.bytesTotal = 0;\n\n /**\n * Updated as the file loads.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesLoaded\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.bytesLoaded = -1;\n\n /**\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#percentComplete\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.percentComplete = -1;\n\n /**\n * For CORs based loading.\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\n *\n * @name Phaser.Loader.File#crossOrigin\n * @type {(string|undefined)}\n * @since 3.0.0\n */\n this.crossOrigin = undefined;\n\n /**\n * The processed file data, stored here after the file has loaded.\n *\n * @name Phaser.Loader.File#data\n * @type {*}\n * @since 3.0.0\n */\n this.data = undefined;\n\n /**\n * A config object that can be used by file types to store transitional data.\n *\n * @name Phaser.Loader.File#config\n * @type {*}\n * @since 3.0.0\n */\n this.config = GetFastValue(fileConfig, 'config', {});\n\n /**\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\n *\n * @name Phaser.Loader.File#multiFile\n * @type {?Phaser.Loader.MultiFile}\n * @since 3.7.0\n */\n this.multiFile;\n\n /**\n * Does this file have an associated linked file? Such as an image and a normal map.\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\n * actually bound by data, where-as a linkFile is.\n *\n * @name Phaser.Loader.File#linkFile\n * @type {?Phaser.Loader.File}\n * @since 3.7.0\n */\n this.linkFile;\n },\n\n /**\n * Links this File with another, so they depend upon each other for loading and processing.\n *\n * @method Phaser.Loader.File#setLink\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\n */\n setLink: function (fileB)\n {\n this.linkFile = fileB;\n\n fileB.linkFile = this;\n },\n\n /**\n * Resets the XHRLoader instance this file is using.\n *\n * @method Phaser.Loader.File#resetXHR\n * @since 3.0.0\n */\n resetXHR: function ()\n {\n if (this.xhrLoader)\n {\n this.xhrLoader.onload = undefined;\n this.xhrLoader.onerror = undefined;\n this.xhrLoader.onprogress = undefined;\n }\n },\n\n /**\n * Called by the Loader, starts the actual file downloading.\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\n *\n * @method Phaser.Loader.File#load\n * @since 3.0.0\n */\n load: function ()\n {\n if (this.state === CONST.FILE_POPULATED)\n {\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\n this.loader.nextFile(this, true);\n }\n else\n {\n this.state = CONST.FILE_LOADING;\n\n this.src = GetURL(this, this.loader.baseURL);\n\n if (this.src.indexOf('data:') === 0)\n {\n console.warn('Local data URIs are not supported: ' + this.key);\n }\n else\n {\n // The creation of this XHRLoader starts the load process going.\n // It will automatically call the following, based on the load outcome:\n //\n // xhr.onload = this.onLoad\n // xhr.onerror = this.onError\n // xhr.onprogress = this.onProgress\n\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\n }\n }\n },\n\n /**\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onLoad\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\n */\n onLoad: function (xhr, event)\n {\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\n\n var success = !(event.target && event.target.status !== 200) || localFileOk;\n\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\n {\n success = false;\n }\n\n this.state = CONST.FILE_LOADED;\n\n this.resetXHR();\n\n this.loader.nextFile(this, success);\n },\n\n /**\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onError\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\n */\n onError: function ()\n {\n this.resetXHR();\n\n this.loader.nextFile(this, false);\n },\n\n /**\n * Called during the file load progress. Is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onProgress\n * @fires Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n *\n * @param {ProgressEvent} event - The DOM ProgressEvent.\n */\n onProgress: function (event)\n {\n if (event.lengthComputable)\n {\n this.bytesLoaded = event.loaded;\n this.bytesTotal = event.total;\n\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\n\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\n }\n },\n\n /**\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\n *\n * @method Phaser.Loader.File#onProcess\n * @since 3.0.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.onProcessComplete();\n },\n\n /**\n * Called when the File has completed processing.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessComplete\n * @since 3.7.0\n */\n onProcessComplete: function ()\n {\n this.state = CONST.FILE_COMPLETE;\n\n if (this.multiFile)\n {\n this.multiFile.onFileComplete(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Called when the File has completed processing but it generated an error.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessError\n * @since 3.7.0\n */\n onProcessError: function ()\n {\n this.state = CONST.FILE_ERRORED;\n\n if (this.multiFile)\n {\n this.multiFile.onFileFailed(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Checks if a key matching the one used by this file exists in the target Cache or not.\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\n * loaded or will conflict.\n *\n * @method Phaser.Loader.File#hasCacheConflict\n * @since 3.7.0\n *\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\n */\n hasCacheConflict: function ()\n {\n return (this.cache && this.cache.exists(this.key));\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n * This method is often overridden by specific file types.\n *\n * @method Phaser.Loader.File#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n if (this.cache)\n {\n this.cache.add(this.key, this.data);\n }\n\n this.pendingDestroy();\n },\n\n /**\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.File#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.7.0\n */\n pendingDestroy: function (data)\n {\n if (data === undefined) { data = this.data; }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\n\n this.loader.flagForRemoval(this);\n },\n\n /**\n * Destroy this File and any references it holds.\n *\n * @method Phaser.Loader.File#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.cache = null;\n this.xhrSettings = null;\n this.multiFile = null;\n this.linkFile = null;\n this.data = null;\n }\n\n});\n\n/**\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\n *\n * @method Phaser.Loader.File.createObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\n * @param {Blob} blob - A Blob object to create an object URL for.\n * @param {string} defaultType - Default mime type used if blob type is not available.\n */\nFile.createObjectURL = function (image, blob, defaultType)\n{\n if (typeof URL === 'function')\n {\n image.src = URL.createObjectURL(blob);\n }\n else\n {\n var reader = new FileReader();\n\n reader.onload = function ()\n {\n image.removeAttribute('crossOrigin');\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\n };\n\n reader.onerror = image.onerror;\n\n reader.readAsDataURL(blob);\n }\n};\n\n/**\n * Static method for releasing an existing object URL which was previously created\n * by calling {@link File#createObjectURL} method.\n *\n * @method Phaser.Loader.File.revokeObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\n */\nFile.revokeObjectURL = function (image)\n{\n if (typeof URL === 'function')\n {\n URL.revokeObjectURL(image.src);\n }\n};\n\nmodule.exports = File;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar types = {};\n\n/**\n * @namespace Phaser.Loader.FileTypesManager\n */\n\nvar FileTypesManager = {\n\n /**\n * Static method called when a LoaderPlugin is created.\n * \n * Loops through the local types object and injects all of them as\n * properties into the LoaderPlugin instance.\n *\n * @method Phaser.Loader.FileTypesManager.install\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\n */\n install: function (loader)\n {\n for (var key in types)\n {\n loader[key] = types[key];\n }\n },\n\n /**\n * Static method called directly by the File Types.\n * \n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\n *\n * @method Phaser.Loader.FileTypesManager.register\n * @since 3.0.0\n * \n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\n */\n register: function (key, factoryFunction)\n {\n types[key] = factoryFunction;\n },\n\n /**\n * Removed all associated file types.\n *\n * @method Phaser.Loader.FileTypesManager.destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n types = {};\n }\n\n};\n\nmodule.exports = FileTypesManager;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Given a File and a baseURL value this returns the URL the File will use to download from.\n *\n * @function Phaser.Loader.GetURL\n * @since 3.0.0\n *\n * @param {Phaser.Loader.File} file - The File object.\n * @param {string} baseURL - A default base URL.\n *\n * @return {string} The URL the File will use.\n */\nvar GetURL = function (file, baseURL)\n{\n if (!file.url)\n {\n return false;\n }\n\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n return file.url;\n }\n else\n {\n return baseURL + file.url;\n }\n};\n\nmodule.exports = GetURL;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Extend = require('../utils/object/Extend');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\n *\n * The new object is seeded by the values given in the global settings, but any setting in\n * the local object overrides the global ones.\n *\n * @function Phaser.Loader.MergeXHRSettings\n * @since 3.0.0\n *\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\n *\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\n */\nvar MergeXHRSettings = function (global, local)\n{\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\n\n if (local)\n {\n for (var setting in local)\n {\n if (local[setting] !== undefined)\n {\n output[setting] = local[setting];\n }\n }\n }\n\n return output;\n};\n\nmodule.exports = MergeXHRSettings;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\n * \n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class MultiFile\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.7.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {string} type - The file type string for sorting within the Loader.\n * @param {string} key - The key of the file within the loader.\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\n */\nvar MultiFile = new Class({\n\n initialize:\n\n function MultiFile (loader, type, key, files)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.MultiFile#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.7.0\n */\n this.loader = loader;\n\n /**\n * The file type string for sorting within the Loader.\n *\n * @name Phaser.Loader.MultiFile#type\n * @type {string}\n * @since 3.7.0\n */\n this.type = type;\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.MultiFile#key\n * @type {string}\n * @since 3.7.0\n */\n this.key = key;\n\n /**\n * The current index being used by multi-file loaders to avoid key clashes.\n *\n * @name Phaser.Loader.MultiFile#multiKeyIndex\n * @type {integer}\n * @private\n * @since 3.20.0\n */\n this.multiKeyIndex = loader.multiKeyIndex++;\n\n /**\n * Array of files that make up this MultiFile.\n *\n * @name Phaser.Loader.MultiFile#files\n * @type {Phaser.Loader.File[]}\n * @since 3.7.0\n */\n this.files = files;\n\n /**\n * The completion status of this MultiFile.\n *\n * @name Phaser.Loader.MultiFile#complete\n * @type {boolean}\n * @default false\n * @since 3.7.0\n */\n this.complete = false;\n\n /**\n * The number of files to load.\n *\n * @name Phaser.Loader.MultiFile#pending\n * @type {integer}\n * @since 3.7.0\n */\n\n this.pending = files.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {integer}\n * @default 0\n * @since 3.7.0\n */\n this.failed = 0;\n\n /**\n * A storage container for transient data that the loading files need.\n *\n * @name Phaser.Loader.MultiFile#config\n * @type {any}\n * @since 3.7.0\n */\n this.config = {};\n\n /**\n * A reference to the Loaders baseURL at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#baseURL\n * @type {string}\n * @since 3.20.0\n */\n this.baseURL = loader.baseURL;\n\n /**\n * A reference to the Loaders path at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#path\n * @type {string}\n * @since 3.20.0\n */\n this.path = loader.path;\n\n /**\n * A reference to the Loaders prefix at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#prefix\n * @type {string}\n * @since 3.20.0\n */\n this.prefix = loader.prefix;\n\n // Link the files\n for (var i = 0; i < files.length; i++)\n {\n files[i].multiFile = this;\n }\n },\n\n /**\n * Checks if this MultiFile is ready to process its children or not.\n *\n * @method Phaser.Loader.MultiFile#isReadyToProcess\n * @since 3.7.0\n *\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\n */\n isReadyToProcess: function ()\n {\n return (this.pending === 0 && this.failed === 0 && !this.complete);\n },\n\n /**\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\n *\n * @method Phaser.Loader.MultiFile#addToMultiFile\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\n *\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\n */\n addToMultiFile: function (file)\n {\n this.files.push(file);\n\n file.multiFile = this;\n\n this.pending++;\n\n this.complete = false;\n\n return this;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.MultiFile#onFileComplete\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n }\n },\n\n /**\n * Called by each File that fails to load.\n *\n * @method Phaser.Loader.MultiFile#onFileFailed\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} file - The File that has failed to load.\n */\n onFileFailed: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.failed++;\n }\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MergeXHRSettings = require('./MergeXHRSettings');\n\n/**\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\n * and starts the download of it. It uses the Files own XHRSettings and merges them\n * with the global XHRSettings object to set the xhr values before download.\n *\n * @function Phaser.Loader.XHRLoader\n * @since 3.0.0\n *\n * @param {Phaser.Loader.File} file - The File to download.\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\n *\n * @return {XMLHttpRequest} The XHR object.\n */\nvar XHRLoader = function (file, globalXHRSettings)\n{\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\n\n var xhr = new XMLHttpRequest();\n\n xhr.open('GET', file.src, config.async, config.user, config.password);\n\n xhr.responseType = file.xhrSettings.responseType;\n xhr.timeout = config.timeout;\n\n if (config.headers)\n {\n for (var key in config.headers)\n {\n xhr.setRequestHeader(key, config.headers[key]);\n }\n }\n\n if (config.header && config.headerValue)\n {\n xhr.setRequestHeader(config.header, config.headerValue);\n }\n\n if (config.requestedWith)\n {\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\n }\n\n if (config.overrideMimeType)\n {\n xhr.overrideMimeType(config.overrideMimeType);\n }\n\n if (config.withCredentials)\n {\n xhr.withCredentials = true;\n }\n\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\n\n xhr.onload = file.onLoad.bind(file, xhr);\n xhr.onerror = file.onError.bind(file, xhr);\n xhr.onprogress = file.onProgress.bind(file);\n\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\n // xhr.onreadystatechange\n\n xhr.send();\n\n return xhr;\n};\n\nmodule.exports = XHRLoader;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Creates an XHRSettings Object with default values.\n *\n * @function Phaser.Loader.XHRSettings\n * @since 3.0.0\n *\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\n * @param {boolean} [async=true] - Should the XHR request use async or not?\n * @param {string} [user=''] - Optional username for the XHR request.\n * @param {string} [password=''] - Optional password for the XHR request.\n * @param {integer} [timeout=0] - Optional XHR timeout value.\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\n *\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\n */\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\n{\n if (responseType === undefined) { responseType = ''; }\n if (async === undefined) { async = true; }\n if (user === undefined) { user = ''; }\n if (password === undefined) { password = ''; }\n if (timeout === undefined) { timeout = 0; }\n if (withCredentials === undefined) { withCredentials = false; }\n\n // Before sending a request, set the xhr.responseType to \"text\",\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\n\n return {\n\n // Ignored by the Loader, only used by File.\n responseType: responseType,\n\n async: async,\n\n // credentials\n user: user,\n password: password,\n\n // timeout in ms (0 = no timeout)\n timeout: timeout,\n\n // setRequestHeader\n headers: undefined,\n header: undefined,\n headerValue: undefined,\n requestedWith: false,\n\n // overrideMimeType\n overrideMimeType: undefined,\n\n // withCredentials\n withCredentials: withCredentials\n\n };\n};\n\nmodule.exports = XHRSettings;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FILE_CONST = {\n\n /**\n * The Loader is idle.\n * \n * @name Phaser.Loader.LOADER_IDLE\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_IDLE: 0,\n\n /**\n * The Loader is actively loading.\n * \n * @name Phaser.Loader.LOADER_LOADING\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_LOADING: 1,\n\n /**\n * The Loader is processing files is has loaded.\n * \n * @name Phaser.Loader.LOADER_PROCESSING\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_PROCESSING: 2,\n\n /**\n * The Loader has completed loading and processing.\n * \n * @name Phaser.Loader.LOADER_COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_COMPLETE: 3,\n\n /**\n * The Loader is shutting down.\n * \n * @name Phaser.Loader.LOADER_SHUTDOWN\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_SHUTDOWN: 4,\n\n /**\n * The Loader has been destroyed.\n * \n * @name Phaser.Loader.LOADER_DESTROYED\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_DESTROYED: 5,\n\n /**\n * File is in the load queue but not yet started\n * \n * @name Phaser.Loader.FILE_PENDING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_PENDING: 10,\n\n /**\n * File has been started to load by the loader (onLoad called)\n * \n * @name Phaser.Loader.FILE_LOADING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_LOADING: 11,\n\n /**\n * File has loaded successfully, awaiting processing \n * \n * @name Phaser.Loader.FILE_LOADED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_LOADED: 12,\n\n /**\n * File failed to load\n * \n * @name Phaser.Loader.FILE_FAILED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_FAILED: 13,\n\n /**\n * File is being processed (onProcess callback)\n * \n * @name Phaser.Loader.FILE_PROCESSING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_PROCESSING: 14,\n\n /**\n * The File has errored somehow during processing.\n * \n * @name Phaser.Loader.FILE_ERRORED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_ERRORED: 16,\n\n /**\n * File has finished processing.\n * \n * @name Phaser.Loader.FILE_COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n FILE_COMPLETE: 17,\n\n /**\n * File has been destroyed\n * \n * @name Phaser.Loader.FILE_DESTROYED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_DESTROYED: 18,\n\n /**\n * File was populated from local data and doesn't need an HTTP request\n * \n * @name Phaser.Loader.FILE_POPULATED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_POPULATED: 19\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Add File Event.\n * \n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\n * \n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\n * \n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\n *\n * @event Phaser.Loader.Events#ADD\n * @since 3.0.0\n * \n * @param {string} key - The unique key of the file that was added to the Loader.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\n */\nmodule.exports = 'addfile';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Complete Event.\n * \n * This event is dispatched when the Loader has fully processed everything in the load queue.\n * By this point every loaded file will now be in its associated cache and ready for use.\n * \n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\n *\n * @event Phaser.Loader.Events#COMPLETE\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {integer} totalComplete - The total number of files that successfully loaded.\n * @param {integer} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Complete Event.\n * \n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\n * \n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\n * \n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\n *\n * @event Phaser.Loader.Events#FILE_COMPLETE\n * @since 3.0.0\n * \n * @param {string} key - The key of the file that just loaded and finished processing.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\n * @param {any} data - The raw data the file contained.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Complete Event.\n * \n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\n * \n * It uses a special dynamic event name constructed from the key and type of the file.\n * \n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\n * using the following:\n *\n * ```javascript\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n *\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\n * \n * ```javascript\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n * \n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\n * \n * ```javascript\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n * \n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\n *\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.0.0\n * \n * @param {string} key - The key of the file that just loaded and finished processing.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\n * @param {any} data - The raw data the file contained.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Error Event.\n * \n * This event is dispatched by the Loader Plugin when a file fails to load.\n * \n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\n */\nmodule.exports = 'loaderror';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Event.\n * \n * This event is dispatched by the Loader Plugin when a file finishes loading,\n * but _before_ it is processed and added to the internal Phaser caches.\n * \n * Listen to it from a Scene using: `this.load.on('load', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_LOAD\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\n */\nmodule.exports = 'load';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Progress Event.\n * \n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\n * \n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\n */\nmodule.exports = 'fileprogress';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Post Process Event.\n * \n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\n * It is dispatched before the internal lists are cleared and each File is destroyed.\n * \n * Use this hook to perform any last minute processing of files that can only happen once the\n * Loader has completed, but prior to it emitting the `complete` event.\n * \n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\n *\n * @event Phaser.Loader.Events#POST_PROCESS\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n */\nmodule.exports = 'postprocess';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Progress Event.\n * \n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\n * \n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\n *\n * @event Phaser.Loader.Events#PROGRESS\n * @since 3.0.0\n * \n * @param {number} progress - The current progress of the load. A value between 0 and 1.\n */\nmodule.exports = 'progress';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Start Event.\n * \n * This event is dispatched when the Loader starts running. At this point load progress is zero.\n * \n * This event is dispatched even if there aren't any files in the load queue.\n * \n * Listen to it from a Scene using: `this.load.on('start', listener)`.\n *\n * @event Phaser.Loader.Events#START\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Loader.Events\n */\n\nmodule.exports = {\n\n ADD: require('./ADD_EVENT'),\n COMPLETE: require('./COMPLETE_EVENT'),\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\n PROGRESS: require('./PROGRESS_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single Image File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\n *\n * @class ImageFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\n */\nvar ImageFile = new Class({\n\n Extends: File,\n\n initialize:\n\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\n {\n var extension = 'png';\n var normalMapURL;\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n normalMapURL = GetFastValue(config, 'normalMap');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n frameConfig = GetFastValue(config, 'frameConfig');\n }\n\n if (Array.isArray(url))\n {\n normalMapURL = url[1];\n url = url[0];\n }\n\n var fileConfig = {\n type: 'image',\n cache: loader.textureManager,\n extension: extension,\n responseType: 'blob',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: frameConfig\n };\n\n File.call(this, loader, fileConfig);\n\n // Do we have a normal map to load as well?\n if (normalMapURL)\n {\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\n\n normalMap.type = 'normalMap';\n\n this.setLink(normalMap);\n\n loader.addFile(normalMap);\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n File.revokeObjectURL(_this.data);\n\n _this.onProcessComplete();\n };\n\n this.data.onerror = function ()\n {\n File.revokeObjectURL(_this.data);\n\n _this.onProcessError();\n };\n\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n var texture;\n var linkFile = this.linkFile;\n\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\n {\n if (this.type === 'image')\n {\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\n }\n else\n {\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\n }\n\n this.pendingDestroy(texture);\n\n linkFile.pendingDestroy(texture);\n }\n else if (!linkFile)\n {\n texture = this.cache.addImage(this.key, this.data);\n\n this.pendingDestroy(texture);\n }\n }\n\n});\n\n/**\n * Adds an Image, or array of Images, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.image('logo', 'images/phaserLogo.png');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\n * of animated gifs to Canvas elements.\n *\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the Texture Manager first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.image({\n * key: 'logo',\n * url: 'images/AtariLogo.png'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\n *\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\n *\n * ```javascript\n * this.load.image('logo', 'images/AtariLogo.png');\n * // and later in your game ...\n * this.add.image(x, y, 'logo');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the image from the Texture Manager.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\n *\n * ```javascript\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\n * ```\n *\n * Or, if you are using a config object use the `normalMap` property:\n *\n * ```javascript\n * this.load.image({\n * key: 'logo',\n * url: 'images/AtariLogo.png',\n * normalMap: 'images/AtariLogo-n.png'\n * });\n * ```\n *\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\n * Normal maps are a WebGL only feature.\n *\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#image\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('image', function (key, url, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new ImageFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new ImageFile(this, key, url, xhrSettings));\n }\n\n return this;\n});\n\nmodule.exports = ImageFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar GetValue = require('../../utils/object/GetValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single JSON File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\n *\n * @class JSONFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n */\nvar JSONFile = new Class({\n\n Extends: File,\n\n initialize:\n\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\n\n function JSONFile (loader, key, url, xhrSettings, dataKey)\n {\n var extension = 'json';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n dataKey = GetFastValue(config, 'dataKey', dataKey);\n }\n\n var fileConfig = {\n type: 'json',\n cache: loader.cacheManager.json,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: dataKey\n };\n\n File.call(this, loader, fileConfig);\n\n if (IsPlainObject(url))\n {\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\n if (dataKey)\n {\n this.data = GetValue(url, dataKey);\n }\n else\n {\n this.data = url;\n }\n\n this.state = CONST.FILE_POPULATED;\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n if (this.state !== CONST.FILE_POPULATED)\n {\n this.state = CONST.FILE_PROCESSING;\n\n var json = JSON.parse(this.xhrLoader.responseText);\n\n var key = this.config;\n\n if (typeof key === 'string')\n {\n this.data = GetValue(json, key, json);\n }\n else\n {\n this.data = json;\n }\n }\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a JSON file, or array of JSON files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the JSON Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.json({\n * key: 'wavedata',\n * url: 'files/AlienWaveData.json'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * // and later in your game ...\n * var data = this.cache.json.get('wavedata');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\n * this is what you would use to retrieve the text from the JSON Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\n * rather than the whole file. For example, if your JSON data had a structure like this:\n *\n * ```json\n * {\n * \"level1\": {\n * \"baddies\": {\n * \"aliens\": {},\n * \"boss\": {}\n * }\n * },\n * \"level2\": {},\n * \"level3\": {}\n * }\n * ```\n *\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\n *\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#json\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new JSONFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\n }\n\n return this;\n});\n\nmodule.exports = JSONFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single Text File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\n *\n * @class TextFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n */\nvar TextFile = new Class({\n\n Extends: File,\n\n initialize:\n\n function TextFile (loader, key, url, xhrSettings)\n {\n var extension = 'txt';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n }\n\n var fileConfig = {\n type: 'text',\n cache: loader.cacheManager.text,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings\n };\n\n File.call(this, loader, fileConfig);\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.data = this.xhrLoader.responseText;\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a Text file, or array of Text files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.text('story', 'files/IntroStory.txt');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the Text Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.text({\n * key: 'story',\n * url: 'files/IntroStory.txt'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.text('story', 'files/IntroStory.txt');\n * // and later in your game ...\n * var data = this.cache.text.get('story');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\n * this is what you would use to retrieve the text from the Text Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#text\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('text', function (key, url, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new TextFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new TextFile(this, key, url, xhrSettings));\n }\n\n return this;\n});\n\nmodule.exports = TextFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the mean average of the given values.\n *\n * @function Phaser.Math.Average\n * @since 3.0.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The average value.\n */\nvar Average = function (values)\n{\n var sum = 0;\n\n for (var i = 0; i < values.length; i++)\n {\n sum += (+values[i]);\n }\n\n return sum / values.length;\n};\n\nmodule.exports = Average;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Factorial = require('./Factorial');\n\n/**\n * Calculates the Bernstein basis from the three factorial coefficients.\n *\n * @function Phaser.Math.Bernstein\n * @since 3.0.0\n *\n * @param {number} n - The first value.\n * @param {number} i - The second value.\n *\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\n */\nvar Bernstein = function (n, i)\n{\n return Factorial(n) / Factorial(i) / Factorial(n - i);\n};\n\nmodule.exports = Bernstein;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random integer between the `min` and `max` values, inclusive.\n *\n * @function Phaser.Math.Between\n * @since 3.0.0\n *\n * @param {integer} min - The minimum value.\n * @param {integer} max - The maximum value.\n *\n * @return {integer} The random integer.\n */\nvar Between = function (min, max)\n{\n return Math.floor(Math.random() * (max - min + 1) + min);\n};\n\nmodule.exports = Between;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\n *\n * @function Phaser.Math.CatmullRom\n * @since 3.0.0\n *\n * @param {number} t - The amount to interpolate by.\n * @param {number} p0 - The first control point.\n * @param {number} p1 - The second control point.\n * @param {number} p2 - The third control point.\n * @param {number} p3 - The fourth control point.\n *\n * @return {number} The Catmull-Rom value.\n */\nvar CatmullRom = function (t, p0, p1, p2, p3)\n{\n var v0 = (p2 - p0) * 0.5;\n var v1 = (p3 - p1) * 0.5;\n var t2 = t * t;\n var t3 = t * t2;\n\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n};\n\nmodule.exports = CatmullRom;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\n *\n * The `place` is represented by the power applied to `base` to get that place.\n *\n * @function Phaser.Math.CeilTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {number} [place=0] - The place to round to.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar CeilTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.ceil(value * p) / p;\n};\n\nmodule.exports = CeilTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\n *\n * @function Phaser.Math.Clamp\n * @since 3.0.0\n *\n * @param {number} value - The value to be clamped.\n * @param {number} min - The minimum bounds.\n * @param {number} max - The maximum bounds.\n *\n * @return {number} The clamped value.\n */\nvar Clamp = function (value, min, max)\n{\n return Math.max(min, Math.min(max, value));\n};\n\nmodule.exports = Clamp;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\n\n/**\n * Convert the given angle from degrees, to the equivalent angle in radians.\n *\n * @function Phaser.Math.DegToRad\n * @since 3.0.0\n *\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\n *\n * @return {number} The given angle converted to radians.\n */\nvar DegToRad = function (degrees)\n{\n return degrees * CONST.DEG_TO_RAD;\n};\n\nmodule.exports = DegToRad;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the positive difference of two given numbers.\n *\n * @function Phaser.Math.Difference\n * @since 3.0.0\n *\n * @param {number} a - The first number in the calculation.\n * @param {number} b - The second number in the calculation.\n *\n * @return {number} The positive difference of the two given numbers.\n */\nvar Difference = function (a, b)\n{\n return Math.abs(a - b);\n};\n\nmodule.exports = Difference;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the factorial of a given number for integer values greater than 0.\n *\n * @function Phaser.Math.Factorial\n * @since 3.0.0\n *\n * @param {number} value - A positive integer to calculate the factorial of.\n *\n * @return {number} The factorial of the given number.\n */\nvar Factorial = function (value)\n{\n if (value === 0)\n {\n return 1;\n }\n\n var res = value;\n\n while (--value)\n {\n res *= value;\n }\n\n return res;\n};\n\nmodule.exports = Factorial;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\n *\n * @function Phaser.Math.FloatBetween\n * @since 3.0.0\n *\n * @param {number} min - The lower bound for the float, inclusive.\n * @param {number} max - The upper bound for the float exclusive.\n *\n * @return {number} A random float within the given range.\n */\nvar FloatBetween = function (min, max)\n{\n return Math.random() * (max - min) + min;\n};\n\nmodule.exports = FloatBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\n *\n * The `place` is represented by the power applied to `base` to get that place.\n *\n * @function Phaser.Math.FloorTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {integer} [place=0] - The place to round to.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar FloorTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.floor(value * p) / p;\n};\n\nmodule.exports = FloorTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\n\n/**\n * Return a value based on the range between `min` and `max` and the percentage given.\n *\n * @function Phaser.Math.FromPercent\n * @since 3.0.0\n *\n * @param {number} percent - A value between 0 and 1 representing the percentage.\n * @param {number} min - The minimum value.\n * @param {number} [max] - The maximum value.\n *\n * @return {number} The value that is `percent` percent between `min` and `max`.\n */\nvar FromPercent = function (percent, min, max)\n{\n percent = Clamp(percent, 0, 1);\n\n return (max - min) * percent;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a per-ms speed from a distance and time (given in seconds).\n *\n * @function Phaser.Math.GetSpeed\n * @since 3.0.0\n *\n * @param {number} distance - The distance.\n * @param {integer} time - The time, in seconds.\n *\n * @return {number} The speed, in distance per ms.\n *\n * @example\n * // 400px over 1 second is 0.4 px/ms\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\n */\nvar GetSpeed = function (distance, time)\n{\n return (distance / time) / 1000;\n};\n\nmodule.exports = GetSpeed;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check if a given value is an even number.\n *\n * @function Phaser.Math.IsEven\n * @since 3.0.0\n *\n * @param {number} value - The number to perform the check with.\n *\n * @return {boolean} Whether the number is even or not.\n */\nvar IsEven = function (value)\n{\n // Use abstract equality == for \"is number\" test\n\n // eslint-disable-next-line eqeqeq\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\n};\n\nmodule.exports = IsEven;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check if a given value is an even number using a strict type check.\n *\n * @function Phaser.Math.IsEvenStrict\n * @since 3.0.0\n *\n * @param {number} value - The number to perform the check with.\n *\n * @return {boolean} Whether the number is even or not.\n */\nvar IsEvenStrict = function (value)\n{\n // Use strict equality === for \"is number\" test\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\n};\n\nmodule.exports = IsEvenStrict;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates a linear (interpolation) value over t.\n *\n * @function Phaser.Math.Linear\n * @since 3.0.0\n *\n * @param {number} p0 - The first point.\n * @param {number} p1 - The second point.\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\n *\n * @return {number} The step t% of the way between p0 and p1.\n */\nvar Linear = function (p0, p1, t)\n{\n return (p1 - p0) * t + p0;\n};\n\nmodule.exports = Linear;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A three-dimensional matrix.\n *\n * Defaults to the identity matrix when instantiated.\n *\n * @class Matrix3\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\n */\nvar Matrix3 = new Class({\n\n initialize:\n\n function Matrix3 (m)\n {\n /**\n * The matrix values.\n *\n * @name Phaser.Math.Matrix3#val\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.val = new Float32Array(9);\n\n if (m)\n {\n // Assume Matrix3 with val:\n this.copy(m);\n }\n else\n {\n // Default to identity\n this.identity();\n }\n },\n\n /**\n * Make a clone of this Matrix3.\n *\n * @method Phaser.Math.Matrix3#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\n */\n clone: function ()\n {\n return new Matrix3(this);\n },\n\n /**\n * This method is an alias for `Matrix3.copy`.\n *\n * @method Phaser.Math.Matrix3#set\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Copy the values of a given Matrix into this Matrix.\n *\n * @method Phaser.Math.Matrix3#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n copy: function (src)\n {\n var out = this.val;\n var a = src.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n\n return this;\n },\n\n /**\n * Copy the values of a given Matrix4 into this Matrix3.\n *\n * @method Phaser.Math.Matrix3#fromMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromMat4: function (m)\n {\n var a = m.val;\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given array.\n *\n * @method Phaser.Math.Matrix3#fromArray\n * @since 3.0.0\n *\n * @param {array} a - The array to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromArray: function (a)\n {\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n\n return this;\n },\n\n /**\n * Reset this Matrix to an identity (default) matrix.\n *\n * @method Phaser.Math.Matrix3#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n identity: function ()\n {\n var out = this.val;\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n\n return this;\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix3#transpose\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n transpose: function ()\n {\n var a = this.val;\n var a01 = a[1];\n var a02 = a[2];\n var a12 = a[5];\n\n a[1] = a[3];\n a[2] = a[6];\n a[3] = a01;\n a[5] = a[7];\n a[6] = a02;\n a[7] = a12;\n\n return this;\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix3#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n invert: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20;\n\n // Calculate the determinant\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n a[0] = b01 * det;\n a[1] = (-a22 * a01 + a02 * a21) * det;\n a[2] = (a12 * a01 - a02 * a11) * det;\n a[3] = b11 * det;\n a[4] = (a22 * a00 - a02 * a20) * det;\n a[5] = (-a12 * a00 + a02 * a10) * det;\n a[6] = b21 * det;\n a[7] = (-a21 * a00 + a01 * a20) * det;\n a[8] = (a11 * a00 - a01 * a10) * det;\n\n return this;\n },\n\n /**\n * Calculate the adjoint, or adjugate, of this Matrix.\n *\n * @method Phaser.Math.Matrix3#adjoint\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n adjoint: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n a[0] = (a11 * a22 - a12 * a21);\n a[1] = (a02 * a21 - a01 * a22);\n a[2] = (a01 * a12 - a02 * a11);\n a[3] = (a12 * a20 - a10 * a22);\n a[4] = (a00 * a22 - a02 * a20);\n a[5] = (a02 * a10 - a00 * a12);\n a[6] = (a10 * a21 - a11 * a20);\n a[7] = (a01 * a20 - a00 * a21);\n a[8] = (a00 * a11 - a01 * a10);\n\n return this;\n },\n\n /**\n * Calculate the determinant of this Matrix.\n *\n * @method Phaser.Math.Matrix3#determinant\n * @since 3.0.0\n *\n * @return {number} The determinant of this Matrix.\n */\n determinant: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n *\n * @method Phaser.Math.Matrix3#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n multiply: function (src)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n var b = src.val;\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b10 = b[3];\n var b11 = b[4];\n var b12 = b[5];\n var b20 = b[6];\n var b21 = b[7];\n var b22 = b[8];\n\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\n\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\n\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\n\n return this;\n },\n\n /**\n * Translate this Matrix using the given Vector.\n *\n * @method Phaser.Math.Matrix3#translate\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n translate: function (v)\n {\n var a = this.val;\n var x = v.x;\n var y = v.y;\n\n a[6] = x * a[0] + y * a[3] + a[6];\n a[7] = x * a[1] + y * a[4] + a[7];\n a[8] = x * a[2] + y * a[5] + a[8];\n\n return this;\n },\n\n /**\n * Apply a rotation transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix3#rotate\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n rotate: function (rad)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n a[0] = c * a00 + s * a10;\n a[1] = c * a01 + s * a11;\n a[2] = c * a02 + s * a12;\n\n a[3] = c * a10 - s * a00;\n a[4] = c * a11 - s * a01;\n a[5] = c * a12 - s * a02;\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\n *\n * @method Phaser.Math.Matrix3#scale\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n scale: function (v)\n {\n var a = this.val;\n var x = v.x;\n var y = v.y;\n\n a[0] = x * a[0];\n a[1] = x * a[1];\n a[2] = x * a[2];\n\n a[3] = y * a[3];\n a[4] = y * a[4];\n a[5] = y * a[5];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given Quaternion.\n *\n * @method Phaser.Math.Matrix3#fromQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromQuat: function (q)\n {\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n var out = this.val;\n\n out[0] = 1 - (yy + zz);\n out[3] = xy + wz;\n out[6] = xz - wy;\n\n out[1] = xy - wz;\n out[4] = 1 - (xx + zz);\n out[7] = yz + wx;\n\n out[2] = xz + wy;\n out[5] = yz - wx;\n out[8] = 1 - (xx + yy);\n\n return this;\n },\n\n /**\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\n *\n * @method Phaser.Math.Matrix3#normalFromMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n normalFromMat4: function (m)\n {\n var a = m.val;\n var out = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\n return this;\n }\n\n});\n\nmodule.exports = Matrix3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\n *\n * @class Matrix4\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\n */\nvar Matrix4 = new Class({\n\n initialize:\n\n function Matrix4 (m)\n {\n /**\n * The matrix values.\n *\n * @name Phaser.Math.Matrix4#val\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.val = new Float32Array(16);\n\n if (m)\n {\n // Assume Matrix4 with val:\n this.copy(m);\n }\n else\n {\n // Default to identity\n this.identity();\n }\n },\n\n /**\n * Make a clone of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\n */\n clone: function ()\n {\n return new Matrix4(this);\n },\n\n // TODO - Should work with basic values\n\n /**\n * This method is an alias for `Matrix4.copy`.\n *\n * @method Phaser.Math.Matrix4#set\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Copy the values of a given Matrix into this Matrix.\n *\n * @method Phaser.Math.Matrix4#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n copy: function (src)\n {\n var out = this.val;\n var a = src.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given array.\n *\n * @method Phaser.Math.Matrix4#fromArray\n * @since 3.0.0\n *\n * @param {array} a - The array to copy the values from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromArray: function (a)\n {\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n\n return this;\n },\n\n /**\n * Reset this Matrix.\n *\n * Sets all values to `0`.\n *\n * @method Phaser.Math.Matrix4#zero\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n zero: function ()\n {\n var out = this.val;\n\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Set the `x`, `y` and `z` values of this Matrix.\n *\n * @method Phaser.Math.Matrix4#xyz\n * @since 3.0.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} z - The z value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n xyz: function (x, y, z)\n {\n this.identity();\n\n var out = this.val;\n\n out[12] = x;\n out[13] = y;\n out[14] = z;\n\n return this;\n },\n\n /**\n * Set the scaling values of this Matrix.\n *\n * @method Phaser.Math.Matrix4#scaling\n * @since 3.0.0\n *\n * @param {number} x - The x scaling value.\n * @param {number} y - The y scaling value.\n * @param {number} z - The z scaling value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scaling: function (x, y, z)\n {\n this.zero();\n\n var out = this.val;\n\n out[0] = x;\n out[5] = y;\n out[10] = z;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Reset this Matrix to an identity (default) matrix.\n *\n * @method Phaser.Math.Matrix4#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n identity: function ()\n {\n var out = this.val;\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n transpose: function ()\n {\n var a = this.val;\n\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a12 = a[6];\n var a13 = a[7];\n var a23 = a[11];\n\n a[1] = a[4];\n a[2] = a[8];\n a[3] = a[12];\n a[4] = a01;\n a[6] = a[9];\n a[7] = a[13];\n a[8] = a02;\n a[9] = a12;\n a[11] = a[14];\n a[12] = a03;\n a[13] = a13;\n a[14] = a23;\n\n return this;\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n invert: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n return this;\n },\n\n /**\n * Calculate the adjoint, or adjugate, of this Matrix.\n *\n * @method Phaser.Math.Matrix4#adjoint\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n adjoint: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\n\n return this;\n },\n\n /**\n * Calculate the determinant of this Matrix.\n *\n * @method Phaser.Math.Matrix4#determinant\n * @since 3.0.0\n *\n * @return {number} The determinant of this Matrix.\n */\n determinant: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n *\n * @method Phaser.Math.Matrix4#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n multiply: function (src)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b = src.val;\n\n // Cache only the current line of the second matrix\n var b0 = b[0];\n var b1 = b[1];\n var b2 = b[2];\n var b3 = b[3];\n\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n return this;\n },\n\n /**\n * Multiply the values of this Matrix4 by those given in the `src` argument.\n *\n * @method Phaser.Math.Matrix4#multiplyLocal\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = [];\n var m1 = this.val;\n var m2 = src.val;\n\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\n\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\n\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\n\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\n\n return this.fromArray(a);\n },\n\n /**\n * Translate this Matrix using the given Vector.\n *\n * @method Phaser.Math.Matrix4#translate\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n translate: function (v)\n {\n var x = v.x;\n var y = v.y;\n var z = v.z;\n var a = this.val;\n\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n\n return this;\n },\n\n /**\n * Translate this Matrix using the given values.\n *\n * @method Phaser.Math.Matrix4#translateXYZ\n * @since 3.16.0\n *\n * @param {number} x - The x component.\n * @param {number} y - The y component.\n * @param {number} z - The z component.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n translateXYZ: function (x, y, z)\n {\n var a = this.val;\n\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\n *\n * @method Phaser.Math.Matrix4#scale\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scale: function (v)\n {\n var x = v.x;\n var y = v.y;\n var z = v.z;\n var a = this.val;\n\n a[0] = a[0] * x;\n a[1] = a[1] * x;\n a[2] = a[2] * x;\n a[3] = a[3] * x;\n\n a[4] = a[4] * y;\n a[5] = a[5] * y;\n a[6] = a[6] * y;\n a[7] = a[7] * y;\n\n a[8] = a[8] * z;\n a[9] = a[9] * z;\n a[10] = a[10] * z;\n a[11] = a[11] * z;\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix4#scaleXYZ\n * @since 3.16.0\n *\n * @param {number} x - The x component.\n * @param {number} y - The y component.\n * @param {number} z - The z component.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scaleXYZ: function (x, y, z)\n {\n var a = this.val;\n\n a[0] = a[0] * x;\n a[1] = a[1] * x;\n a[2] = a[2] * x;\n a[3] = a[3] * x;\n\n a[4] = a[4] * y;\n a[5] = a[5] * y;\n a[6] = a[6] * y;\n a[7] = a[7] * y;\n\n a[8] = a[8] * z;\n a[9] = a[9] * z;\n a[10] = a[10] * z;\n a[11] = a[11] * z;\n\n return this;\n },\n\n /**\n * Derive a rotation matrix around the given axis.\n *\n * @method Phaser.Math.Matrix4#makeRotationAxis\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\n * @param {number} angle - The rotation angle in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n makeRotationAxis: function (axis, angle)\n {\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\n\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n var t = 1 - c;\n var x = axis.x;\n var y = axis.y;\n var z = axis.z;\n var tx = t * x;\n var ty = t * y;\n\n this.fromArray([\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\n 0, 0, 0, 1\n ]);\n\n return this;\n },\n\n /**\n * Apply a rotation transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix4#rotate\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotate: function (rad, axis)\n {\n var a = this.val;\n var x = axis.x;\n var y = axis.y;\n var z = axis.z;\n var len = Math.sqrt(x * x + y * y + z * z);\n\n if (Math.abs(len) < EPSILON)\n {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var t = 1 - c;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Construct the elements of the rotation matrix\n var b00 = x * x * t + c;\n var b01 = y * x * t + z * s;\n var b02 = z * x * t - y * s;\n\n var b10 = x * y * t - z * s;\n var b11 = y * y * t + c;\n var b12 = z * y * t + x * s;\n\n var b20 = x * z * t + y * s;\n var b21 = y * z * t - x * s;\n var b22 = z * z * t + c;\n\n // Perform rotation-specific matrix multiplication\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its X axis.\n *\n * @method Phaser.Math.Matrix4#rotateX\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateX: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Perform axis-specific matrix multiplication\n a[4] = a10 * c + a20 * s;\n a[5] = a11 * c + a21 * s;\n a[6] = a12 * c + a22 * s;\n a[7] = a13 * c + a23 * s;\n a[8] = a20 * c - a10 * s;\n a[9] = a21 * c - a11 * s;\n a[10] = a22 * c - a12 * s;\n a[11] = a23 * c - a13 * s;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its Y axis.\n *\n * @method Phaser.Math.Matrix4#rotateY\n * @since 3.0.0\n *\n * @param {number} rad - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateY: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Perform axis-specific matrix multiplication\n a[0] = a00 * c - a20 * s;\n a[1] = a01 * c - a21 * s;\n a[2] = a02 * c - a22 * s;\n a[3] = a03 * c - a23 * s;\n a[8] = a00 * s + a20 * c;\n a[9] = a01 * s + a21 * c;\n a[10] = a02 * s + a22 * c;\n a[11] = a03 * s + a23 * c;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its Z axis.\n *\n * @method Phaser.Math.Matrix4#rotateZ\n * @since 3.0.0\n *\n * @param {number} rad - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateZ: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n // Perform axis-specific matrix multiplication\n a[0] = a00 * c + a10 * s;\n a[1] = a01 * c + a11 * s;\n a[2] = a02 * c + a12 * s;\n a[3] = a03 * c + a13 * s;\n a[4] = a10 * c - a00 * s;\n a[5] = a11 * c - a01 * s;\n a[6] = a12 * c - a02 * s;\n a[7] = a13 * c - a03 * s;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\n *\n * @method Phaser.Math.Matrix4#fromRotationTranslation\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\n var out = this.val;\n\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n\n out[12] = v.x;\n out[13] = v.y;\n out[14] = v.z;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given Quaternion.\n *\n * @method Phaser.Math.Matrix4#fromQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromQuat: function (q)\n {\n var out = this.val;\n\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Generate a frustum matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#frustum\n * @since 3.0.0\n *\n * @param {number} left - The left bound of the frustum.\n * @param {number} right - The right bound of the frustum.\n * @param {number} bottom - The bottom bound of the frustum.\n * @param {number} top - The top bound of the frustum.\n * @param {number} near - The near bound of the frustum.\n * @param {number} far - The far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var out = this.val;\n\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n out[0] = (near * 2) * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = (near * 2) * tb;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (far * near * 2) * nf;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate a perspective projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#perspective\n * @since 3.0.0\n *\n * @param {number} fovy - Vertical field of view in radians\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\n * @param {number} near - Near bound of the frustum.\n * @param {number} far - Far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var out = this.val;\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = (far + near) * nf;\n out[11] = -1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (2 * far * near) * nf;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate a perspective projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#perspectiveLH\n * @since 3.0.0\n *\n * @param {number} width - The width of the frustum.\n * @param {number} height - The height of the frustum.\n * @param {number} near - Near bound of the frustum.\n * @param {number} far - Far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n var out = this.val;\n\n out[0] = (2 * near) / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = (2 * near) / height;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = -far / (near - far);\n out[11] = 1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (near * far) / (near - far);\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate an orthogonal projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#ortho\n * @since 3.0.0\n *\n * @param {number} left - The left bound of the frustum.\n * @param {number} right - The right bound of the frustum.\n * @param {number} bottom - The bottom bound of the frustum.\n * @param {number} top - The top bound of the frustum.\n * @param {number} near - The near bound of the frustum.\n * @param {number} far - The far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\n var out = this.val;\n var lr = left - right;\n var bt = bottom - top;\n var nf = near - far;\n\n // Avoid division by zero\n lr = (lr === 0) ? lr : 1 / lr;\n bt = (bt === 0) ? bt : 1 / bt;\n nf = (nf === 0) ? nf : 1 / nf;\n\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAt\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n lookAt: function (eye, center, up)\n {\n var out = this.val;\n\n var eyex = eye.x;\n var eyey = eye.y;\n var eyez = eye.z;\n\n var upx = up.x;\n var upy = up.y;\n var upz = up.z;\n\n var centerx = center.x;\n var centery = center.y;\n var centerz = center.z;\n\n if (Math.abs(eyex - centerx) < EPSILON &&\n Math.abs(eyey - centery) < EPSILON &&\n Math.abs(eyez - centerz) < EPSILON)\n {\n return this.identity();\n }\n\n var z0 = eyex - centerx;\n var z1 = eyey - centery;\n var z2 = eyez - centerz;\n\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n\n z0 *= len;\n z1 *= len;\n z2 *= len;\n\n var x0 = upy * z2 - upz * z1;\n var x1 = upz * z0 - upx * z2;\n var x2 = upx * z1 - upy * z0;\n\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n\n if (!len)\n {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n }\n else\n {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n var y0 = z1 * x2 - z2 * x1;\n var y1 = z2 * x0 - z0 * x2;\n var y2 = z0 * x1 - z1 * x0;\n\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n\n if (!len)\n {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n }\n else\n {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\n *\n * @method Phaser.Math.Matrix4#yawPitchRoll\n * @since 3.0.0\n *\n * @param {number} yaw - The yaw value.\n * @param {number} pitch - The pitch value.\n * @param {number} roll - The roll value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n yawPitchRoll: function (yaw, pitch, roll)\n {\n this.zero();\n _tempMat1.zero();\n _tempMat2.zero();\n\n var m0 = this.val;\n var m1 = _tempMat1.val;\n var m2 = _tempMat2.val;\n\n // Rotate Z\n var s = Math.sin(roll);\n var c = Math.cos(roll);\n\n m0[10] = 1;\n m0[15] = 1;\n m0[0] = c;\n m0[1] = s;\n m0[4] = -s;\n m0[5] = c;\n\n // Rotate X\n s = Math.sin(pitch);\n c = Math.cos(pitch);\n\n m1[0] = 1;\n m1[15] = 1;\n m1[5] = c;\n m1[10] = c;\n m1[9] = -s;\n m1[6] = s;\n\n // Rotate Y\n s = Math.sin(yaw);\n c = Math.cos(yaw);\n\n m2[5] = 1;\n m2[15] = 1;\n m2[0] = c;\n m2[2] = -s;\n m2[8] = s;\n m2[10] = c;\n\n this.multiplyLocal(_tempMat1);\n this.multiplyLocal(_tempMat2);\n\n return this;\n },\n\n /**\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\n *\n * @method Phaser.Math.Matrix4#setWorldMatrix\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\n {\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\n\n _tempMat1.scaling(scale.x, scale.y, scale.z);\n _tempMat2.xyz(position.x, position.y, position.z);\n\n this.multiplyLocal(_tempMat1);\n this.multiplyLocal(_tempMat2);\n\n if (viewMatrix !== undefined)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix !== undefined)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n }\n\n});\n\nvar _tempMat1 = new Matrix4();\nvar _tempMat2 = new Matrix4();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\n *\n * @function Phaser.Math.MaxAdd\n * @since 3.0.0\n *\n * @param {number} value - The value to add to.\n * @param {number} amount - The amount to add.\n * @param {number} max - The maximum value to return.\n *\n * @return {number} The resulting value.\n */\nvar MaxAdd = function (value, amount, max)\n{\n return Math.min(value + amount, max);\n};\n\nmodule.exports = MaxAdd;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\n *\n * @function Phaser.Math.MinSub\n * @since 3.0.0\n *\n * @param {number} value - The value to subtract from.\n * @param {number} amount - The amount to subtract.\n * @param {number} min - The minimum value to return.\n *\n * @return {number} The resulting value.\n */\nvar MinSub = function (value, amount, min)\n{\n return Math.max(value - amount, min);\n};\n\nmodule.exports = MinSub;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Work out what percentage `value` is of the range between `min` and `max`.\n * If `max` isn't given then it will return the percentage of `value` to `min`.\n *\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\n *\n * @function Phaser.Math.Percent\n * @since 3.0.0\n *\n * @param {number} value - The value to determine the percentage of.\n * @param {number} min - The minimum value.\n * @param {number} [max] - The maximum value.\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\n *\n * @return {number} A value between 0 and 1 representing the percentage.\n */\nvar Percent = function (value, min, max, upperMax)\n{\n if (max === undefined) { max = min + 1; }\n\n var percentage = (value - min) / (max - min);\n\n if (percentage > 1)\n {\n if (upperMax !== undefined)\n {\n percentage = ((upperMax - value)) / (upperMax - max);\n\n if (percentage < 0)\n {\n percentage = 0;\n }\n }\n else\n {\n percentage = 1;\n }\n }\n else if (percentage < 0)\n {\n percentage = 0;\n }\n\n return percentage;\n};\n\nmodule.exports = Percent;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\nvar Matrix3 = require('./Matrix3');\n\nvar EPSILON = 0.000001;\n\n// Some shared 'private' arrays\nvar siNext = new Int8Array([ 1, 2, 0 ]);\nvar tmp = new Float32Array([ 0, 0, 0 ]);\n\nvar xUnitVec3 = new Vector3(1, 0, 0);\nvar yUnitVec3 = new Vector3(0, 1, 0);\n\nvar tmpvec = new Vector3();\nvar tmpMat3 = new Matrix3();\n\n/**\n * @classdesc\n * A quaternion.\n *\n * @class Quaternion\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n * @param {number} [w] - The w component.\n */\nvar Quaternion = new Class({\n\n initialize:\n\n function Quaternion (x, y, z, w)\n {\n /**\n * The x component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The y component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The z component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The w component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n },\n\n /**\n * Copy the components of a given Quaternion or Vector into this Quaternion.\n *\n * @method Phaser.Math.Quaternion#copy\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z;\n this.w = src.w;\n\n return this;\n },\n\n /**\n * Set the components of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#set\n * @since 3.0.0\n *\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=0] - The w component.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\n *\n * @method Phaser.Math.Quaternion#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n this.w += v.w;\n\n return this;\n },\n\n /**\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\n *\n * @method Phaser.Math.Quaternion#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n this.w -= v.w;\n\n return this;\n },\n\n /**\n * Scale this Quaternion by the given value.\n *\n * @method Phaser.Math.Quaternion#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Quaternion by.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n scale: function (scale)\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n this.w *= scale;\n\n return this;\n },\n\n /**\n * Calculate the length of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#length\n * @since 3.0.0\n *\n * @return {number} The length of this Quaternion.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return Math.sqrt(x * x + y * y + z * z + w * w);\n },\n\n /**\n * Calculate the length of this Quaternion squared.\n *\n * @method Phaser.Math.Quaternion#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Quaternion, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return x * x + y * y + z * z + w * w;\n },\n\n /**\n * Normalize this Quaternion.\n *\n * @method Phaser.Math.Quaternion#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n this.w = w * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#dot\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\n *\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n },\n\n /**\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#lerp\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\n * @param {number} [t=0] - The percentage of interpolation.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n this.w = aw + t * (v.w - aw);\n\n return this;\n },\n\n /**\n * Rotates this Quaternion based on the two given vectors.\n *\n * @method Phaser.Math.Quaternion#rotationTo\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotationTo: function (a, b)\n {\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\n\n if (dot < -0.999999)\n {\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\n {\n tmpvec.copy(yUnitVec3).cross(a);\n }\n\n tmpvec.normalize();\n\n return this.setAxisAngle(tmpvec, Math.PI);\n\n }\n else if (dot > 0.999999)\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 1;\n\n return this;\n }\n else\n {\n tmpvec.copy(a).cross(b);\n\n this.x = tmpvec.x;\n this.y = tmpvec.y;\n this.z = tmpvec.z;\n this.w = 1 + dot;\n\n return this.normalize();\n }\n },\n\n /**\n * Set the axes of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#setAxes\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} view - The view axis.\n * @param {Phaser.Math.Vector3} right - The right axis.\n * @param {Phaser.Math.Vector3} up - The upwards axis.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setAxes: function (view, right, up)\n {\n var m = tmpMat3.val;\n\n m[0] = right.x;\n m[3] = right.y;\n m[6] = right.z;\n\n m[1] = up.x;\n m[4] = up.y;\n m[7] = up.z;\n\n m[2] = -view.x;\n m[5] = -view.y;\n m[8] = -view.z;\n\n return this.fromMat3(tmpMat3).normalize();\n },\n\n /**\n * Reset this Matrix to an identity (default) Quaternion.\n *\n * @method Phaser.Math.Quaternion#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n identity: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 1;\n\n return this;\n },\n\n /**\n * Set the axis angle of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#setAxisAngle\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} axis - The axis.\n * @param {number} rad - The angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setAxisAngle: function (axis, rad)\n {\n rad = rad * 0.5;\n\n var s = Math.sin(rad);\n\n this.x = s * axis.x;\n this.y = s * axis.y;\n this.z = s * axis.z;\n this.w = Math.cos(rad);\n\n return this;\n },\n\n /**\n * Multiply this Quaternion by the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n multiply: function (b)\n {\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n var bw = b.w;\n\n this.x = ax * bw + aw * bx + ay * bz - az * by;\n this.y = ay * bw + aw * by + az * bx - ax * bz;\n this.z = az * bw + aw * bz + ax * by - ay * bx;\n this.w = aw * bw - ax * bx - ay * by - az * bz;\n\n return this;\n },\n\n /**\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#slerp\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\n * @param {number} t - The percentage of interpolation.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n slerp: function (b, t)\n {\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n var bw = b.w;\n\n // calc cosine\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\n\n // adjust signs (if necessary)\n if (cosom < 0)\n {\n cosom = -cosom;\n bx = - bx;\n by = - by;\n bz = - bz;\n bw = - bw;\n }\n\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n var scale0 = 1 - t;\n var scale1 = t;\n\n // calculate coefficients\n if ((1 - cosom) > EPSILON)\n {\n // standard case (slerp)\n var omega = Math.acos(cosom);\n var sinom = Math.sin(omega);\n\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n }\n\n // calculate final values\n this.x = scale0 * ax + scale1 * bx;\n this.y = scale0 * ay + scale1 * by;\n this.z = scale0 * az + scale1 * bz;\n this.w = scale0 * aw + scale1 * bw;\n\n return this;\n },\n\n /**\n * Invert this Quaternion.\n *\n * @method Phaser.Math.Quaternion#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n invert: function ()\n {\n var a0 = this.x;\n var a1 = this.y;\n var a2 = this.z;\n var a3 = this.w;\n\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = (dot) ? 1 / dot : 0;\n\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n this.x = -a0 * invDot;\n this.y = -a1 * invDot;\n this.z = -a2 * invDot;\n this.w = a3 * invDot;\n\n return this;\n },\n\n /**\n * Convert this Quaternion into its conjugate.\n *\n * Sets the x, y and z components.\n *\n * @method Phaser.Math.Quaternion#conjugate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n conjugate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the X axis.\n *\n * @method Phaser.Math.Quaternion#rotateX\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateX: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw + aw * bx;\n this.y = ay * bw + az * bx;\n this.z = az * bw - ay * bx;\n this.w = aw * bw - ax * bx;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the Y axis.\n *\n * @method Phaser.Math.Quaternion#rotateY\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateY: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var by = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw - az * by;\n this.y = ay * bw + aw * by;\n this.z = az * bw + ax * by;\n this.w = aw * bw - ay * by;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the Z axis.\n *\n * @method Phaser.Math.Quaternion#rotateZ\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateZ: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bz = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw + ay * bz;\n this.y = ay * bw - ax * bz;\n this.z = az * bw + aw * bz;\n this.w = aw * bw - az * bz;\n\n return this;\n },\n\n /**\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\n *\n * Sets the w component.\n *\n * @method Phaser.Math.Quaternion#calculateW\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n calculateW: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\n\n return this;\n },\n\n /**\n * Convert the given Matrix into this Quaternion.\n *\n * @method Phaser.Math.Quaternion#fromMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n fromMat3: function (mat)\n {\n // benchmarks:\n // http://jsperf.com/typed-array-access-speed\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\n\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var m = mat.val;\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if (fTrace > 0)\n {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\n this.w = 0.5 * fRoot;\n\n fRoot = 0.5 / fRoot; // 1/(4w)\n\n this.x = (m[7] - m[5]) * fRoot;\n this.y = (m[2] - m[6]) * fRoot;\n this.z = (m[3] - m[1]) * fRoot;\n }\n else\n {\n // |w| <= 1/2\n var i = 0;\n\n if (m[4] > m[0])\n {\n i = 1;\n }\n\n if (m[8] > m[i * 3 + i])\n {\n i = 2;\n }\n\n var j = siNext[i];\n var k = siNext[j];\n\n // This isn't quite as clean without array access\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\n tmp[i] = 0.5 * fRoot;\n\n fRoot = 0.5 / fRoot;\n\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n\n this.x = tmp[0];\n this.y = tmp[1];\n this.z = tmp[2];\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\n }\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\n\n/**\n * Convert the given angle in radians, to the equivalent angle in degrees.\n *\n * @function Phaser.Math.RadToDeg\n * @since 3.0.0\n *\n * @param {number} radians - The angle in radians to convert ot degrees.\n *\n * @return {integer} The given angle converted to degrees.\n */\nvar RadToDeg = function (radians)\n{\n return radians * CONST.RAD_TO_DEG;\n};\n\nmodule.exports = RadToDeg;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random unit vector.\n *\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\n *\n * Optionally accepts a scale value to scale the resulting vector by.\n *\n * @function Phaser.Math.RandomXY\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\n * @param {number} [scale=1] - The scale of the random values.\n *\n * @return {Phaser.Math.Vector2} The given Vector.\n */\nvar RandomXY = function (vector, scale)\n{\n if (scale === undefined) { scale = 1; }\n\n var r = Math.random() * 2 * Math.PI;\n\n vector.x = Math.cos(r) * scale;\n vector.y = Math.sin(r) * scale;\n\n return vector;\n};\n\nmodule.exports = RandomXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\n *\n * @function Phaser.Math.RandomXYZ\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\n * @param {number} [radius=1] - The radius.\n *\n * @return {Phaser.Math.Vector3} The given Vector.\n */\nvar RandomXYZ = function (vec3, radius)\n{\n if (radius === undefined) { radius = 1; }\n\n var r = Math.random() * 2 * Math.PI;\n var z = (Math.random() * 2) - 1;\n var zScale = Math.sqrt(1 - z * z) * radius;\n\n vec3.x = Math.cos(r) * zScale;\n vec3.y = Math.sin(r) * zScale;\n vec3.z = z * radius;\n\n return vec3;\n};\n\nmodule.exports = RandomXYZ;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random four-dimensional vector.\n *\n * @function Phaser.Math.RandomXYZW\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\n * @param {number} [scale=1] - The scale of the random values.\n *\n * @return {Phaser.Math.Vector4} The given Vector.\n */\nvar RandomXYZW = function (vec4, scale)\n{\n if (scale === undefined) { scale = 1; }\n\n // TODO: Not spherical; should fix this for more uniform distribution\n vec4.x = (Math.random() * 2 - 1) * scale;\n vec4.y = (Math.random() * 2 - 1) * scale;\n vec4.z = (Math.random() * 2 - 1) * scale;\n vec4.w = (Math.random() * 2 - 1) * scale;\n\n return vec4;\n};\n\nmodule.exports = RandomXYZW;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\n *\n * @function Phaser.Math.Rotate\n * @since 3.0.0\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\n *\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\n */\nvar Rotate = function (point, angle)\n{\n var x = point.x;\n var y = point.y;\n\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\n\n return point;\n};\n\nmodule.exports = Rotate;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\n *\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\n *\n * @function Phaser.Math.RotateAround\n * @since 3.0.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} x - The horizontal coordinate to rotate around.\n * @param {number} y - The vertical coordinate to rotate around.\n * @param {number} angle - The angle of rotation in radians.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateAround = function (point, x, y, angle)\n{\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n\n var tx = point.x - x;\n var ty = point.y - y;\n\n point.x = tx * c - ty * s + x;\n point.y = tx * s + ty * c + y;\n\n return point;\n};\n\nmodule.exports = RotateAround;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\n *\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\n *\n * @function Phaser.Math.RotateAroundDistance\n * @since 3.0.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} x - The horizontal coordinate to rotate around.\n * @param {number} y - The vertical coordinate to rotate around.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateAroundDistance = function (point, x, y, angle, distance)\n{\n var t = angle + Math.atan2(point.y - y, point.x - x);\n\n point.x = x + (distance * Math.cos(t));\n point.y = y + (distance * Math.sin(t));\n\n return point;\n};\n\nmodule.exports = RotateAroundDistance;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector3 = require('../math/Vector3');\nvar Matrix4 = require('../math/Matrix4');\nvar Quaternion = require('../math/Quaternion');\n\nvar tmpMat4 = new Matrix4();\nvar tmpQuat = new Quaternion();\nvar tmpVec3 = new Vector3();\n\n/**\n * Rotates a vector in place by axis angle.\n *\n * This is the same as transforming a point by an\n * axis-angle quaternion, but it has higher precision.\n *\n * @function Phaser.Math.RotateVec3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\n * @param {number} radians - The angle of rotation in radians.\n *\n * @return {Phaser.Math.Vector3} The given vector.\n */\nvar RotateVec3 = function (vec, axis, radians)\n{\n // Set the quaternion to our axis angle\n tmpQuat.setAxisAngle(axis, radians);\n\n // Create a rotation matrix from the axis angle\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\n\n // Multiply our vector by the rotation matrix\n return vec.transformMat4(tmpMat4);\n};\n\nmodule.exports = RotateVec3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\n *\n * @function Phaser.Math.RoundAwayFromZero\n * @since 3.0.0\n *\n * @param {number} value - The number to round.\n *\n * @return {number} The rounded number, rounded away from zero.\n */\nvar RoundAwayFromZero = function (value)\n{\n // \"Opposite\" of truncate.\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\n};\n\nmodule.exports = RoundAwayFromZero;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Round a value to the given precision.\n * \n * For example:\n * \n * ```javascript\n * RoundTo(123.456, 0) = 123\n * RoundTo(123.456, 1) = 120\n * RoundTo(123.456, 2) = 100\n * ```\n * \n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\n * \n * ```javascript\n * RoundTo(123.456789, 0) = 123\n * RoundTo(123.456789, -1) = 123.5\n * RoundTo(123.456789, -2) = 123.46\n * RoundTo(123.456789, -3) = 123.457\n * ```\n *\n * @function Phaser.Math.RoundTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar RoundTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.round(value * p) / p;\n};\n\nmodule.exports = RoundTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Generate a series of sine and cosine values.\n *\n * @function Phaser.Math.SinCosTableGenerator\n * @since 3.0.0\n *\n * @param {number} length - The number of values to generate.\n * @param {number} [sinAmp=1] - The sine value amplitude.\n * @param {number} [cosAmp=1] - The cosine value amplitude.\n * @param {number} [frequency=1] - The frequency of the values.\n *\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\n */\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\n{\n if (sinAmp === undefined) { sinAmp = 1; }\n if (cosAmp === undefined) { cosAmp = 1; }\n if (frequency === undefined) { frequency = 1; }\n\n frequency *= Math.PI / length;\n\n var cos = [];\n var sin = [];\n\n for (var c = 0; c < length; c++)\n {\n cosAmp -= sinAmp * frequency;\n sinAmp += cosAmp * frequency;\n\n cos[c] = cosAmp;\n sin[c] = sinAmp;\n }\n\n return {\n sin: sin,\n cos: cos,\n length: length\n };\n};\n\nmodule.exports = SinCosTableGenerator;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\n *\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\n * between 0 and 1 otherwise.\n *\n * @function Phaser.Math.SmoothStep\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\n *\n * @param {number} x - The input value.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The percentage of interpolation, between 0 and 1.\n */\nvar SmoothStep = function (x, min, max)\n{\n if (x <= min)\n {\n return 0;\n }\n\n if (x >= max)\n {\n return 1;\n }\n\n x = (x - min) / (max - min);\n\n return x * x * (3 - 2 * x);\n};\n\nmodule.exports = SmoothStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\n *\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\n * between 0 and 1 otherwise.\n *\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\n *\n * @function Phaser.Math.SmootherStep\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\n *\n * @param {number} x - The input value.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The percentage of interpolation, between 0 and 1.\n */\nvar SmootherStep = function (x, min, max)\n{\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\n\n return x * x * x * (x * (x * 6 - 15) + 10);\n};\n\nmodule.exports = SmootherStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector2 = require('./Vector2');\n\n/**\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\n * \n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\n * \n * If the given index is out of range an empty Vector2 is returned.\n *\n * @function Phaser.Math.ToXY\n * @since 3.19.0\n *\n * @param {integer} index - The position within the grid to get the x/y value for.\n * @param {integer} width - The width of the grid.\n * @param {integer} height - The height of the grid.\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\n */\nvar ToXY = function (index, width, height, out)\n{\n if (out === undefined) { out = new Vector2(); }\n\n var x = 0;\n var y = 0;\n var total = width * height;\n\n if (index > 0 && index <= total)\n {\n if (index > width - 1)\n {\n y = Math.floor(index / width);\n x = index - (y * width);\n }\n else\n {\n x = index;\n }\n\n out.set(x, y);\n }\n\n return out;\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector2 = require('./Vector2');\n\n/**\n * Takes the `x` and `y` coordinates and transforms them into the same space as\n * defined by the position, rotation and scale values.\n *\n * @function Phaser.Math.TransformXY\n * @since 3.0.0\n *\n * @param {number} x - The x coordinate to be transformed.\n * @param {number} y - The y coordinate to be transformed.\n * @param {number} positionX - Horizontal position of the transform point.\n * @param {number} positionY - Vertical position of the transform point.\n * @param {number} rotation - Rotation of the transform point, in radians.\n * @param {number} scaleX - Horizontal scale of the transform point.\n * @param {number} scaleY - Vertical scale of the transform point.\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\n *\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\n */\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\n{\n if (output === undefined) { output = new Vector2(); }\n\n var radianSin = Math.sin(rotation);\n var radianCos = Math.cos(rotation);\n\n // Rotate and Scale\n var a = radianCos * scaleX;\n var b = radianSin * scaleX;\n var c = -radianSin * scaleY;\n var d = radianCos * scaleY;\n\n // Invert\n var id = 1 / ((a * d) + (c * -b));\n\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\n\n return output;\n};\n\nmodule.exports = TransformXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\nvar FuzzyEqual = require('../math/fuzzy/Equal');\n\n/**\n * @classdesc\n * A representation of a vector in 2D space.\n *\n * A two-component vector.\n *\n * @class Vector2\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y] - The y component.\n */\nvar Vector2 = new Class({\n\n initialize:\n\n function Vector2 (x, y)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector2#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector2#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n }\n else\n {\n if (y === undefined) { y = x; }\n\n this.x = x || 0;\n this.y = y || 0;\n }\n },\n\n /**\n * Make a clone of this Vector2.\n *\n * @method Phaser.Math.Vector2#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\n */\n clone: function ()\n {\n return new Vector2(this.x, this.y);\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector2#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n copy: function (src)\n {\n this.x = src.x || 0;\n this.y = src.y || 0;\n\n return this;\n },\n\n /**\n * Set the component values of this Vector from a given Vector2Like object.\n *\n * @method Phaser.Math.Vector2#setFromObject\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setFromObject: function (obj)\n {\n this.x = obj.x || 0;\n this.y = obj.y || 0;\n\n return this;\n },\n\n /**\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\n *\n * @method Phaser.Math.Vector2#set\n * @since 3.0.0\n *\n * @param {number} x - The x value to set for this Vector.\n * @param {number} [y=x] - The y value to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n set: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n },\n\n /**\n * This method is an alias for `Vector2.set`.\n *\n * @method Phaser.Math.Vector2#setTo\n * @since 3.4.0\n *\n * @param {number} x - The x value to set for this Vector.\n * @param {number} [y=x] - The y value to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setTo: function (x, y)\n {\n return this.set(x, y);\n },\n\n /**\n * Sets the `x` and `y` values of this object from a given polar coordinate.\n *\n * @method Phaser.Math.Vector2#setToPolar\n * @since 3.0.0\n *\n * @param {number} azimuth - The angular coordinate, in radians.\n * @param {number} [radius=1] - The radial coordinate (length).\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setToPolar: function (azimuth, radius)\n {\n if (radius == null) { radius = 1; }\n\n this.x = Math.cos(azimuth) * radius;\n this.y = Math.sin(azimuth) * radius;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict equality check against each Vector's components.\n *\n * @method Phaser.Math.Vector2#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\n *\n * @return {boolean} Whether the given Vector is equal to this Vector.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y));\n },\n\n /**\n * Check whether this Vector is approximately equal to a given Vector.\n *\n * @method Phaser.Math.Vector2#fuzzyEquals\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\n * @param {number} [epsilon=0.0001] - The tolerance value.\n *\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\n */\n fuzzyEquals: function (v, epsilon)\n {\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\n },\n\n /**\n * Calculate the angle between this Vector and the positive x-axis, in radians.\n *\n * @method Phaser.Math.Vector2#angle\n * @since 3.0.0\n *\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\n */\n angle: function ()\n {\n // computes the angle in radians with respect to the positive x-axis\n\n var angle = Math.atan2(this.y, this.x);\n\n if (angle < 0)\n {\n angle += 2 * Math.PI;\n }\n\n return angle;\n },\n\n /**\n * Set the angle of this Vector.\n *\n * @method Phaser.Math.Vector2#setAngle\n * @since 3.23.0\n *\n * @param {number} angle - The angle, in radians.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setAngle: function (angle)\n {\n return this.setToPolar(angle, this.length());\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector2#add\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n add: function (src)\n {\n this.x += src.x;\n this.y += src.y;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector2#subtract\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n subtract: function (src)\n {\n this.x -= src.x;\n this.y -= src.y;\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector2#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n multiply: function (src)\n {\n this.x *= src.x;\n this.y *= src.y;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector2#scale\n * @since 3.0.0\n *\n * @param {number} value - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n scale: function (value)\n {\n if (isFinite(value))\n {\n this.x *= value;\n this.y *= value;\n }\n else\n {\n this.x = 0;\n this.y = 0;\n }\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector2#divide\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n divide: function (src)\n {\n this.x /= src.x;\n this.y /= src.y;\n\n return this;\n },\n\n /**\n * Negate the `x` and `y` components of this Vector.\n *\n * @method Phaser.Math.Vector2#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#distance\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (src)\n {\n var dx = src.x - this.x;\n var dy = src.y - this.y;\n\n return Math.sqrt(dx * dx + dy * dy);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector2#distanceSq\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (src)\n {\n var dx = src.x - this.x;\n var dy = src.y - this.y;\n\n return dx * dx + dy * dy;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n\n return Math.sqrt(x * x + y * y);\n },\n\n /**\n * Set the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#setLength\n * @since 3.23.0\n *\n * @param {number} length\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setLength: function (length)\n {\n return this.normalize().scale(length);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector2#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n\n return x * x + y * y;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector2#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var len = x * x + y * y;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n }\n\n return this;\n },\n\n /**\n * Rotate this Vector to its perpendicular, in the positive direction.\n *\n * @method Phaser.Math.Vector2#normalizeRightHand\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalizeRightHand: function ()\n {\n var x = this.x;\n\n this.x = this.y * -1;\n this.y = x;\n\n return this;\n },\n\n /**\n * Rotate this Vector to its perpendicular, in the negative direction.\n *\n * @method Phaser.Math.Vector2#normalizeLeftHand\n * @since 3.23.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalizeLeftHand: function ()\n {\n var x = this.x;\n\n this.x = this.y;\n this.y = x * -1;\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\n *\n * @return {number} The dot product of this Vector and the given Vector.\n */\n dot: function (src)\n {\n return this.x * src.x + this.y * src.y;\n },\n\n /**\n * Calculate the cross product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#cross\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\n *\n * @return {number} The cross product of this Vector and the given Vector.\n */\n cross: function (src)\n {\n return this.x * src.y - this.y * src.x;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector2#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n lerp: function (src, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n\n this.x = ax + t * (src.x - ax);\n this.y = ay + t * (src.y - ay);\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector2#transformMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n transformMat3: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var m = mat.val;\n\n this.x = m[0] * x + m[3] * y + m[6];\n this.y = m[1] * x + m[4] * y + m[7];\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector2#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[12];\n this.y = m[1] * x + m[5] * y + m[13];\n\n return this;\n },\n\n /**\n * Make this Vector the zero vector (0, 0).\n *\n * @method Phaser.Math.Vector2#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n\n return this;\n },\n\n /**\n * Limit the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#limit\n * @since 3.23.0\n *\n * @param {number} max - The maximum length.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n limit: function (max)\n {\n var len = this.length();\n\n if (len && len > max)\n {\n this.scale(max / len);\n }\n\n return this;\n },\n\n /**\n * Reflect this Vector off a line defined by a normal.\n *\n * @method Phaser.Math.Vector2#reflect\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n reflect: function (normal)\n {\n normal = normal.clone().normalize();\n\n return this.subtract(normal.scale(2 * this.dot(normal)));\n },\n\n /**\n * Reflect this Vector across another.\n *\n * @method Phaser.Math.Vector2#mirror\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n mirror: function (axis)\n {\n return this.reflect(axis).negate();\n },\n\n /**\n * Rotate this Vector by an angle amount.\n *\n * @method Phaser.Math.Vector2#rotate\n * @since 3.23.0\n *\n * @param {number} delta - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n rotate: function (delta)\n {\n var cos = Math.cos(delta);\n var sin = Math.sin(delta);\n\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\n }\n\n});\n\n/**\n * A static zero Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.ZERO\n * @type {Phaser.Math.Vector2}\n * @since 3.1.0\n */\nVector2.ZERO = new Vector2();\n\n/**\n * A static right Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.RIGHT\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.RIGHT = new Vector2(1, 0);\n\n/**\n * A static left Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.LEFT\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.LEFT = new Vector2(-1, 0);\n\n/**\n * A static up Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.UP\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.UP = new Vector2(0, -1);\n\n/**\n * A static down Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.DOWN\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.DOWN = new Vector2(0, 1);\n\n/**\n * A static one Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.ONE\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.ONE = new Vector2(1, 1);\n\nmodule.exports = Vector2;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A representation of a vector in 3D space.\n *\n * A three-component vector.\n *\n * @class Vector3\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n */\nvar Vector3 = new Class({\n\n initialize:\n\n function Vector3 (x, y, z)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector3#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector3#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The z component of this Vector.\n *\n * @name Phaser.Math.Vector3#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.z = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n }\n },\n\n /**\n * Set this Vector to point up.\n *\n * Sets the y component of the vector to 1, and the others to 0.\n *\n * @method Phaser.Math.Vector3#up\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n up: function ()\n {\n this.x = 0;\n this.y = 1;\n this.z = 0;\n\n return this;\n },\n\n /**\n * Make a clone of this Vector3.\n *\n * @method Phaser.Math.Vector3#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\n */\n clone: function ()\n {\n return new Vector3(this.x, this.y, this.z);\n },\n\n /**\n * Calculate the cross (vector) product of two given Vectors.\n *\n * @method Phaser.Math.Vector3#crossVectors\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n crossVectors: function (a, b)\n {\n var ax = a.x;\n var ay = a.y;\n var az = a.z;\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict equality check against each Vector's components.\n *\n * @method Phaser.Math.Vector3#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\n *\n * @return {boolean} True if the two vectors strictly match, otherwise false.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector3#copy\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z || 0;\n\n return this;\n },\n\n /**\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\n *\n * @method Phaser.Math.Vector3#set\n * @since 3.0.0\n *\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\n * @param {number} [y] - The y value to set for this Vector.\n * @param {number} [z] - The z value to set for this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n set: function (x, y, z)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z || 0;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector3#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z || 0;\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector3#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n multiply: function (v)\n {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z || 1;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector3#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n scale: function (scale)\n {\n if (isFinite(scale))\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n }\n else\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n }\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector3#divide\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n divide: function (v)\n {\n this.x /= v.x;\n this.y /= v.y;\n this.z /= v.z || 1;\n\n return this;\n },\n\n /**\n * Negate the `x`, `y` and `z` components of this Vector.\n *\n * @method Phaser.Math.Vector3#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector3#distance\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector3#distanceSq\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n\n return dx * dx + dy * dy + dz * dz;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector3#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n return Math.sqrt(x * x + y * y + z * z);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector3#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n return x * x + y * y + z * z;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector3#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var len = x * x + y * y + z * z;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector3#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\n *\n * @return {number} The dot product of this Vector and `v`.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n },\n\n /**\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\n *\n * @method Phaser.Math.Vector3#cross\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n cross: function (v)\n {\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var bx = v.x;\n var by = v.y;\n var bz = v.z;\n\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n\n return this;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector3#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector3#transformMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformMat3: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n this.x = x * m[0] + y * m[3] + z * m[6];\n this.y = x * m[1] + y * m[4] + z * m[7];\n this.z = x * m[2] + y * m[5] + z * m[8];\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector3#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\n\n return this;\n },\n\n /**\n * Transforms the coordinates of this Vector3 with the given Matrix4.\n *\n * @method Phaser.Math.Vector3#transformCoordinates\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformCoordinates: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\n\n this.x = tx / tw;\n this.y = ty / tw;\n this.z = tz / tw;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Quaternion.\n *\n * @method Phaser.Math.Vector3#transformQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformQuat: function (q)\n {\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var qx = q.x;\n var qy = q.y;\n var qz = q.z;\n var qw = q.w;\n\n // calculate quat * vec\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n return this;\n },\n\n /**\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\n * e.g. unprojecting a 2D point into 3D space.\n *\n * @method Phaser.Math.Vector3#project\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n project: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n var a00 = m[0];\n var a01 = m[1];\n var a02 = m[2];\n var a03 = m[3];\n var a10 = m[4];\n var a11 = m[5];\n var a12 = m[6];\n var a13 = m[7];\n var a20 = m[8];\n var a21 = m[9];\n var a22 = m[10];\n var a23 = m[11];\n var a30 = m[12];\n var a31 = m[13];\n var a32 = m[14];\n var a33 = m[15];\n\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\n\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\n\n return this;\n },\n\n /**\n * Unproject this point from 2D space to 3D space.\n * The point should have its x and y properties set to\n * 2D screen space, and the z either at 0 (near plane)\n * or 1 (far plane). The provided matrix is assumed to already\n * be combined, i.e. projection * view * model.\n *\n * After this operation, this vector's (x, y, z) components will\n * represent the unprojected 3D coordinate.\n *\n * @method Phaser.Math.Vector3#unproject\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unproject: function (viewport, invProjectionView)\n {\n var viewX = viewport.x;\n var viewY = viewport.y;\n var viewWidth = viewport.z;\n var viewHeight = viewport.w;\n\n var x = this.x - viewX;\n var y = (viewHeight - this.y - 1) - viewY;\n var z = this.z;\n\n this.x = (2 * x) / viewWidth - 1;\n this.y = (2 * y) / viewHeight - 1;\n this.z = 2 * z - 1;\n\n return this.project(invProjectionView);\n },\n\n /**\n * Make this Vector the zero vector (0, 0, 0).\n *\n * @method Phaser.Math.Vector3#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n\n return this;\n }\n\n});\n\n/**\n * A static zero Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.ZERO\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.ZERO = new Vector3();\n\n/**\n * A static right Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.RIGHT\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.RIGHT = new Vector3(1, 0, 0);\n\n/**\n * A static left Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.LEFT\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.LEFT = new Vector3(-1, 0, 0);\n\n/**\n * A static up Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.UP\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.UP = new Vector3(0, -1, 0);\n\n/**\n * A static down Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.DOWN\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.DOWN = new Vector3(0, 1, 0);\n\n/**\n * A static forward Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.FORWARD\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.FORWARD = new Vector3(0, 0, 1);\n\n/**\n * A static back Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.BACK\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.BACK = new Vector3(0, 0, -1);\n\n/**\n * A static one Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.ONE\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.ONE = new Vector3(1, 1, 1);\n\nmodule.exports = Vector3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A representation of a vector in 4D space.\n *\n * A four-component vector.\n *\n * @class Vector4\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n * @param {number} [w] - The w component.\n */\nvar Vector4 = new Class({\n\n initialize:\n\n function Vector4 (x, y, z, w)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector4#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector4#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The z component of this Vector.\n *\n * @name Phaser.Math.Vector4#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.z = 0;\n\n /**\n * The w component of this Vector.\n *\n * @name Phaser.Math.Vector4#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.w = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n },\n\n /**\n * Make a clone of this Vector4.\n *\n * @method Phaser.Math.Vector4#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\n */\n clone: function ()\n {\n return new Vector4(this.x, this.y, this.z, this.w);\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector4#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z || 0;\n this.w = src.w || 0;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict quality check against each Vector's components.\n *\n * @method Phaser.Math.Vector4#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\n *\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\n },\n\n /**\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\n *\n * @method Phaser.Math.Vector4#set\n * @since 3.0.0\n *\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\n * @param {number} y - The y value to set for this Vector.\n * @param {number} z - The z value to set for this Vector.\n * @param {number} w - The z value to set for this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n set: function (x, y, z, w)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector4#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z || 0;\n this.w += v.w || 0;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector4#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z || 0;\n this.w -= v.w || 0;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector4#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n scale: function (scale)\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n this.w *= scale;\n\n return this;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector4#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return Math.sqrt(x * x + y * y + z * z + w * w);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector4#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return x * x + y * y + z * z + w * w;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector4#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n this.w = w * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector4#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\n *\n * @return {number} The dot product of this Vector and the given Vector.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector4#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n this.w = aw + t * (v.w - aw);\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector4#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n multiply: function (v)\n {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z || 1;\n this.w *= v.w || 1;\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector4#divide\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n divide: function (v)\n {\n this.x /= v.x;\n this.y /= v.y;\n this.z /= v.z || 1;\n this.w /= v.w || 1;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector4#distance\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n var dw = v.w - this.w || 0;\n\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector4#distanceSq\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n var dw = v.w - this.w || 0;\n\n return dx * dx + dy * dy + dz * dz + dw * dw;\n },\n\n /**\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\n *\n * @method Phaser.Math.Vector4#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n this.w = -this.w;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector4#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Quaternion.\n *\n * @method Phaser.Math.Vector4#transformQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n transformQuat: function (q)\n {\n // TODO: is this really the same as Vector3?\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var qx = q.x;\n var qy = q.y;\n var qz = q.z;\n var qw = q.w;\n\n // calculate quat * vec\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n return this;\n },\n\n /**\n * Make this Vector the zero vector (0, 0, 0, 0).\n *\n * @method Phaser.Math.Vector4#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 0;\n\n return this;\n }\n\n});\n\n// TODO: Check if these are required internally, if not, remove.\nVector4.prototype.sub = Vector4.prototype.subtract;\nVector4.prototype.mul = Vector4.prototype.multiply;\nVector4.prototype.div = Vector4.prototype.divide;\nVector4.prototype.dist = Vector4.prototype.distance;\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\nVector4.prototype.len = Vector4.prototype.length;\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\n\nmodule.exports = Vector4;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if the two values are within the given `tolerance` of each other.\n *\n * @function Phaser.Math.Within\n * @since 3.0.0\n *\n * @param {number} a - The first value to use in the calculation.\n * @param {number} b - The second value to use in the calculation.\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\n *\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\n */\nvar Within = function (a, b, tolerance)\n{\n return (Math.abs(a - b) <= tolerance);\n};\n\nmodule.exports = Within;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Wrap the given `value` between `min` and `max.\n *\n * @function Phaser.Math.Wrap\n * @since 3.0.0\n *\n * @param {number} value - The value to wrap.\n * @param {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} The wrapped value.\n */\nvar Wrap = function (value, min, max)\n{\n var range = max - min;\n\n return (min + ((((value - min) % range) + range) % range));\n};\n\nmodule.exports = Wrap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\n *\n * @function Phaser.Math.Angle.Between\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The angle in radians.\n */\nvar Between = function (x1, y1, x2, y2)\n{\n return Math.atan2(y2 - y1, x2 - x1);\n};\n\nmodule.exports = Between;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\n *\n * Calculates the angle of the vector from the first point to the second point.\n *\n * @function Phaser.Math.Angle.BetweenPoints\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenPoints = function (point1, point2)\n{\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\n};\n\nmodule.exports = BetweenPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\n *\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\n * travels down the screen.\n *\n * @function Phaser.Math.Angle.BetweenPointsY\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenPointsY = function (point1, point2)\n{\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\n};\n\nmodule.exports = BetweenPointsY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\n *\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\n * travels down the screen.\n *\n * @function Phaser.Math.Angle.BetweenY\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenY = function (x1, y1, x2, y2)\n{\n return Math.atan2(x2 - x1, y2 - y1);\n};\n\nmodule.exports = BetweenY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../const');\n\n/**\n * Takes an angle in Phasers default clockwise format and converts it so that\n * 0 is North, 90 is West, 180 is South and 270 is East,\n * therefore running counter-clockwise instead of clockwise.\n * \n * You can pass in the angle from a Game Object using:\n * \n * ```javascript\n * var converted = CounterClockwise(gameobject.rotation);\n * ```\n * \n * All values for this function are in radians.\n *\n * @function Phaser.Math.Angle.CounterClockwise\n * @since 3.16.0\n *\n * @param {number} angle - The angle to convert, in radians.\n *\n * @return {number} The converted angle, in radians.\n */\nvar CounterClockwise = function (angle)\n{\n if (angle > Math.PI)\n {\n angle -= CONST.PI2;\n }\n\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\n};\n\nmodule.exports = CounterClockwise;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Normalize an angle to the [0, 2pi] range.\n *\n * @function Phaser.Math.Angle.Normalize\n * @since 3.0.0\n *\n * @param {number} angle - The angle to normalize, in radians.\n *\n * @return {number} The normalized angle, in radians.\n */\nvar Normalize = function (angle)\n{\n angle = angle % (2 * Math.PI);\n\n if (angle >= 0)\n {\n return angle;\n }\n else\n {\n return angle + 2 * Math.PI;\n }\n};\n\nmodule.exports = Normalize;\n","/**\n * @author Richard Davey \n * @author @samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FloatBetween = require('../FloatBetween');\n\n/**\n * Returns a random angle in the range [-pi, pi].\n *\n * @function Phaser.Math.Angle.Random\n * @since 3.23.0\n *\n * @return {number} The angle, in radians.\n */\nvar Random = function ()\n{\n return FloatBetween(-Math.PI, Math.PI);\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @author @samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FloatBetween = require('../FloatBetween');\n\n/**\n * Returns a random angle in the range [-180, 180].\n *\n * @function Phaser.Math.Angle.RandomDegrees\n * @since 3.23.0\n *\n * @return {number} The angle, in degrees.\n */\nvar RandomDegrees = function ()\n{\n return FloatBetween(-180, 180);\n};\n\nmodule.exports = RandomDegrees;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Normalize = require('./Normalize');\n\n/**\n * Reverse the given angle.\n *\n * @function Phaser.Math.Angle.Reverse\n * @since 3.0.0\n *\n * @param {number} angle - The angle to reverse, in radians.\n *\n * @return {number} The reversed angle, in radians.\n */\nvar Reverse = function (angle)\n{\n return Normalize(angle + Math.PI);\n};\n\nmodule.exports = Reverse;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../const');\n\n/**\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\n *\n * @function Phaser.Math.Angle.RotateTo\n * @since 3.0.0\n *\n * @param {number} currentAngle - The current angle, in radians.\n * @param {number} targetAngle - The target angle to rotate to, in radians.\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\n *\n * @return {number} The adjusted angle.\n */\nvar RotateTo = function (currentAngle, targetAngle, lerp)\n{\n if (lerp === undefined) { lerp = 0.05; }\n\n if (currentAngle === targetAngle)\n {\n return currentAngle;\n }\n\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\n {\n currentAngle = targetAngle;\n }\n else\n {\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\n {\n if (targetAngle < currentAngle)\n {\n targetAngle += MATH_CONST.PI2;\n }\n else\n {\n targetAngle -= MATH_CONST.PI2;\n }\n }\n\n if (targetAngle > currentAngle)\n {\n currentAngle += lerp;\n }\n else if (targetAngle < currentAngle)\n {\n currentAngle -= lerp;\n }\n }\n\n return currentAngle;\n};\n\nmodule.exports = RotateTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Gets the shortest angle between `angle1` and `angle2`.\n *\n * Both angles must be in the range -180 to 180, which is the same clamped\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\n * this method and get the shortest angle back between the two of them.\n *\n * The angle returned will be in the same range. If the returned angle is\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\n * a clockwise rotation.\n *\n * TODO: Wrap the angles in this function?\n *\n * @function Phaser.Math.Angle.ShortestBetween\n * @since 3.0.0\n *\n * @param {number} angle1 - The first angle in the range -180 to 180.\n * @param {number} angle2 - The second angle in the range -180 to 180.\n *\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\n */\nvar ShortestBetween = function (angle1, angle2)\n{\n var difference = angle2 - angle1;\n\n if (difference === 0)\n {\n return 0;\n }\n\n var times = Math.floor((difference - (-180)) / 360);\n\n return difference - (times * 360);\n\n};\n\nmodule.exports = ShortestBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MathWrap = require('../Wrap');\n\n/**\n * Wrap an angle.\n *\n * Wraps the angle to a value in the range of -PI to PI.\n *\n * @function Phaser.Math.Angle.Wrap\n * @since 3.0.0\n *\n * @param {number} angle - The angle to wrap, in radians.\n *\n * @return {number} The wrapped angle, in radians.\n */\nvar Wrap = function (angle)\n{\n return MathWrap(angle, -Math.PI, Math.PI);\n};\n\nmodule.exports = Wrap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Wrap = require('../Wrap');\n\n/**\n * Wrap an angle in degrees.\n *\n * Wraps the angle to a value in the range of -180 to 180.\n *\n * @function Phaser.Math.Angle.WrapDegrees\n * @since 3.0.0\n *\n * @param {number} angle - The angle to wrap, in degrees.\n *\n * @return {number} The wrapped angle, in degrees.\n */\nvar WrapDegrees = function (angle)\n{\n return Wrap(angle, -180, 180);\n};\n\nmodule.exports = WrapDegrees;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Angle\n */\n\nmodule.exports = {\n\n Between: require('./Between'),\n BetweenPoints: require('./BetweenPoints'),\n BetweenPointsY: require('./BetweenPointsY'),\n BetweenY: require('./BetweenY'),\n CounterClockwise: require('./CounterClockwise'),\n Normalize: require('./Normalize'),\n Random: require('./Random'),\n RandomDegrees: require('./RandomDegrees'),\n Reverse: require('./Reverse'),\n RotateTo: require('./RotateTo'),\n ShortestBetween: require('./ShortestBetween'),\n Wrap: require('./Wrap'),\n WrapDegrees: require('./WrapDegrees')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = {\n\n /**\n * The value of PI * 2.\n * \n * @name Phaser.Math.PI2\n * @type {number}\n * @since 3.0.0\n */\n PI2: Math.PI * 2,\n\n /**\n * The value of PI * 0.5.\n * \n * @name Phaser.Math.TAU\n * @type {number}\n * @since 3.0.0\n */\n TAU: Math.PI * 0.5,\n\n /**\n * An epsilon value (1.0e-6)\n * \n * @name Phaser.Math.EPSILON\n * @type {number}\n * @since 3.0.0\n */\n EPSILON: 1.0e-6,\n\n /**\n * For converting degrees to radians (PI / 180)\n * \n * @name Phaser.Math.DEG_TO_RAD\n * @type {number}\n * @since 3.0.0\n */\n DEG_TO_RAD: Math.PI / 180,\n\n /**\n * For converting radians to degrees (180 / PI)\n * \n * @name Phaser.Math.RAD_TO_DEG\n * @type {number}\n * @since 3.0.0\n */\n RAD_TO_DEG: 180 / Math.PI,\n\n /**\n * An instance of the Random Number Generator.\n * This is not set until the Game boots.\n * \n * @name Phaser.Math.RND\n * @type {Phaser.Math.RandomDataGenerator}\n * @since 3.0.0\n */\n RND: null,\n\n /**\n * The minimum safe integer this browser supports.\n * We use a const for backward compatibility with Internet Explorer.\n * \n * @name Phaser.Math.MIN_SAFE_INTEGER\n * @type {number}\n * @since 3.21.0\n */\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\n\n /**\n * The maximum safe integer this browser supports.\n * We use a const for backward compatibility with Internet Explorer.\n * \n * @name Phaser.Math.MAX_SAFE_INTEGER\n * @type {number}\n * @since 3.21.0\n */\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\n\n};\n\nmodule.exports = MATH_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points).\n *\n * @function Phaser.Math.Distance.Between\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar DistanceBetween = function (x1, y1, x2, y2)\n{\n var dx = x1 - x2;\n var dy = y1 - y2;\n\n return Math.sqrt(dx * dx + dy * dy);\n};\n\nmodule.exports = DistanceBetween;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two points.\n *\n * @function Phaser.Math.Distance.BetweenPoints\n * @since 3.22.0\n *\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\n *\n * @return {number} The distance between the points.\n */\nvar DistanceBetweenPoints = function (a, b)\n{\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n\n return Math.sqrt(dx * dx + dy * dy);\n};\n\nmodule.exports = DistanceBetweenPoints;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the squared distance between two points.\n *\n * @function Phaser.Math.Distance.BetweenPointsSquared\n * @since 3.22.0\n *\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\n *\n * @return {number} The squared distance between the points.\n */\nvar DistanceBetweenPointsSquared = function (a, b)\n{\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n\n return dx * dx + dy * dy;\n};\n\nmodule.exports = DistanceBetweenPointsSquared;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the Chebyshev distance between two sets of coordinates (points).\n *\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\n *\n * @function Phaser.Math.Distance.Chebyshev\n * @since 3.22.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar ChebyshevDistance = function (x1, y1, x2, y2)\n{\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\n};\n\nmodule.exports = ChebyshevDistance;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\n *\n * @function Phaser.Math.Distance.Power\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n * @param {number} pow - The exponent.\n *\n * @return {number} The distance between each point.\n */\nvar DistancePower = function (x1, y1, x2, y2, pow)\n{\n if (pow === undefined) { pow = 2; }\n\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\n};\n\nmodule.exports = DistancePower;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the snake distance between two sets of coordinates (points).\n *\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\n *\n * @function Phaser.Math.Distance.Snake\n * @since 3.22.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar SnakeDistance = function (x1, y1, x2, y2)\n{\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\n};\n\nmodule.exports = SnakeDistance;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points), squared.\n *\n * @function Phaser.Math.Distance.Squared\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point, squared.\n */\nvar DistanceSquared = function (x1, y1, x2, y2)\n{\n var dx = x1 - x2;\n var dy = y1 - y2;\n\n return dx * dx + dy * dy;\n};\n\nmodule.exports = DistanceSquared;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Distance\n */\n\nmodule.exports = {\n\n Between: require('./DistanceBetween'),\n BetweenPoints: require('./DistanceBetweenPoints'),\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\n Chebyshev: require('./DistanceChebyshev'),\n Power: require('./DistancePower'),\n Snake: require('./DistanceSnake'),\n Squared: require('./DistanceSquared')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-in.\n *\n * @function Phaser.Math.Easing.Back.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n return v * v * ((overshoot + 1) * v - overshoot);\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-in/out.\n *\n * @function Phaser.Math.Easing.Back.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n var s = overshoot * 1.525;\n\n if ((v *= 2) < 1)\n {\n return 0.5 * (v * v * ((s + 1) * v - s));\n }\n else\n {\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-out.\n *\n * @function Phaser.Math.Easing.Back.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Back\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-in.\n *\n * @function Phaser.Math.Easing.Bounce.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n v = 1 - v;\n\n if (v < 1 / 2.75)\n {\n return 1 - (7.5625 * v * v);\n }\n else if (v < 2 / 2.75)\n {\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\n }\n else if (v < 2.5 / 2.75)\n {\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\n }\n else\n {\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-in/out.\n *\n * @function Phaser.Math.Easing.Bounce.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n var reverse = false;\n\n if (v < 0.5)\n {\n v = 1 - (v * 2);\n reverse = true;\n }\n else\n {\n v = (v * 2) - 1;\n }\n\n if (v < 1 / 2.75)\n {\n v = 7.5625 * v * v;\n }\n else if (v < 2 / 2.75)\n {\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\n }\n else if (v < 2.5 / 2.75)\n {\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\n }\n else\n {\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\n }\n\n if (reverse)\n {\n return (1 - v) * 0.5;\n }\n else\n {\n return v * 0.5 + 0.5;\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-out.\n *\n * @function Phaser.Math.Easing.Bounce.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n if (v < 1 / 2.75)\n {\n return 7.5625 * v * v;\n }\n else if (v < 2 / 2.75)\n {\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\n }\n else if (v < 2.5 / 2.75)\n {\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\n }\n else\n {\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Bounce\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-in.\n *\n * @function Phaser.Math.Easing.Circular.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return 1 - Math.sqrt(1 - v * v);\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-in/out.\n *\n * @function Phaser.Math.Easing.Circular.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\n }\n else\n {\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-out.\n *\n * @function Phaser.Math.Easing.Circular.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return Math.sqrt(1 - (--v * v));\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Circular\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-in.\n *\n * @function Phaser.Math.Easing.Cubic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-in/out.\n *\n * @function Phaser.Math.Easing.Cubic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v;\n }\n else\n {\n return 0.5 * ((v -= 2) * v * v + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-out.\n *\n * @function Phaser.Math.Easing.Cubic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return --v * v * v + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Cubic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-in.\n *\n * @function Phaser.Math.Easing.Elastic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-in/out.\n *\n * @function Phaser.Math.Easing.Elastic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n if ((v *= 2) < 1)\n {\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\n }\n else\n {\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\n }\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-out.\n *\n * @function Phaser.Math.Easing.Elastic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Elastic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-in.\n *\n * @function Phaser.Math.Easing.Expo.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return Math.pow(2, 10 * (v - 1)) - 0.001;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-in/out.\n *\n * @function Phaser.Math.Easing.Expo.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * Math.pow(2, 10 * (v - 1));\n }\n else\n {\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-out.\n *\n * @function Phaser.Math.Easing.Expo.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return 1 - Math.pow(2, -10 * v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Expo\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing\n */\n\nmodule.exports = {\n\n Back: require('./back'),\n Bounce: require('./bounce'),\n Circular: require('./circular'),\n Cubic: require('./cubic'),\n Elastic: require('./elastic'),\n Expo: require('./expo'),\n Linear: require('./linear'),\n Quadratic: require('./quadratic'),\n Quartic: require('./quartic'),\n Quintic: require('./quintic'),\n Sine: require('./sine'),\n Stepped: require('./stepped')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Linear easing (no variation).\n *\n * @function Phaser.Math.Easing.Linear\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Linear = function (v)\n{\n return v;\n};\n\nmodule.exports = Linear;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nmodule.exports = require('./Linear');\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-in.\n *\n * @function Phaser.Math.Easing.Quadratic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quadratic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v;\n }\n else\n {\n return -0.5 * (--v * (v - 2) - 1);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-out.\n *\n * @function Phaser.Math.Easing.Quadratic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return v * (2 - v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quadratic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-in.\n *\n * @function Phaser.Math.Easing.Quartic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quartic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v * v;\n }\n else\n {\n return -0.5 * ((v -= 2) * v * v * v - 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-out.\n *\n * @function Phaser.Math.Easing.Quartic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return 1 - (--v * v * v * v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quartic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-in.\n *\n * @function Phaser.Math.Easing.Quintic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quintic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v * v * v;\n }\n else\n {\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-out.\n *\n * @function Phaser.Math.Easing.Quintic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return --v * v * v * v * v + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quintic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-in.\n *\n * @function Phaser.Math.Easing.Sine.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return 1 - Math.cos(v * Math.PI / 2);\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-in/out.\n *\n * @function Phaser.Math.Easing.Sine.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return 0.5 * (1 - Math.cos(Math.PI * v));\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-out.\n *\n * @function Phaser.Math.Easing.Sine.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return Math.sin(v * Math.PI / 2);\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Sine\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Stepped easing.\n *\n * @function Phaser.Math.Easing.Stepped\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [steps=1] - The number of steps in the ease.\n *\n * @return {number} The tweened value.\n */\nvar Stepped = function (v, steps)\n{\n if (steps === undefined) { steps = 1; }\n\n if (v <= 0)\n {\n return 0;\n }\n else if (v >= 1)\n {\n return 1;\n }\n else\n {\n return (((steps * v) | 0) + 1) * (1 / steps);\n }\n};\n\nmodule.exports = Stepped;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Stepped\n */\n\nmodule.exports = require('./Stepped');\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the fuzzy ceiling of the given value.\n *\n * @function Phaser.Math.Fuzzy.Ceil\n * @since 3.0.0\n *\n * @param {number} value - The value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {number} The fuzzy ceiling of the value.\n */\nvar Ceil = function (value, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.ceil(value - epsilon);\n};\n\nmodule.exports = Ceil;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether the given values are fuzzily equal.\n *\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\n *\n * @function Phaser.Math.Fuzzy.Equal\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\n */\nvar Equal = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.abs(a - b) < epsilon;\n};\n\nmodule.exports = Equal;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the fuzzy floor of the given value.\n *\n * @function Phaser.Math.Fuzzy.Floor\n * @since 3.0.0\n *\n * @param {number} value - The value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {number} The floor of the value.\n */\nvar Floor = function (value, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.floor(value + epsilon);\n};\n\nmodule.exports = Floor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether `a` is fuzzily greater than `b`.\n *\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\n *\n * @function Phaser.Math.Fuzzy.GreaterThan\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\n */\nvar GreaterThan = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return a > b - epsilon;\n};\n\nmodule.exports = GreaterThan;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether `a` is fuzzily less than `b`.\n *\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\n *\n * @function Phaser.Math.Fuzzy.LessThan\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\n */\nvar LessThan = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return a < b + epsilon;\n};\n\nmodule.exports = LessThan;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Fuzzy\n */\n\nmodule.exports = {\n\n Ceil: require('./Ceil'),\n Equal: require('./Equal'),\n Floor: require('./Floor'),\n GreaterThan: require('./GreaterThan'),\n LessThan: require('./LessThan')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @namespace Phaser.Math\n */\n\nvar PhaserMath = {\n\n // Collections of functions\n Angle: require('./angle/'),\n Distance: require('./distance/'),\n Easing: require('./easing/'),\n Fuzzy: require('./fuzzy/'),\n Interpolation: require('./interpolation/'),\n Pow2: require('./pow2/'),\n Snap: require('./snap/'),\n\n // Expose the RNG Class\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\n\n // Single functions\n Average: require('./Average'),\n Bernstein: require('./Bernstein'),\n Between: require('./Between'),\n CatmullRom: require('./CatmullRom'),\n CeilTo: require('./CeilTo'),\n Clamp: require('./Clamp'),\n DegToRad: require('./DegToRad'),\n Difference: require('./Difference'),\n Factorial: require('./Factorial'),\n FloatBetween: require('./FloatBetween'),\n FloorTo: require('./FloorTo'),\n FromPercent: require('./FromPercent'),\n GetSpeed: require('./GetSpeed'),\n IsEven: require('./IsEven'),\n IsEvenStrict: require('./IsEvenStrict'),\n Linear: require('./Linear'),\n MaxAdd: require('./MaxAdd'),\n MinSub: require('./MinSub'),\n Percent: require('./Percent'),\n RadToDeg: require('./RadToDeg'),\n RandomXY: require('./RandomXY'),\n RandomXYZ: require('./RandomXYZ'),\n RandomXYZW: require('./RandomXYZW'),\n Rotate: require('./Rotate'),\n RotateAround: require('./RotateAround'),\n RotateAroundDistance: require('./RotateAroundDistance'),\n RotateTo: require('./RotateTo'),\n RoundAwayFromZero: require('./RoundAwayFromZero'),\n RoundTo: require('./RoundTo'),\n SinCosTableGenerator: require('./SinCosTableGenerator'),\n SmootherStep: require('./SmootherStep'),\n SmoothStep: require('./SmoothStep'),\n ToXY: require('./ToXY'),\n TransformXY: require('./TransformXY'),\n Within: require('./Within'),\n Wrap: require('./Wrap'),\n\n // Vector classes\n Vector2: require('./Vector2'),\n Vector3: require('./Vector3'),\n Vector4: require('./Vector4'),\n Matrix3: require('./Matrix3'),\n Matrix4: require('./Matrix4'),\n Quaternion: require('./Quaternion'),\n RotateVec3: require('./RotateVec3')\n\n};\n\n// Merge in the consts\n\nPhaserMath = Extend(false, PhaserMath, CONST);\n\n// Export it\n\nmodule.exports = PhaserMath;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Bernstein = require('../Bernstein');\n\n/**\n * A bezier interpolation method.\n *\n * @function Phaser.Math.Interpolation.Bezier\n * @since 3.0.0\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {number} The interpolated value.\n */\nvar BezierInterpolation = function (v, k)\n{\n var b = 0;\n var n = v.length - 1;\n\n for (var i = 0; i <= n; i++)\n {\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\n }\n\n return b;\n};\n\nmodule.exports = BezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CatmullRom = require('../CatmullRom');\n\n/**\n * A Catmull-Rom interpolation method.\n *\n * @function Phaser.Math.Interpolation.CatmullRom\n * @since 3.0.0\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {number} The interpolated value.\n */\nvar CatmullRomInterpolation = function (v, k)\n{\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n\n if (v[0] === v[m])\n {\n if (k < 0)\n {\n i = Math.floor(f = m * (1 + k));\n }\n\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\n }\n else\n {\n if (k < 0)\n {\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\n }\n\n if (k > 1)\n {\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\n }\n\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\n }\n};\n\nmodule.exports = CatmullRomInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction P0 (t, p)\n{\n var k = 1 - t;\n\n return k * k * k * p;\n}\n\n/**\n * @ignore\n */\nfunction P1 (t, p)\n{\n var k = 1 - t;\n\n return 3 * k * k * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P2 (t, p)\n{\n return 3 * (1 - t) * t * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P3 (t, p)\n{\n return t * t * t * p;\n}\n\n/**\n * A cubic bezier interpolation method.\n *\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\n *\n * @function Phaser.Math.Interpolation.CubicBezier\n * @since 3.0.0\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} p0 - The start point.\n * @param {number} p1 - The first control point.\n * @param {number} p2 - The second control point.\n * @param {number} p3 - The end point.\n *\n * @return {number} The interpolated value.\n */\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\n{\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\n};\n\nmodule.exports = CubicBezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Linear = require('../Linear');\n\n/**\n * A linear interpolation method.\n *\n * @function Phaser.Math.Interpolation.Linear\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {!number} The interpolated value.\n */\nvar LinearInterpolation = function (v, k)\n{\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n\n if (k < 0)\n {\n return Linear(v[0], v[1], f);\n }\n else if (k > 1)\n {\n return Linear(v[m], v[m - 1], m - f);\n }\n else\n {\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\n }\n};\n\nmodule.exports = LinearInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction P0 (t, p)\n{\n var k = 1 - t;\n\n return k * k * p;\n}\n\n/**\n * @ignore\n */\nfunction P1 (t, p)\n{\n return 2 * (1 - t) * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P2 (t, p)\n{\n return t * t * p;\n}\n\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\n\n/**\n * A quadratic bezier interpolation method.\n *\n * @function Phaser.Math.Interpolation.QuadraticBezier\n * @since 3.2.0\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} p0 - The start point.\n * @param {number} p1 - The control point.\n * @param {number} p2 - The end point.\n *\n * @return {number} The interpolated value.\n */\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\n{\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\n};\n\nmodule.exports = QuadraticBezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SmoothStep = require('../SmoothStep');\n\n/**\n * A Smooth Step interpolation method.\n *\n * @function Phaser.Math.Interpolation.SmoothStep\n * @since 3.9.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The interpolated value.\n */\nvar SmoothStepInterpolation = function (t, min, max)\n{\n return min + (max - min) * SmoothStep(t, 0, 1);\n};\n\nmodule.exports = SmoothStepInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SmootherStep = require('../SmootherStep');\n\n/**\n * A Smoother Step interpolation method.\n *\n * @function Phaser.Math.Interpolation.SmootherStep\n * @since 3.9.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The interpolated value.\n */\nvar SmootherStepInterpolation = function (t, min, max)\n{\n return min + (max - min) * SmootherStep(t, 0, 1);\n};\n\nmodule.exports = SmootherStepInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Interpolation\n */\n\nmodule.exports = {\n\n Bezier: require('./BezierInterpolation'),\n CatmullRom: require('./CatmullRomInterpolation'),\n CubicBezier: require('./CubicBezierInterpolation'),\n Linear: require('./LinearInterpolation'),\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\n SmoothStep: require('./SmoothStepInterpolation'),\n SmootherStep: require('./SmootherStepInterpolation')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Returns the nearest power of 2 to the given `value`.\n *\n * @function Phaser.Math.Pow2.GetNext\n * @since 3.0.0\n *\n * @param {number} value - The value.\n *\n * @return {integer} The nearest power of 2 to `value`.\n */\nvar GetPowerOfTwo = function (value)\n{\n var index = Math.log(value) / 0.6931471805599453;\n\n return (1 << Math.ceil(index));\n};\n\nmodule.exports = GetPowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if the given `width` and `height` are a power of two.\n * Useful for checking texture dimensions.\n *\n * @function Phaser.Math.Pow2.IsSize\n * @since 3.0.0\n *\n * @param {number} width - The width.\n * @param {number} height - The height.\n *\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\n */\nvar IsSizePowerOfTwo = function (width, height)\n{\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\n};\n\nmodule.exports = IsSizePowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Tests the value and returns `true` if it is a power of two.\n *\n * @function Phaser.Math.Pow2.IsValue\n * @since 3.0.0\n *\n * @param {number} value - The value to check if it's a power of two.\n *\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\n */\nvar IsValuePowerOfTwo = function (value)\n{\n return (value > 0 && (value & (value - 1)) === 0);\n};\n\nmodule.exports = IsValuePowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Pow2\n */\n\nmodule.exports = {\n\n GetNext: require('./GetPowerOfTwo'),\n IsSize: require('./IsSizePowerOfTwo'),\n IsValue: require('./IsValuePowerOfTwo')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\n\n/**\n * @classdesc\n * A seeded Random Data Generator.\n * \n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\n * by Phaser. Or, create your own instance to use as you require.\n * \n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\n * If no such config property exists, a random number is used.\n * \n * If you create your own instance of this class you should provide a seed for it.\n * If no seed is given it will use a 'random' one based on Date.now.\n *\n * @class RandomDataGenerator\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\n */\nvar RandomDataGenerator = new Class({\n\n initialize:\n\n function RandomDataGenerator (seeds)\n {\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#c\n * @type {number}\n * @default 1\n * @private\n * @since 3.0.0\n */\n this.c = 1;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s0\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s0 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s1\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s1 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s2\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s2 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#n\n * @type {number}\n * @default 0\n * @private\n * @since 3.2.0\n */\n this.n = 0;\n\n /**\n * Signs to choose from.\n *\n * @name Phaser.Math.RandomDataGenerator#signs\n * @type {number[]}\n * @since 3.0.0\n */\n this.signs = [ -1, 1 ];\n\n if (seeds)\n {\n this.init(seeds);\n }\n },\n\n /**\n * Private random helper.\n *\n * @method Phaser.Math.RandomDataGenerator#rnd\n * @since 3.0.0\n * @private\n *\n * @return {number} A random number.\n */\n rnd: function ()\n {\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\n\n this.c = t | 0;\n this.s0 = this.s1;\n this.s1 = this.s2;\n this.s2 = t - this.c;\n\n return this.s2;\n },\n\n /**\n * Internal method that creates a seed hash.\n *\n * @method Phaser.Math.RandomDataGenerator#hash\n * @since 3.0.0\n * @private\n *\n * @param {string} data - The value to hash.\n *\n * @return {number} The hashed value.\n */\n hash: function (data)\n {\n var h;\n var n = this.n;\n\n data = data.toString();\n\n for (var i = 0; i < data.length; i++)\n {\n n += data.charCodeAt(i);\n h = 0.02519603282416938 * n;\n n = h >>> 0;\n h -= n;\n h *= n;\n n = h >>> 0;\n h -= n;\n n += h * 0x100000000;// 2^32\n }\n\n this.n = n;\n\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\n },\n\n /**\n * Initialize the state of the random data generator.\n *\n * @method Phaser.Math.RandomDataGenerator#init\n * @since 3.0.0\n *\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\n */\n init: function (seeds)\n {\n if (typeof seeds === 'string')\n {\n this.state(seeds);\n }\n else\n {\n this.sow(seeds);\n }\n },\n\n /**\n * Reset the seed of the random data generator.\n *\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\n *\n * @method Phaser.Math.RandomDataGenerator#sow\n * @since 3.0.0\n *\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\n */\n sow: function (seeds)\n {\n // Always reset to default seed\n this.n = 0xefc8249d;\n this.s0 = this.hash(' ');\n this.s1 = this.hash(' ');\n this.s2 = this.hash(' ');\n this.c = 1;\n\n if (!seeds)\n {\n return;\n }\n\n // Apply any seeds\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\n {\n var seed = seeds[i];\n\n this.s0 -= this.hash(seed);\n this.s0 += ~~(this.s0 < 0);\n this.s1 -= this.hash(seed);\n this.s1 += ~~(this.s1 < 0);\n this.s2 -= this.hash(seed);\n this.s2 += ~~(this.s2 < 0);\n }\n },\n\n /**\n * Returns a random integer between 0 and 2^32.\n *\n * @method Phaser.Math.RandomDataGenerator#integer\n * @since 3.0.0\n *\n * @return {number} A random integer between 0 and 2^32.\n */\n integer: function ()\n {\n // 2^32\n return this.rnd() * 0x100000000;\n },\n\n /**\n * Returns a random real number between 0 and 1.\n *\n * @method Phaser.Math.RandomDataGenerator#frac\n * @since 3.0.0\n *\n * @return {number} A random real number between 0 and 1.\n */\n frac: function ()\n {\n // 2^-53\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\n },\n\n /**\n * Returns a random real number between 0 and 2^32.\n *\n * @method Phaser.Math.RandomDataGenerator#real\n * @since 3.0.0\n *\n * @return {number} A random real number between 0 and 2^32.\n */\n real: function ()\n {\n return this.integer() + this.frac();\n },\n\n /**\n * Returns a random integer between and including min and max.\n *\n * @method Phaser.Math.RandomDataGenerator#integerInRange\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n integerInRange: function (min, max)\n {\n return Math.floor(this.realInRange(0, max - min + 1) + min);\n },\n\n /**\n * Returns a random integer between and including min and max.\n * This method is an alias for RandomDataGenerator.integerInRange.\n *\n * @method Phaser.Math.RandomDataGenerator#between\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n between: function (min, max)\n {\n return Math.floor(this.realInRange(0, max - min + 1) + min);\n },\n\n /**\n * Returns a random real number between min and max.\n *\n * @method Phaser.Math.RandomDataGenerator#realInRange\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n realInRange: function (min, max)\n {\n return this.frac() * (max - min) + min;\n },\n\n /**\n * Returns a random real number between -1 and 1.\n *\n * @method Phaser.Math.RandomDataGenerator#normal\n * @since 3.0.0\n *\n * @return {number} A random real number between -1 and 1.\n */\n normal: function ()\n {\n return 1 - (2 * this.frac());\n },\n\n /**\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\n *\n * @method Phaser.Math.RandomDataGenerator#uuid\n * @since 3.0.0\n *\n * @return {string} A valid RFC4122 version4 ID hex string\n */\n uuid: function ()\n {\n var a = '';\n var b = '';\n\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\n {\n // eslint-disable-next-line no-empty\n }\n\n return b;\n },\n\n /**\n * Returns a random element from within the given array.\n *\n * @method Phaser.Math.RandomDataGenerator#pick\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[]} - [array]\n * @genericUse {T} - [$return]\n *\n * @param {T[]} array - The array to pick a random element from.\n *\n * @return {T} A random member of the array.\n */\n pick: function (array)\n {\n return array[this.integerInRange(0, array.length - 1)];\n },\n\n /**\n * Returns a sign to be used with multiplication operator.\n *\n * @method Phaser.Math.RandomDataGenerator#sign\n * @since 3.0.0\n *\n * @return {number} -1 or +1.\n */\n sign: function ()\n {\n return this.pick(this.signs);\n },\n\n /**\n * Returns a random element from within the given array, favoring the earlier entries.\n *\n * @method Phaser.Math.RandomDataGenerator#weightedPick\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[]} - [array]\n * @genericUse {T} - [$return]\n *\n * @param {T[]} array - The array to pick a random element from.\n *\n * @return {T} A random member of the array.\n */\n weightedPick: function (array)\n {\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\n },\n\n /**\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\n *\n * @method Phaser.Math.RandomDataGenerator#timestamp\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random timestamp between min and max.\n */\n timestamp: function (min, max)\n {\n return this.realInRange(min || 946684800000, max || 1577862000000);\n },\n\n /**\n * Returns a random angle between -180 and 180.\n *\n * @method Phaser.Math.RandomDataGenerator#angle\n * @since 3.0.0\n *\n * @return {number} A random number between -180 and 180.\n */\n angle: function ()\n {\n return this.integerInRange(-180, 180);\n },\n\n /**\n * Returns a random rotation in radians, between -3.141 and 3.141\n *\n * @method Phaser.Math.RandomDataGenerator#rotation\n * @since 3.0.0\n *\n * @return {number} A random number between -3.141 and 3.141\n */\n rotation: function ()\n {\n return this.realInRange(-3.1415926, 3.1415926);\n },\n\n /**\n * Gets or Sets the state of the generator. This allows you to retain the values\n * that the generator is using between games, i.e. in a game save file.\n *\n * To seed this generator with a previously saved state you can pass it as the\n * `seed` value in your game config, or call this method directly after Phaser has booted.\n *\n * Call this method with no parameters to return the current state.\n *\n * If providing a state it should match the same format that this method\n * returns, which is a string with a header `!rnd` followed by the `c`,\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\n *\n * @method Phaser.Math.RandomDataGenerator#state\n * @since 3.0.0\n *\n * @param {string} [state] - Generator state to be set.\n *\n * @return {string} The current state of the generator.\n */\n state: function (state)\n {\n if (typeof state === 'string' && state.match(/^!rnd/))\n {\n state = state.split(',');\n\n this.c = parseFloat(state[1]);\n this.s0 = parseFloat(state[2]);\n this.s1 = parseFloat(state[3]);\n this.s2 = parseFloat(state[4]);\n }\n\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\n },\n\n /**\n * Shuffles the given array, using the current seed.\n *\n * @method Phaser.Math.RandomDataGenerator#shuffle\n * @since 3.7.0\n *\n * @generic T\n * @genericUse {T[]} - [array,$return]\n *\n * @param {T[]} [array] - The array to be shuffled.\n *\n * @return {T[]} The shuffled array.\n */\n shuffle: function (array)\n {\n var len = array.length - 1;\n\n for (var i = len; i > 0; i--)\n {\n var randomIndex = Math.floor(this.frac() * (i + 1));\n var itemAtIndex = array[randomIndex];\n\n array[randomIndex] = array[i];\n array[i] = itemAtIndex;\n }\n\n return array;\n }\n\n});\n\nmodule.exports = RandomDataGenerator;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using ceil.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\n * As will `14` snap to `15`... but `16` will snap to `20`.\n *\n * @function Phaser.Math.Snap.Ceil\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapCeil = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.ceil(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapCeil;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using floor.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\n * As will `14` snap to `10`... but `16` will snap to `15`.\n *\n * @function Phaser.Math.Snap.Floor\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapFloor = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.floor(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapFloor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using rounding.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\n *\n * @function Phaser.Math.Snap.To\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapTo = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.round(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Snap\n */\n\nmodule.exports = {\n\n Ceil: require('./SnapCeil'),\n Floor: require('./SnapFloor'),\n To: require('./SnapTo')\n\n};\n","/**\n* @author Richard Davey \n* @copyright 2020 Photon Storm Ltd.\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\n*/\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\n * It can listen for Game events and respond to them.\n *\n * @class BasePlugin\n * @memberof Phaser.Plugins\n * @constructor\n * @since 3.8.0\n *\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\n */\nvar BasePlugin = new Class({\n\n initialize:\n\n function BasePlugin (pluginManager)\n {\n /**\n * A handy reference to the Plugin Manager that is responsible for this plugin.\n * Can be used as a route to gain access to game systems and events.\n *\n * @name Phaser.Plugins.BasePlugin#pluginManager\n * @type {Phaser.Plugins.PluginManager}\n * @protected\n * @since 3.8.0\n */\n this.pluginManager = pluginManager;\n\n /**\n * A reference to the Game instance this plugin is running under.\n *\n * @name Phaser.Plugins.BasePlugin#game\n * @type {Phaser.Game}\n * @protected\n * @since 3.8.0\n */\n this.game = pluginManager.game;\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\n * It will never be called again on this instance.\n * In here you can set-up whatever you need for this plugin to run.\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\n *\n * @method Phaser.Plugins.BasePlugin#init\n * @since 3.8.0\n *\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\n */\n init: function ()\n {\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\n * If a plugin is stopped, and then started again, this will get called again.\n * Typically called immediately after `BasePlugin.init`.\n * On a Scene Plugin, this method is never called.\n *\n * @method Phaser.Plugins.BasePlugin#start\n * @since 3.8.0\n */\n start: function ()\n {\n // Here are the game-level events you can listen to.\n // At the very least you should offer a destroy handler for when the game closes down.\n\n // var eventEmitter = this.game.events;\n\n // eventEmitter.once('destroy', this.gameDestroy, this);\n // eventEmitter.on('pause', this.gamePause, this);\n // eventEmitter.on('resume', this.gameResume, this);\n // eventEmitter.on('resize', this.gameResize, this);\n // eventEmitter.on('prestep', this.gamePreStep, this);\n // eventEmitter.on('step', this.gameStep, this);\n // eventEmitter.on('poststep', this.gamePostStep, this);\n // eventEmitter.on('prerender', this.gamePreRender, this);\n // eventEmitter.on('postrender', this.gamePostRender, this);\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\n * The game code has requested that your plugin stop doing whatever it does.\n * It is now considered as 'inactive' by the PluginManager.\n * Handle that process here (i.e. stop listening for events, etc)\n * If the plugin is started again then `BasePlugin.start` will be called again.\n * On a Scene Plugin, this method is never called.\n *\n * @method Phaser.Plugins.BasePlugin#stop\n * @since 3.8.0\n */\n stop: function ()\n {\n },\n\n /**\n * Game instance has been destroyed.\n * You must release everything in here, all references, all objects, free it all up.\n *\n * @method Phaser.Plugins.BasePlugin#destroy\n * @since 3.8.0\n */\n destroy: function ()\n {\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n }\n\n});\n\nmodule.exports = BasePlugin;\n","/**\n* @author Richard Davey \n* @copyright 2020 Photon Storm Ltd.\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\n*/\n\nvar BasePlugin = require('./BasePlugin');\nvar Class = require('../utils/Class');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\n * It can listen for Scene events and respond to them.\n * It can map itself to a Scene property, or into the Scene Systems, or both.\n *\n * @class ScenePlugin\n * @memberof Phaser.Plugins\n * @extends Phaser.Plugins.BasePlugin\n * @constructor\n * @since 3.8.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager)\n {\n BasePlugin.call(this, pluginManager);\n\n /**\n * A reference to the Scene that has installed this plugin.\n * Only set if it's a Scene Plugin, otherwise `null`.\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\n * You can use it during the `boot` method.\n *\n * @name Phaser.Plugins.ScenePlugin#scene\n * @type {?Phaser.Scene}\n * @protected\n * @since 3.8.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene Systems of the Scene that has installed this plugin.\n * Only set if it's a Scene Plugin, otherwise `null`.\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\n * You can use it during the `boot` method.\n *\n * @name Phaser.Plugins.ScenePlugin#systems\n * @type {?Phaser.Scenes.Systems}\n * @protected\n * @since 3.8.0\n */\n this.systems = scene.sys;\n\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\n },\n\n /**\n * This method is called when the Scene boots. It is only ever called once.\n *\n * By this point the plugin properties `scene` and `systems` will have already been set.\n *\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\n * Here are the Scene events you can listen to:\n *\n * - start\n * - ready\n * - preupdate\n * - update\n * - postupdate\n * - resize\n * - pause\n * - resume\n * - sleep\n * - wake\n * - transitioninit\n * - transitionstart\n * - transitioncomplete\n * - transitionout\n * - shutdown\n * - destroy\n *\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\n *\n * ```javascript\n * var eventEmitter = this.systems.events;\n * eventEmitter.once('destroy', this.sceneDestroy, this);\n * ```\n *\n * @method Phaser.Plugins.ScenePlugin#boot\n * @since 3.8.0\n */\n boot: function ()\n {\n },\n\n /**\n * Game instance has been destroyed.\n * \n * You must release everything in here, all references, all objects, free it all up.\n *\n * @method Phaser.Plugins.ScenePlugin#destroy\n * @since 3.8.0\n */\n destroy: function ()\n {\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n }\n\n});\n\nmodule.exports = ScenePlugin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Blend Modes.\n * \n * @namespace Phaser.BlendModes\n * @since 3.0.0\n */\n\nmodule.exports = {\n\n /**\n * Skips the Blend Mode check in the renderer.\n * \n * @name Phaser.BlendModes.SKIP_CHECK\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SKIP_CHECK: -1,\n\n /**\n * Normal blend mode. For Canvas and WebGL.\n * This is the default setting and draws new shapes on top of the existing canvas content.\n * \n * @name Phaser.BlendModes.NORMAL\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n NORMAL: 0,\n\n /**\n * Add blend mode. For Canvas and WebGL.\n * Where both shapes overlap the color is determined by adding color values.\n * \n * @name Phaser.BlendModes.ADD\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n ADD: 1,\n\n /**\n * Multiply blend mode. For Canvas and WebGL.\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\n * \n * @name Phaser.BlendModes.MULTIPLY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n MULTIPLY: 2,\n\n /**\n * Screen blend mode. For Canvas and WebGL.\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\n * \n * @name Phaser.BlendModes.SCREEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SCREEN: 3,\n\n /**\n * Overlay blend mode. For Canvas only.\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\n * \n * @name Phaser.BlendModes.OVERLAY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n OVERLAY: 4,\n\n /**\n * Darken blend mode. For Canvas only.\n * Retains the darkest pixels of both layers.\n * \n * @name Phaser.BlendModes.DARKEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DARKEN: 5,\n\n /**\n * Lighten blend mode. For Canvas only.\n * Retains the lightest pixels of both layers.\n * \n * @name Phaser.BlendModes.LIGHTEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LIGHTEN: 6,\n\n /**\n * Color Dodge blend mode. For Canvas only.\n * Divides the bottom layer by the inverted top layer.\n * \n * @name Phaser.BlendModes.COLOR_DODGE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR_DODGE: 7,\n\n /**\n * Color Burn blend mode. For Canvas only.\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\n * \n * @name Phaser.BlendModes.COLOR_BURN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR_BURN: 8,\n\n /**\n * Hard Light blend mode. For Canvas only.\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\n * \n * @name Phaser.BlendModes.HARD_LIGHT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n HARD_LIGHT: 9,\n\n /**\n * Soft Light blend mode. For Canvas only.\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\n * \n * @name Phaser.BlendModes.SOFT_LIGHT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOFT_LIGHT: 10,\n\n /**\n * Difference blend mode. For Canvas only.\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\n * \n * @name Phaser.BlendModes.DIFFERENCE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DIFFERENCE: 11,\n\n /**\n * Exclusion blend mode. For Canvas only.\n * Like difference, but with lower contrast.\n * \n * @name Phaser.BlendModes.EXCLUSION\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n EXCLUSION: 12,\n\n /**\n * Hue blend mode. For Canvas only.\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\n * \n * @name Phaser.BlendModes.HUE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n HUE: 13,\n\n /**\n * Saturation blend mode. For Canvas only.\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\n * \n * @name Phaser.BlendModes.SATURATION\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SATURATION: 14,\n\n /**\n * Color blend mode. For Canvas only.\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\n * \n * @name Phaser.BlendModes.COLOR\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR: 15,\n\n /**\n * Luminosity blend mode. For Canvas only.\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\n * \n * @name Phaser.BlendModes.LUMINOSITY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LUMINOSITY: 16,\n\n /**\n * Alpha erase blend mode. For Canvas and WebGL.\n * \n * @name Phaser.BlendModes.ERASE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n ERASE: 17,\n\n /**\n * Source-in blend mode. For Canvas only.\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\n * \n * @name Phaser.BlendModes.SOURCE_IN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_IN: 18,\n\n /**\n * Source-out blend mode. For Canvas only.\n * The new shape is drawn where it doesn't overlap the existing canvas content.\n * \n * @name Phaser.BlendModes.SOURCE_OUT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_OUT: 19,\n\n /**\n * Source-out blend mode. For Canvas only.\n * The new shape is only drawn where it overlaps the existing canvas content.\n * \n * @name Phaser.BlendModes.SOURCE_ATOP\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_ATOP: 20,\n\n /**\n * Destination-over blend mode. For Canvas only.\n * New shapes are drawn behind the existing canvas content.\n * \n * @name Phaser.BlendModes.DESTINATION_OVER\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_OVER: 21,\n\n /**\n * Destination-in blend mode. For Canvas only.\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\n * \n * @name Phaser.BlendModes.DESTINATION_IN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_IN: 22,\n\n /**\n * Destination-out blend mode. For Canvas only.\n * The existing content is kept where it doesn't overlap the new shape.\n * \n * @name Phaser.BlendModes.DESTINATION_OUT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_OUT: 23,\n\n /**\n * Destination-out blend mode. For Canvas only.\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\n * \n * @name Phaser.BlendModes.DESTINATION_ATOP\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_ATOP: 24,\n\n /**\n * Lighten blend mode. For Canvas only.\n * Where both shapes overlap the color is determined by adding color values.\n * \n * @name Phaser.BlendModes.LIGHTER\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LIGHTER: 25,\n\n /**\n * Copy blend mode. For Canvas only.\n * Only the new shape is shown.\n * \n * @name Phaser.BlendModes.COPY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COPY: 26,\n\n /**\n * Xor blend mode. For Canvas only.\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\n * \n * @name Phaser.BlendModes.XOR\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scale Manager Resize Event.\n * \n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\n * It sends three parameters to the callback, each of them being Size components. You can read\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\n * scaling your own game content.\n *\n * @event Phaser.Scale.Events#RESIZE\n * @since 3.16.1\n * \n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\n */\nmodule.exports = 'resize';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Boot Event.\n * \n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\n * \n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\n * \n * @event Phaser.Scenes.Events#BOOT\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'boot';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Create Event.\n * \n * This event is dispatched by a Scene after it has been created by the Scene Manager.\n * \n * If a Scene has a `create` method then this event is emitted _after_ that has run.\n * \n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\n * \n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\n * \n * @event Phaser.Scenes.Events#CREATE\n * @since 3.17.0\n * \n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\n */\nmodule.exports = 'create';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Destroy Event.\n * \n * This event is dispatched by a Scene during the Scene Systems destroy process.\n * \n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\n * \n * You should destroy any resources that may be in use by your Scene in this event handler.\n * \n * @event Phaser.Scenes.Events#DESTROY\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pause Event.\n * \n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\n * action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\n * \n * @event Phaser.Scenes.Events#PAUSE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\n */\nmodule.exports = 'pause';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Post Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#POST_UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'postupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#PRE_UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'preupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Ready Event.\n * \n * This event is dispatched by a Scene during the Scene Systems start process.\n * By this point in the process the Scene is now fully active and rendering.\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\n * \n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\n * \n * @event Phaser.Scenes.Events#READY\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\n */\nmodule.exports = 'ready';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Render Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\n * \n * A Scene will only render if it is visible and active.\n * By the time this event is dispatched, the Scene will have already been rendered.\n * \n * @event Phaser.Scenes.Events#RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'render';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Resume Event.\n * \n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\n * \n * @event Phaser.Scenes.Events#RESUME\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\n */\nmodule.exports = 'resume';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Shutdown Event.\n * \n * This event is dispatched by a Scene during the Scene Systems shutdown process.\n * \n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\n * \n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\n * \n * @event Phaser.Scenes.Events#SHUTDOWN\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\n */\nmodule.exports = 'shutdown';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Sleep Event.\n * \n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\n * \n * @event Phaser.Scenes.Events#SLEEP\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\n */\nmodule.exports = 'sleep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Start Event.\n * \n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\n * \n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\n * \n * @event Phaser.Scenes.Events#START\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Complete Event.\n * \n * This event is dispatched by the Target Scene of a transition.\n * \n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\n * of the transition.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\n * @since 3.5.0\n * \n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\n */\nmodule.exports = 'transitioncomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Init Event.\n * \n * This event is dispatched by the Target Scene of a transition.\n * \n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\n * this event is not dispatched.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_INIT\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitioninit';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Out Event.\n * \n * This event is dispatched by a Scene when it initiates a transition to another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_OUT\n * @since 3.5.0\n * \n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionout';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Start Event.\n * \n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\n * \n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\n * this event is dispatched anyway.\n * \n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\n * dispatched instead of this event.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_START\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionstart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Wake Event.\n * \n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_WAKE\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionwake';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'update';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Wake Event.\n * \n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\n * \n * @event Phaser.Scenes.Events#WAKE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\n */\nmodule.exports = 'wake';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Scenes.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CREATE: require('./CREATE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\n READY: require('./READY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n RENDER: require('./RENDER_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\n SLEEP: require('./SLEEP_EVENT'),\n START: require('./START_EVENT'),\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\n UPDATE: require('./UPDATE_EVENT'),\n WAKE: require('./WAKE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves the value of the given key from an object.\n *\n * @function Phaser.Tweens.Builders.GetBoolean\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The key to look for in the `source` object.\n * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {*} The retrieved value.\n */\nvar GetBoolean = function (source, key, defaultValue)\n{\n if (!source)\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key))\n {\n return source[key];\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetBoolean;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.CREATED\n * @type {integer}\n * @since 3.0.0\n */\n CREATED: 0,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.INIT\n * @type {integer}\n * @since 3.0.0\n */\n INIT: 1,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.DELAY\n * @type {integer}\n * @since 3.0.0\n */\n DELAY: 2,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.OFFSET_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n OFFSET_DELAY: 3,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PENDING_RENDER\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PLAYING_FORWARD\n * @type {integer}\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PLAYING_BACKWARD\n * @type {integer}\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.HOLD_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.REPEAT_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n COMPLETE: 9,\n\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PENDING_ADD\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_ADD: 20,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PAUSED\n * @type {integer}\n * @since 3.0.0\n */\n PAUSED: 21,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.LOOP_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.ACTIVE\n * @type {integer}\n * @since 3.0.0\n */\n ACTIVE: 23,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.COMPLETE_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n COMPLETE_DELAY: 24,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PENDING_REMOVE\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.REMOVED\n * @type {integer}\n * @since 3.0.0\n */\n REMOVED: 26\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\n\nfunction hasGetterOrSetter (def)\n{\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\n}\n\nfunction getProperty (definition, k, isClassDescriptor)\n{\n // This may be a lightweight object, OR it might be a property that was defined previously.\n\n // For simple class descriptors we can just assume its NOT previously defined.\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\n\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\n {\n def = def.value;\n }\n\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\n if (def && hasGetterOrSetter(def))\n {\n if (typeof def.enumerable === 'undefined')\n {\n def.enumerable = true;\n }\n\n if (typeof def.configurable === 'undefined')\n {\n def.configurable = true;\n }\n\n return def;\n }\n else\n {\n return false;\n }\n}\n\nfunction hasNonConfigurable (obj, k)\n{\n var prop = Object.getOwnPropertyDescriptor(obj, k);\n\n if (!prop)\n {\n return false;\n }\n\n if (prop.value && typeof prop.value === 'object')\n {\n prop = prop.value;\n }\n\n if (prop.configurable === false)\n {\n return true;\n }\n\n return false;\n}\n\n/**\n * Extends the given `myClass` object's prototype with the properties of `definition`.\n *\n * @function extend\n * @param {Object} ctor The constructor object to mix into.\n * @param {Object} definition A dictionary of functions for the class.\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\n * @param {Object} [extend] The parent constructor object.\n */\nfunction extend (ctor, definition, isClassDescriptor, extend)\n{\n for (var k in definition)\n {\n if (!definition.hasOwnProperty(k))\n {\n continue;\n }\n\n var def = getProperty(definition, k, isClassDescriptor);\n\n if (def !== false)\n {\n // If Extends is used, we will check its prototype to see if the final variable exists.\n\n var parent = extend || ctor;\n\n if (hasNonConfigurable(parent.prototype, k))\n {\n // Just skip the final property\n if (Class.ignoreFinals)\n {\n continue;\n }\n\n // We cannot re-define a property that is configurable=false.\n // So we will consider them final and throw an error. This is by\n // default so it is clear to the developer what is happening.\n // You can set ignoreFinals to true if you need to extend a class\n // which has configurable=false; it will simply not re-define final properties.\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\n }\n\n Object.defineProperty(ctor.prototype, k, def);\n }\n else\n {\n ctor.prototype[k] = definition[k];\n }\n }\n}\n\n/**\n * Applies the given `mixins` to the prototype of `myClass`.\n *\n * @function mixin\n * @param {Object} myClass The constructor object to mix into.\n * @param {Object|Array} mixins The mixins to apply to the constructor.\n */\nfunction mixin (myClass, mixins)\n{\n if (!mixins)\n {\n return;\n }\n\n if (!Array.isArray(mixins))\n {\n mixins = [ mixins ];\n }\n\n for (var i = 0; i < mixins.length; i++)\n {\n extend(myClass, mixins[i].prototype || mixins[i]);\n }\n}\n\n/**\n * Creates a new class with the given descriptor.\n * The constructor, defined by the name `initialize`,\n * is an optional function. If unspecified, an anonymous\n * function will be used which calls the parent class (if\n * one exists).\n *\n * You can also use `Extends` and `Mixins` to provide subclassing\n * and inheritance.\n *\n * @class Phaser.Class\n * @constructor\n * @param {Object} definition a dictionary of functions for the class\n * @example\n *\n * var MyClass = new Phaser.Class({\n *\n * initialize: function() {\n * this.foo = 2.0;\n * },\n *\n * bar: function() {\n * return this.foo + 5;\n * }\n * });\n */\nfunction Class (definition)\n{\n if (!definition)\n {\n definition = {};\n }\n\n // The variable name here dictates what we see in Chrome debugger\n var initialize;\n var Extends;\n\n if (definition.initialize)\n {\n if (typeof definition.initialize !== 'function')\n {\n throw new Error('initialize must be a function');\n }\n\n initialize = definition.initialize;\n\n // Usually we should avoid 'delete' in V8 at all costs.\n // However, its unlikely to make any performance difference\n // here since we only call this on class creation (i.e. not object creation).\n delete definition.initialize;\n }\n else if (definition.Extends)\n {\n var base = definition.Extends;\n\n initialize = function ()\n {\n base.apply(this, arguments);\n };\n }\n else\n {\n initialize = function () {};\n }\n\n if (definition.Extends)\n {\n initialize.prototype = Object.create(definition.Extends.prototype);\n initialize.prototype.constructor = initialize;\n\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\n\n Extends = definition.Extends;\n\n delete definition.Extends;\n }\n else\n {\n initialize.prototype.constructor = initialize;\n }\n\n // Grab the mixins, if they are specified...\n var mixins = null;\n\n if (definition.Mixins)\n {\n mixins = definition.Mixins;\n delete definition.Mixins;\n }\n\n // First, mixin if we can.\n mixin(initialize, mixins);\n\n // Now we grab the actual definition which defines the overrides.\n extend(initialize, definition, true, Extends);\n\n return initialize;\n}\n\nClass.extend = extend;\nClass.mixin = mixin;\nClass.ignoreFinals = false;\n\nmodule.exports = Class;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * A NOOP (No Operation) callback function.\n *\n * Used internally by Phaser when it's more expensive to determine if a callback exists\n * than it is to just invoke an empty function.\n *\n * @function Phaser.Utils.NOOP\n * @since 3.0.0\n */\nvar NOOP = function ()\n{\n // NOOP\n};\n\nmodule.exports = NOOP;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Adds the given item, or array of items, to the array.\n *\n * Each item must be unique within the array.\n *\n * The array is modified in-place and returned.\n *\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\n * added will take the array length over this limit, it will stop adding once the limit is reached.\n *\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\n *\n * @function Phaser.Utils.Array.Add\n * @since 3.4.0\n *\n * @param {array} array - The array to be added to.\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\n * @param {integer} [limit] - Optional limit which caps the size of the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {array} The input array.\n */\nvar Add = function (array, item, limit, callback, context)\n{\n if (context === undefined) { context = array; }\n\n if (limit > 0)\n {\n var remaining = limit - array.length;\n\n // There's nothing more we can do here, the array is full\n if (remaining <= 0)\n {\n return null;\n }\n }\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n if (array.indexOf(item) === -1)\n {\n array.push(item);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to insert\n\n // Ensure all the items are unique\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n if (array.indexOf(item[itemLength]) !== -1)\n {\n // Already exists in array, so remove it\n item.splice(itemLength, 1);\n }\n\n itemLength--;\n }\n\n // Anything left?\n itemLength = item.length;\n\n if (itemLength === 0)\n {\n return null;\n }\n\n if (limit > 0 && itemLength > remaining)\n {\n item.splice(remaining);\n\n itemLength = remaining;\n }\n\n for (var i = 0; i < itemLength; i++)\n {\n var entry = item[i];\n\n array.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n return item;\n};\n\nmodule.exports = Add;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Adds the given item, or array of items, to the array starting at the index specified.\n * \n * Each item must be unique within the array.\n * \n * Existing elements in the array are shifted up.\n * \n * The array is modified in-place and returned.\n * \n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\n * added will take the array length over this limit, it will stop adding once the limit is reached.\n * \n * You can optionally specify a callback to be invoked for each item successfully added to the array.\n *\n * @function Phaser.Utils.Array.AddAt\n * @since 3.4.0\n *\n * @param {array} array - The array to be added to.\n * @param {any|any[]} item - The item, or array of items, to add to the array.\n * @param {integer} [index=0] - The index in the array where the item will be inserted.\n * @param {integer} [limit] - Optional limit which caps the size of the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {array} The input array.\n */\nvar AddAt = function (array, item, index, limit, callback, context)\n{\n if (index === undefined) { index = 0; }\n if (context === undefined) { context = array; }\n\n if (limit > 0)\n {\n var remaining = limit - array.length;\n\n // There's nothing more we can do here, the array is full\n if (remaining <= 0)\n {\n return null;\n }\n }\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n if (array.indexOf(item) === -1)\n {\n array.splice(index, 0, item);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to insert\n\n // Ensure all the items are unique\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n if (array.indexOf(item[itemLength]) !== -1)\n {\n // Already exists in array, so remove it\n item.pop();\n }\n\n itemLength--;\n }\n\n // Anything left?\n itemLength = item.length;\n\n if (itemLength === 0)\n {\n return null;\n }\n\n // Truncate to the limit\n if (limit > 0 && itemLength > remaining)\n {\n item.splice(remaining);\n\n itemLength = remaining;\n }\n\n for (var i = itemLength - 1; i >= 0; i--)\n {\n var entry = item[i];\n\n array.splice(index, 0, entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n return item;\n};\n\nmodule.exports = AddAt;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given element to the top of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.BringToTop\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n *\n * @return {*} The element that was moved.\n */\nvar BringToTop = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex < array.length)\n {\n array.splice(currentIndex, 1);\n array.push(item);\n }\n\n return item;\n};\n\nmodule.exports = BringToTop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns the total number of elements in the array which have a property matching the given value.\n *\n * @function Phaser.Utils.Array.CountAllMatching\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} property - The property to test on each array element.\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {integer} The total number of elements with properties matching the given value.\n */\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n var total = 0;\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (child[property] === value)\n {\n total++;\n }\n }\n }\n\n return total;\n};\n\nmodule.exports = CountAllMatching;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Passes each element in the array to the given callback.\n *\n * @function Phaser.Utils.Array.Each\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {function} callback - A callback to be invoked for each item in the array.\n * @param {object} context - The context in which the callback is invoked.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\n *\n * @return {array} The input array.\n */\nvar Each = function (array, callback, context)\n{\n var i;\n var args = [ null ];\n\n for (i = 3; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < array.length; i++)\n {\n args[0] = array[i];\n\n callback.apply(context, args);\n }\n\n return array;\n};\n\nmodule.exports = Each;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Passes each element in the array, between the start and end indexes, to the given callback.\n *\n * @function Phaser.Utils.Array.EachInRange\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {function} callback - A callback to be invoked for each item in the array.\n * @param {object} context - The context in which the callback is invoked.\n * @param {integer} startIndex - The start index to search from.\n * @param {integer} endIndex - The end index to search to.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {array} The input array.\n */\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n var i;\n var args = [ null ];\n\n for (i = 5; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = startIndex; i < endIndex; i++)\n {\n args[0] = array[i];\n\n callback.apply(context, args);\n }\n }\n\n return array;\n};\n\nmodule.exports = EachInRange;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Searches a pre-sorted array for the closet value to the given number.\n *\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\n * and will check for the closest value of those to the given number.\n *\n * @function Phaser.Utils.Array.FindClosestInSorted\n * @since 3.0.0\n *\n * @param {number} value - The value to search for in the array.\n * @param {array} array - The array to search, which must be sorted.\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\n *\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\n */\nvar FindClosestInSorted = function (value, array, key)\n{\n if (!array.length)\n {\n return NaN;\n }\n else if (array.length === 1)\n {\n return array[0];\n }\n\n var i = 1;\n var low;\n var high;\n\n if (key)\n {\n if (value < array[0][key])\n {\n return array[0];\n }\n\n while (array[i][key] < value)\n {\n i++;\n }\n }\n else\n {\n while (array[i] < value)\n {\n i++;\n }\n }\n\n if (i > array.length)\n {\n i = array.length;\n }\n\n if (key)\n {\n low = array[i - 1][key];\n high = array[i][key];\n\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\n }\n else\n {\n low = array[i - 1];\n high = array[i];\n\n return ((high - value) <= (value - low)) ? high : low;\n }\n};\n\nmodule.exports = FindClosestInSorted;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns all elements in the array.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 elements.\n *\n * @function Phaser.Utils.Array.GetAll\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} [property] - The property to test on each array element.\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {array} All matching elements from the array.\n */\nvar GetAll = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n var output = [];\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (!property ||\n (property && value === undefined && child.hasOwnProperty(property)) ||\n (property && value !== undefined && child[property] === value))\n {\n output.push(child);\n }\n }\n }\n\n return output;\n};\n\nmodule.exports = GetAll;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns the first element in the array.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\n *\n * @function Phaser.Utils.Array.GetFirst\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} [property] - The property to test on each array element.\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included)\n *\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\n */\nvar GetFirst = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (!property ||\n (property && value === undefined && child.hasOwnProperty(property)) ||\n (property && value !== undefined && child[property] === value))\n {\n return child;\n }\n }\n }\n\n return null;\n};\n\nmodule.exports = GetFirst;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Returns a Random element from the array.\n *\n * @function Phaser.Utils.Array.GetRandom\n * @since 3.0.0\n *\n * @param {array} array - The array to select the random entry from.\n * @param {integer} [startIndex=0] - An optional start index.\n * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\n *\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\n */\nvar GetRandom = function (array, startIndex, length)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (length === undefined) { length = array.length; }\n\n var randomIndex = startIndex + Math.floor(Math.random() * length);\n\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\n};\n\nmodule.exports = GetRandom;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element down one place in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveDown\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item - The element to move down the array.\n *\n * @return {array} The input array.\n */\nvar MoveDown = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex > 0)\n {\n var item2 = array[currentIndex - 1];\n\n var index2 = array.indexOf(item2);\n\n array[currentIndex] = item2;\n array[index2] = item;\n }\n\n return array;\n};\n\nmodule.exports = MoveDown;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves an element in an array to a new position within the same array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveTo\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n * @param {integer} index - The new index that the element will be moved to.\n *\n * @return {*} The element that was moved.\n */\nvar MoveTo = function (array, item, index)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex === -1 || index < 0 || index >= array.length)\n {\n throw new Error('Supplied index out of bounds');\n }\n\n if (currentIndex !== index)\n {\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n array.splice(index, 0, item);\n }\n\n return item;\n};\n\nmodule.exports = MoveTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element up one place in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveUp\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item - The element to move up the array.\n *\n * @return {array} The input array.\n */\nvar MoveUp = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex < array.length - 1)\n {\n // The element one above `item` in the array\n var item2 = array[currentIndex + 1];\n var index2 = array.indexOf(item2);\n\n array[currentIndex] = item2;\n array[index2] = item;\n }\n\n return array;\n};\n\nmodule.exports = MoveUp;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = numberArray(2, 4); // array = [2, 3, 4]`\n * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n *\n * This is equivalent to `numberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = numberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = numberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n for (var i = start; i <= end; i++)\n {\n if (prefix || suffix)\n {\n var key = (prefix) ? prefix + i.toString() : i.toString();\n\n if (suffix)\n {\n key = key.concat(suffix);\n }\n\n result.push(key);\n }\n else\n {\n result.push(i);\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\n\n/**\n * Create an array of numbers (positive and/or negative) progressing from `start`\n * up to but not including `end` by advancing by `step`.\n *\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\n *\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\n * for forward compatibility make sure to pass in actual numbers.\n * \n * @example\n * NumberArrayStep(4);\n * // => [0, 1, 2, 3]\n *\n * NumberArrayStep(1, 5);\n * // => [1, 2, 3, 4]\n *\n * NumberArrayStep(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * NumberArrayStep(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * NumberArrayStep(1, 4, 0);\n * // => [1, 1, 1]\n *\n * NumberArrayStep(0);\n * // => []\n *\n * @function Phaser.Utils.Array.NumberArrayStep\n * @since 3.0.0\n *\n * @param {number} [start=0] - The start of the range.\n * @param {number} [end=null] - The end of the range.\n * @param {number} [step=1] - The value to increment or decrement by.\n *\n * @return {number[]} The array of number values.\n */\nvar NumberArrayStep = function (start, end, step)\n{\n if (start === undefined) { start = 0; }\n if (end === undefined) { end = null; }\n if (step === undefined) { step = 1; }\n\n if (end === null)\n {\n end = start;\n start = 0;\n }\n\n var result = [];\n\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\n\n for (var i = 0; i < total; i++)\n {\n result.push(start);\n start += step;\n }\n\n return result;\n};\n\nmodule.exports = NumberArrayStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction swap (arr, i, j)\n{\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n/**\n * @ignore\n */\nfunction defaultCompare (a, b)\n{\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\n *\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\n *\n * The array is modified in-place.\n *\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\n *\n * @function Phaser.Utils.Array.QuickSelect\n * @since 3.0.0\n *\n * @param {array} arr - The array to sort.\n * @param {integer} k - The k-th element index.\n * @param {integer} [left=0] - The index of the left part of the range.\n * @param {integer} [right] - The index of the right part of the range.\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\n */\nvar QuickSelect = function (arr, k, left, right, compare)\n{\n if (left === undefined) { left = 0; }\n if (right === undefined) { right = arr.length - 1; }\n if (compare === undefined) { compare = defaultCompare; }\n\n while (right > left)\n {\n if (right - left > 600)\n {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n\n QuickSelect(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n\n if (compare(arr[right], t) > 0)\n {\n swap(arr, left, right);\n }\n\n while (i < j)\n {\n swap(arr, i, j);\n\n i++;\n j--;\n\n while (compare(arr[i], t) < 0)\n {\n i++;\n }\n\n while (compare(arr[j], t) > 0)\n {\n j--;\n }\n }\n\n if (compare(arr[left], t) === 0)\n {\n swap(arr, left, j);\n }\n else\n {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k)\n {\n left = j + 1;\n }\n\n if (k <= j)\n {\n right = j - 1;\n }\n }\n};\n\nmodule.exports = QuickSelect;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetValue = require('../object/GetValue');\nvar Shuffle = require('./Shuffle');\n\nvar BuildChunk = function (a, b, qty)\n{\n var out = [];\n\n for (var aIndex = 0; aIndex < a.length; aIndex++)\n {\n for (var bIndex = 0; bIndex < b.length; bIndex++)\n {\n for (var i = 0; i < qty; i++)\n {\n out.push({ a: a[aIndex], b: b[bIndex] });\n }\n }\n }\n\n return out;\n};\n\n/**\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\n *\n * Range ([a,b,c], [1,2,3]) =\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\n * \n * Range ([a,b], [1,2,3], qty = 3) =\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\n * \n * Range ([a,b,c], [1,2,3], repeat x1) =\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\n * \n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\n * Maybe if max is set then repeat goes to -1 automatically?\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\n * \n * Range ([a], [1,2,3,4,5], random = true) =\n * a4, a1, a5, a2, a3\n * \n * Range ([a, b], [1,2,3], random = true) =\n * b3, a2, a1, b1, a3, b2\n * \n * Range ([a, b, c], [1,2,3], randomB = true) =\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\n * \n * Range ([a], [1,2,3,4,5], yoyo = true) =\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\n * \n * Range ([a, b], [1,2,3], yoyo = true) =\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\n *\n * @function Phaser.Utils.Array.Range\n * @since 3.0.0\n *\n * @param {array} a - The first array of range elements.\n * @param {array} b - The second array of range elements.\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\n *\n * @return {array} An array of arranged elements.\n */\nvar Range = function (a, b, options)\n{\n var max = GetValue(options, 'max', 0);\n var qty = GetValue(options, 'qty', 1);\n var random = GetValue(options, 'random', false);\n var randomB = GetValue(options, 'randomB', false);\n var repeat = GetValue(options, 'repeat', 0);\n var yoyo = GetValue(options, 'yoyo', false);\n\n var out = [];\n\n if (randomB)\n {\n Shuffle(b);\n }\n\n // Endless repeat, so limit by max\n if (repeat === -1)\n {\n if (max === 0)\n {\n repeat = 0;\n }\n else\n {\n // Work out how many repeats we need\n var total = (a.length * b.length) * qty;\n\n if (yoyo)\n {\n total *= 2;\n }\n\n repeat = Math.ceil(max / total);\n }\n }\n\n for (var i = 0; i <= repeat; i++)\n {\n var chunk = BuildChunk(a, b, qty);\n\n if (random)\n {\n Shuffle(chunk);\n }\n\n out = out.concat(chunk);\n\n if (yoyo)\n {\n chunk.reverse();\n\n out = out.concat(chunk);\n }\n }\n\n if (max)\n {\n out.splice(max);\n }\n\n return out;\n};\n\nmodule.exports = Range;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes the given item, or array of items, from the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\n *\n * @function Phaser.Utils.Array.Remove\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\n */\nvar Remove = function (array, item, callback, context)\n{\n if (context === undefined) { context = array; }\n\n var index;\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n index = array.indexOf(item);\n\n if (index !== -1)\n {\n SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to remove\n\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n var entry = item[itemLength];\n\n index = array.indexOf(entry);\n\n if (index !== -1)\n {\n SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n else\n {\n // Item wasn't found in the array, so remove it from our return results\n item.pop();\n }\n\n itemLength--;\n }\n\n return item;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes the item from the given position in the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\n *\n * @function Phaser.Utils.Array.RemoveAt\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {*} The item that was removed.\n */\nvar RemoveAt = function (array, index, callback, context)\n{\n if (context === undefined) { context = array; }\n\n if (index < 0 || index > array.length - 1)\n {\n throw new Error('Index out of bounds');\n }\n\n var item = SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n};\n\nmodule.exports = RemoveAt;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Removes the item within the given range in the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\n *\n * @function Phaser.Utils.Array.RemoveBetween\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {integer} startIndex - The start index to remove from.\n * @param {integer} endIndex - The end index to remove to.\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {Array.<*>} An array of items that were removed.\n */\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n if (context === undefined) { context = array; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n var size = endIndex - startIndex;\n\n var removed = array.splice(startIndex, size);\n\n if (callback)\n {\n for (var i = 0; i < removed.length; i++)\n {\n var entry = removed[i];\n\n callback.call(context, entry);\n }\n }\n\n return removed;\n }\n else\n {\n return [];\n }\n};\n\nmodule.exports = RemoveBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes a random object from the given array and returns it.\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\n *\n * @function Phaser.Utils.Array.RemoveRandomElement\n * @since 3.0.0\n *\n * @param {array} array - The array to removed a random element from.\n * @param {integer} [start=0] - The array index to start the search from.\n * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from.\n *\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\n */\nvar RemoveRandomElement = function (array, start, length)\n{\n if (start === undefined) { start = 0; }\n if (length === undefined) { length = array.length; }\n\n var randomIndex = start + Math.floor(Math.random() * length);\n\n return SpliceOne(array, randomIndex);\n};\n\nmodule.exports = RemoveRandomElement;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Replaces an element of the array with the new element.\n * The new element cannot already be a member of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.Replace\n * @since 3.4.0\n *\n * @param {array} array - The array to search within.\n * @param {*} oldChild - The element in the array that will be replaced.\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\n *\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\n */\nvar Replace = function (array, oldChild, newChild)\n{\n var index1 = array.indexOf(oldChild);\n var index2 = array.indexOf(newChild);\n\n if (index1 !== -1 && index2 === -1)\n {\n array[index1] = newChild;\n\n return true;\n }\n else\n {\n return false;\n }\n};\n\nmodule.exports = Replace;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the element at the start of the array to the end, shifting all items in the process.\n * The \"rotation\" happens to the left.\n *\n * @function Phaser.Utils.Array.RotateLeft\n * @since 3.0.0\n *\n * @param {array} array - The array to shift to the left. This array is modified in place.\n * @param {integer} [total=1] - The number of times to shift the array.\n *\n * @return {*} The most recently shifted element.\n */\nvar RotateLeft = function (array, total)\n{\n if (total === undefined) { total = 1; }\n\n var element = null;\n\n for (var i = 0; i < total; i++)\n {\n element = array.shift();\n array.push(element);\n }\n\n return element;\n};\n\nmodule.exports = RotateLeft;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the element at the end of the array to the start, shifting all items in the process.\n * The \"rotation\" happens to the right.\n *\n * @function Phaser.Utils.Array.RotateRight\n * @since 3.0.0\n *\n * @param {array} array - The array to shift to the right. This array is modified in place.\n * @param {integer} [total=1] - The number of times to shift the array.\n *\n * @return {*} The most recently shifted element.\n */\nvar RotateRight = function (array, total)\n{\n if (total === undefined) { total = 1; }\n\n var element = null;\n\n for (var i = 0; i < total; i++)\n {\n element = array.pop();\n array.unshift(element);\n }\n\n return element;\n};\n\nmodule.exports = RotateRight;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Tests if the start and end indexes are a safe range for the given array.\n * \n * @function Phaser.Utils.Array.SafeRange\n * @since 3.4.0\n *\n * @param {array} array - The array to check.\n * @param {integer} startIndex - The start index.\n * @param {integer} endIndex - The end index.\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\n *\n * @return {boolean} True if the range is safe, otherwise false.\n */\nvar SafeRange = function (array, startIndex, endIndex, throwError)\n{\n var len = array.length;\n\n if (startIndex < 0 ||\n startIndex > len ||\n startIndex >= endIndex ||\n endIndex > len ||\n startIndex + endIndex > len)\n {\n if (throwError)\n {\n throw new Error('Range Error: Values outside acceptable range');\n }\n\n return false;\n }\n else\n {\n return true;\n }\n};\n\nmodule.exports = SafeRange;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given element to the bottom of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.SendToBack\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n *\n * @return {*} The element that was moved.\n */\nvar SendToBack = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex > 0)\n {\n array.splice(currentIndex, 1);\n array.unshift(item);\n }\n\n return item;\n};\n\nmodule.exports = SendToBack;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\n *\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\n *\n * @function Phaser.Utils.Array.SetAll\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} property - The property to test for on each array element.\n * @param {*} value - The value to set the property to.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {array} The input array.\n */\nvar SetAll = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var entry = array[i];\n\n if (entry.hasOwnProperty(property))\n {\n entry[property] = value;\n }\n }\n }\n\n return array;\n};\n\nmodule.exports = SetAll;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\n *\n * The original array is modified directly and returned.\n *\n * @function Phaser.Utils.Array.Shuffle\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[]} - [array,$return]\n *\n * @param {T[]} array - The array to shuffle. This array is modified in place.\n *\n * @return {T[]} The shuffled array.\n */\nvar Shuffle = function (array)\n{\n for (var i = array.length - 1; i > 0; i--)\n {\n var j = Math.floor(Math.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n\n return array;\n};\n\nmodule.exports = Shuffle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\n * Based on code by Mike Reinstein.\n *\n * @function Phaser.Utils.Array.SpliceOne\n * @since 3.0.0\n *\n * @param {array} array - The array to splice from.\n * @param {integer} index - The index of the item which should be spliced.\n *\n * @return {*} The item which was spliced (removed).\n */\nvar SpliceOne = function (array, index)\n{\n if (index >= array.length)\n {\n return;\n }\n\n var len = array.length - 1;\n\n var item = array[index];\n\n for (var i = index; i < len; i++)\n {\n array[i] = array[i + 1];\n }\n\n array.length = len;\n\n return item;\n};\n\nmodule.exports = SpliceOne;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n//! stable.js 0.1.6, https://github.com/Two-Screen/stable\n//! © 2017 Angry Bytes and contributors. MIT licensed.\n\n/**\n * @namespace Phaser.Utils.Array.StableSortFunctions\n */\n\n(function() {\n\n /**\n * A stable array sort, because `Array#sort()` is not guaranteed stable.\n * This is an implementation of merge sort, without recursion.\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} arr - The input array to be sorted.\n * @param {function} comp - The comparison handler.\n *\n * @return {array} The sorted result.\n */\nvar stable = function(arr, comp) {\n return exec(arr.slice(), comp);\n};\n\n /**\n * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes.\n *\n * @function Phaser.Utils.Array.StableSortFunctions.inplace\n * @memberof Phaser.Utils.Array.StableSortFunctions\n * @since 3.0.0\n *\n * @param {array} arr - The input array.\n * @param {function} comp - The comparison handler.\n *\n * @return {array} The sorted array.\n */\nstable.inplace = function(arr, comp) {\n var result = exec(arr, comp);\n\n // This simply copies back if the result isn't in the original array,\n // which happens on an odd number of passes.\n if (result !== arr) {\n pass(result, null, arr.length, arr);\n }\n\n return arr;\n};\n\n// Execute the sort using the input array and a second buffer as work space.\n// Returns one of those two, containing the final result.\nfunction exec(arr, comp) {\n if (typeof(comp) !== 'function') {\n comp = function(a, b) {\n return String(a).localeCompare(b);\n };\n }\n\n // Short-circuit when there's nothing to sort.\n var len = arr.length;\n if (len <= 1) {\n return arr;\n }\n\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\n // Chunks are the size of the left or right hand in merge sort.\n // Stop when the left-hand covers all of the array.\n var buffer = new Array(len);\n for (var chk = 1; chk < len; chk *= 2) {\n pass(arr, comp, chk, buffer);\n\n var tmp = arr;\n arr = buffer;\n buffer = tmp;\n }\n\n return arr;\n}\n\n// Run a single pass with the given chunk size.\nvar pass = function(arr, comp, chk, result) {\n var len = arr.length;\n var i = 0;\n // Step size / double chunk size.\n var dbl = chk * 2;\n // Bounds of the left and right chunks.\n var l, r, e;\n // Iterators over the left and right chunk.\n var li, ri;\n\n // Iterate over pairs of chunks.\n for (l = 0; l < len; l += dbl) {\n r = l + chk;\n e = r + chk;\n if (r > len) r = len;\n if (e > len) e = len;\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n while (true) {\n // Compare the chunks.\n if (li < r && ri < e) {\n // This works for a regular `sort()` compatible comparator,\n // but also for a simple comparator like: `a > b`\n if (comp(arr[li], arr[ri]) <= 0) {\n result[i++] = arr[li++];\n }\n else {\n result[i++] = arr[ri++];\n }\n }\n // Nothing to compare, just flush what's left.\n else if (li < r) {\n result[i++] = arr[li++];\n }\n else if (ri < e) {\n result[i++] = arr[ri++];\n }\n // Both iterators are at the chunk ends.\n else {\n break;\n }\n }\n }\n};\n\n// Export using CommonJS or to the window.\nif (typeof(module) !== 'undefined') {\n module.exports = stable;\n}\nelse {\n window.stable = stable;\n}\n\n})();","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Swaps the position of two elements in the given array.\n * The elements must exist in the same array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.Swap\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The first element to swap.\n * @param {*} item2 - The second element to swap.\n *\n * @return {array} The input array.\n */\nvar Swap = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return;\n }\n\n var index1 = array.indexOf(item1);\n var index2 = array.indexOf(item2);\n\n if (index1 < 0 || index2 < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n array[index1] = item2;\n array[index2] = item1;\n\n return array;\n};\n\nmodule.exports = Swap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Utils.Array\n */\n\nmodule.exports = {\n\n Matrix: require('./matrix'),\n\n Add: require('./Add'),\n AddAt: require('./AddAt'),\n BringToTop: require('./BringToTop'),\n CountAllMatching: require('./CountAllMatching'),\n Each: require('./Each'),\n EachInRange: require('./EachInRange'),\n FindClosestInSorted: require('./FindClosestInSorted'),\n GetAll: require('./GetAll'),\n GetFirst: require('./GetFirst'),\n GetRandom: require('./GetRandom'),\n MoveDown: require('./MoveDown'),\n MoveTo: require('./MoveTo'),\n MoveUp: require('./MoveUp'),\n NumberArray: require('./NumberArray'),\n NumberArrayStep: require('./NumberArrayStep'),\n QuickSelect: require('./QuickSelect'),\n Range: require('./Range'),\n Remove: require('./Remove'),\n RemoveAt: require('./RemoveAt'),\n RemoveBetween: require('./RemoveBetween'),\n RemoveRandomElement: require('./RemoveRandomElement'),\n Replace: require('./Replace'),\n RotateLeft: require('./RotateLeft'),\n RotateRight: require('./RotateRight'),\n SafeRange: require('./SafeRange'),\n SendToBack: require('./SendToBack'),\n SetAll: require('./SetAll'),\n Shuffle: require('./Shuffle'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if an array can be used as a matrix.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows:\n *\n * ```\n * [\n * [ 1, 1, 1, 1, 1, 1 ],\n * [ 2, 0, 0, 0, 0, 4 ],\n * [ 2, 0, 1, 2, 0, 4 ],\n * [ 2, 0, 3, 4, 0, 4 ],\n * [ 2, 0, 0, 0, 0, 4 ],\n * [ 3, 3, 3, 3, 3, 3 ]\n * ]\n * ```\n *\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[][]} - [matrix]\n *\n * @param {T[][]} [matrix] - The array to check.\n *\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\n */\nvar CheckMatrix = function (matrix)\n{\n if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0]))\n {\n return false;\n }\n\n // How long is the first row?\n var size = matrix[0].length;\n\n // Validate the rest of the rows are the same length\n for (var i = 1; i < matrix.length; i++)\n {\n if (matrix[i].length !== size)\n {\n return false;\n }\n }\n\n return true;\n};\n\nmodule.exports = CheckMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Pad = require('../../string/Pad');\nvar CheckMatrix = require('./CheckMatrix');\n\n/**\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.MatrixToString\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix]\n *\n * @param {T[][]} [matrix] - A 2-dimensional array.\n *\n * @return {string} A string representing the matrix.\n */\nvar MatrixToString = function (matrix)\n{\n var str = '';\n\n if (!CheckMatrix(matrix))\n {\n return str;\n }\n\n for (var r = 0; r < matrix.length; r++)\n {\n for (var c = 0; c < matrix[r].length; c++)\n {\n var cell = matrix[r][c].toString();\n\n if (cell !== 'undefined')\n {\n str += Pad(cell, 2);\n }\n else\n {\n str += '?';\n }\n\n if (c < matrix[r].length - 1)\n {\n str += ' |';\n }\n }\n\n if (r < matrix.length - 1)\n {\n str += '\\n';\n\n for (var i = 0; i < matrix[r].length; i++)\n {\n str += '---';\n\n if (i < matrix[r].length - 1)\n {\n str += '+';\n }\n }\n\n str += '\\n';\n }\n\n }\n\n return str;\n};\n\nmodule.exports = MatrixToString;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Reverses the columns in the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\n *\n * @return {T[][]} The column reversed matrix.\n */\nvar ReverseColumns = function (matrix)\n{\n return matrix.reverse();\n};\n\nmodule.exports = ReverseColumns;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Reverses the rows in the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.ReverseRows\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\n *\n * @return {T[][]} The column reversed matrix.\n */\nvar ReverseRows = function (matrix)\n{\n for (var i = 0; i < matrix.length; i++)\n {\n matrix[i].reverse();\n }\n\n return matrix;\n};\n\nmodule.exports = ReverseRows;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix 180 degrees.\n *\n * @function Phaser.Utils.Array.Matrix.Rotate180\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar Rotate180 = function (matrix)\n{\n return RotateMatrix(matrix, 180);\n};\n\nmodule.exports = Rotate180;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix to the left (or 90 degrees)\n *\n * @function Phaser.Utils.Array.Matrix.RotateLeft\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateLeft = function (matrix)\n{\n return RotateMatrix(matrix, 90);\n};\n\nmodule.exports = RotateLeft;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CheckMatrix = require('./CheckMatrix');\nvar TransposeMatrix = require('./TransposeMatrix');\n\n/**\n * Rotates the array matrix based on the given rotation value.\n *\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\n *\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\n *\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateMatrix = function (matrix, direction)\n{\n if (direction === undefined) { direction = 90; }\n\n if (!CheckMatrix(matrix))\n {\n return null;\n }\n\n if (typeof direction !== 'string')\n {\n direction = ((direction % 360) + 360) % 360;\n }\n\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\n {\n matrix = TransposeMatrix(matrix);\n matrix.reverse();\n }\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\n {\n matrix.reverse();\n matrix = TransposeMatrix(matrix);\n }\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\n {\n for (var i = 0; i < matrix.length; i++)\n {\n matrix[i].reverse();\n }\n\n matrix.reverse();\n }\n\n return matrix;\n};\n\nmodule.exports = RotateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix to the left (or -90 degrees)\n *\n * @function Phaser.Utils.Array.Matrix.RotateRight\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateRight = function (matrix)\n{\n return RotateMatrix(matrix, -90);\n};\n\nmodule.exports = RotateRight;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Transposes the elements of the given matrix (array of arrays).\n *\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\n *\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[][]} - [array,$return]\n * \n * @param {T[][]} [array] - The array matrix to transpose.\n *\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\n */\nvar TransposeMatrix = function (array)\n{\n var sourceRowCount = array.length;\n var sourceColCount = array[0].length;\n\n var result = new Array(sourceColCount);\n\n for (var i = 0; i < sourceColCount; i++)\n {\n result[i] = new Array(sourceRowCount);\n\n for (var j = sourceRowCount - 1; j > -1; j--)\n {\n result[i][j] = array[j][i];\n }\n }\n\n return result;\n};\n\nmodule.exports = TransposeMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Utils.Array.Matrix\n */\n\nmodule.exports = {\n\n CheckMatrix: require('./CheckMatrix'),\n MatrixToString: require('./MatrixToString'),\n ReverseColumns: require('./ReverseColumns'),\n ReverseRows: require('./ReverseRows'),\n Rotate180: require('./Rotate180'),\n RotateLeft: require('./RotateLeft'),\n RotateMatrix: require('./RotateMatrix'),\n RotateRight: require('./RotateRight'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar IsPlainObject = require('./IsPlainObject');\n\n// @param {boolean} deep - Perform a deep copy?\n// @param {object} target - The target object to copy to.\n// @return {object} The extended object.\n\n/**\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\n *\n * @function Phaser.Utils.Objects.Extend\n * @since 3.0.0\n *\n * @param {...*} [args] - The objects that will be mixed.\n *\n * @return {object} The extended object.\n */\nvar Extend = function ()\n{\n var options, name, src, copy, copyIsArray, clone,\n target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false;\n\n // Handle a deep copy situation\n if (typeof target === 'boolean')\n {\n deep = target;\n target = arguments[1] || {};\n\n // skip the boolean and the target\n i = 2;\n }\n\n // extend Phaser if only one argument is passed\n if (length === i)\n {\n target = this;\n --i;\n }\n\n for (; i < length; i++)\n {\n // Only deal with non-null/undefined values\n if ((options = arguments[i]) != null)\n {\n // Extend the base object\n for (name in options)\n {\n src = target[name];\n copy = options[name];\n\n // Prevent never-ending loop\n if (target === copy)\n {\n continue;\n }\n\n // Recurse if we're merging plain objects or arrays\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\n {\n if (copyIsArray)\n {\n copyIsArray = false;\n clone = src && Array.isArray(src) ? src : [];\n }\n else\n {\n clone = src && IsPlainObject(src) ? src : {};\n }\n\n // Never move original objects, clone them\n target[name] = Extend(deep, clone, copy);\n\n // Don't bring in undefined values\n }\n else if (copy !== undefined)\n {\n target[name] = copy;\n }\n }\n }\n }\n\n // Return the modified object\n return target;\n};\n\nmodule.exports = Extend;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH = require('../../math');\nvar GetValue = require('./GetValue');\n\n/**\n * Retrieves a value from an object. Allows for more advanced selection options, including:\n *\n * Allowed types:\n * \n * Implicit\n * {\n * x: 4\n * }\n *\n * From function\n * {\n * x: function ()\n * }\n *\n * Randomly pick one element from the array\n * {\n * x: [a, b, c, d, e, f]\n * }\n *\n * Random integer between min and max:\n * {\n * x: { randInt: [min, max] }\n * }\n *\n * Random float between min and max:\n * {\n * x: { randFloat: [min, max] }\n * }\n * \n *\n * @function Phaser.Utils.Objects.GetAdvancedValue\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\n *\n * @return {*} The value of the requested key.\n */\nvar GetAdvancedValue = function (source, key, defaultValue)\n{\n var value = GetValue(source, key, null);\n\n if (value === null)\n {\n return defaultValue;\n }\n else if (Array.isArray(value))\n {\n return MATH.RND.pick(value);\n }\n else if (typeof value === 'object')\n {\n if (value.hasOwnProperty('randInt'))\n {\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\n }\n else if (value.hasOwnProperty('randFloat'))\n {\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\n }\n }\n else if (typeof value === 'function')\n {\n return value(key);\n }\n\n return value;\n};\n\nmodule.exports = GetAdvancedValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\n *\n * @function Phaser.Utils.Objects.GetFastValue\n * @since 3.0.0\n *\n * @param {object} source - The object to search\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\n *\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\n */\nvar GetFastValue = function (source, key, defaultValue)\n{\n var t = typeof(source);\n\n if (!source || t === 'number' || t === 'string')\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\n {\n return source[key];\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetFastValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Source object\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\n// The default value to use if the key doesn't exist\n\n/**\n * Retrieves a value from an object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue)\n{\n if (!source || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parent = source;\n var value = defaultValue;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parent.hasOwnProperty(keys[i]))\n {\n // Yes it has a key property, let's carry on down\n value = parent[keys[i]];\n\n parent = parent[keys[i]];\n }\n else\n {\n // Can't go any further, so reset to default\n value = defaultValue;\n break;\n }\n }\n\n return value;\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * This is a slightly modified version of jQuery.isPlainObject.\n * A plain object is an object whose internal class property is [object Object].\n *\n * @function Phaser.Utils.Objects.IsPlainObject\n * @since 3.0.0\n *\n * @param {object} obj - The object to inspect.\n *\n * @return {boolean} `true` if the object is plain, otherwise `false`.\n */\nvar IsPlainObject = function (obj)\n{\n // Not plain objects:\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\n // - DOM nodes\n // - window\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\n {\n return false;\n }\n\n // Support: Firefox <20\n // The try/catch suppresses exceptions thrown when attempting to access\n // the \"constructor\" property of certain host objects, ie. |window.location|\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\n try\n {\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\n {\n return false;\n }\n }\n catch (e)\n {\n return false;\n }\n\n // If the function hasn't returned already, we're confident that\n // |obj| is a plain object, created by {} or constructed with new Object\n return true;\n};\n\nmodule.exports = IsPlainObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given string and pads it out, to the length required, using the character\n * specified. For example if you need a string to be 6 characters long, you can call:\n *\n * `pad('bob', 6, '-', 2)`\n *\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\n *\n * You can also use it to pad numbers (they are always returned as strings):\n * \n * `pad(512, 6, '0', 1)`\n *\n * Would return: `000512` with the string padded to the left.\n *\n * If you don't specify a direction it'll pad to both sides:\n * \n * `pad('c64', 7, '*')`\n *\n * Would return: `**c64**`\n *\n * @function Phaser.Utils.String.Pad\n * @since 3.0.0\n *\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\n * @param {integer} [len=0] - The number of characters to be added.\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\n * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\n * \n * @return {string} The padded string.\n */\nvar Pad = function (str, len, pad, dir)\n{\n if (len === undefined) { len = 0; }\n if (pad === undefined) { pad = ' '; }\n if (dir === undefined) { dir = 3; }\n\n str = str.toString();\n\n var padlen = 0;\n\n if (len + 1 >= str.length)\n {\n switch (dir)\n {\n case 1:\n str = new Array(len + 1 - str.length).join(pad) + str;\n break;\n\n case 3:\n var right = Math.ceil((padlen = len - str.length) / 2);\n var left = padlen - right;\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\n break;\n\n default:\n str = str + new Array(len + 1 - str.length).join(pad);\n break;\n }\n }\n\n return str;\n};\n\nmodule.exports = Pad;\n","/**\n * @author Richard Davey \n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../src/utils/Class');\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\nvar MultiFile = require('../../../src/loader/MultiFile.js');\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\n\n/**\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\n *\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\n\n/**\n * @classdesc\n * A Spine File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\n *\n * @class SpineFile\n * @extends Phaser.Loader.MultiFile\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\nvar SpineFile = new Class({\n\n Extends: MultiFile,\n\n initialize:\n\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var i;\n var json;\n var atlas;\n var files = [];\n var cache = loader.cacheManager.custom.spine;\n\n // atlas can be an array of atlas files, not just a single one\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n\n json = new JSONFile(loader, {\n key: key,\n url: GetFastValue(config, 'jsonURL'),\n extension: GetFastValue(config, 'jsonExtension', 'json'),\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\n });\n\n atlasURL = GetFastValue(config, 'atlasURL');\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, {\n key: key + '_' + i,\n url: atlasURL[i],\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\n });\n\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n else\n {\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n\n files.unshift(json);\n\n MultiFile.call(this, loader, 'spine', key, files);\n\n this.config.preMultipliedAlpha = preMultipliedAlpha;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\n * @since 3.19.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n\n if (file.type === 'text')\n {\n // Inspect the data for the files to now load\n var content = file.data.split('\\n');\n\n // Extract the textures\n var textures = [];\n\n for (var t = 0; t < content.length; t++)\n {\n var line = content[t];\n\n if (line.trim() === '' && t < content.length - 1)\n {\n line = content[t + 1];\n\n textures.push(line);\n }\n }\n\n var config = this.config;\n var loader = this.loader;\n\n var currentBaseURL = loader.baseURL;\n var currentPath = loader.path;\n var currentPrefix = loader.prefix;\n\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\n var prefix = GetFastValue(config, 'prefix', this.prefix);\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\n\n loader.setBaseURL(baseURL);\n loader.setPath(path);\n loader.setPrefix(prefix);\n\n for (var i = 0; i < textures.length; i++)\n {\n var textureURL = textures[i];\n\n var key = this.prefix + textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\n\n // Reset the loader settings\n loader.setBaseURL(currentBaseURL);\n loader.setPath(currentPath);\n loader.setPrefix(currentPrefix);\n }\n }\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\n * @since 3.19.0\n */\n addToCache: function ()\n {\n if (this.isReadyToProcess())\n {\n var fileJSON = this.files[0];\n\n fileJSON.addToCache();\n\n var atlasCache;\n var atlasKey = '';\n var combinedAtlasData = '';\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\n var textureManager = this.loader.textureManager;\n\n for (var i = 1; i < this.files.length; i++)\n {\n var file = this.files[i];\n\n if (file.type === 'text')\n {\n atlasKey = file.key.replace(/_[\\d]$/, '');\n\n atlasCache = file.cache;\n\n combinedAtlasData = combinedAtlasData.concat(file.data);\n }\n else\n {\n var src = file.key.trim();\n var pos = src.indexOf('_');\n var key = src.substr(pos + 1);\n\n if (!textureManager.exists(key))\n {\n textureManager.addImage(key, file.data);\n }\n }\n\n file.pendingDestroy();\n }\n\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\n\n this.complete = true;\n }\n }\n\n});\n\nmodule.exports = SpineFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\nvar Class = require('../../../src/utils/Class');\nvar GetValue = require('../../../src/utils/object/GetValue');\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\nvar Spine = require('Spine');\nvar SpineFile = require('./SpineFile');\nvar SpineGameObject = require('./gameobject/SpineGameObject');\nvar SpineContainer = require('./container/SpineContainer');\nvar NOOP = require('../../../src/utils/NOOP');\n\n/**\n * @classdesc\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\n *\n * Find more details about Spine itself at http://esotericsoftware.com/.\n *\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\n *\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\n *\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\n *\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\n *\n * ```javascript\n * import * as SpinePlugin from './SpinePlugin.js';\n * ```\n *\n * and then adding it to your Phaser Game configuration:\n *\n * ```javascript\n * plugins: {\n * scene: [\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\n * ]\n * }\n * ```\n *\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\n * Game Configuration object, like this:\n *\n * ```javascript\n * scene: {\n * preload: preload,\n * create: create,\n * pack: {\n * files: [\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\n * ]\n * }\n * }\n * ```\n *\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\n * subsequent Scenes.\n *\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\n *\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\n * Spine files directly, i.e.:\n *\n * ```javascript\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\n * ```\n *\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\n * and Spine Containers:\n *\n * ```javascript\n * const man = this.add.spine(512, 650, 'stretchyman');\n *\n * const container = this.add.spineContainer();\n *\n * container.add(man);\n * ```\n *\n * The first argument is the key which you used when importing the Spine data. There are lots of\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\n * see the respective documentation and examples for further details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\n * load arguments, or you may see black outlines around skeleton textures.\n *\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\n * game, regardless if the Scene loaded the Spine data or not.\n *\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\n *\n * ```javascript\n * this.plugins.removeScenePlugin('SpinePlugin');\n * ```\n *\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\n *\n * @class SpinePlugin\n * @extends Phaser.Plugins.ScenePlugin\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager)\n {\n ScenePlugin.call(this, scene, pluginManager);\n\n var game = pluginManager.game;\n\n /**\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\n *\n * @name SpinePlugin#isWebGL\n * @type {boolean}\n * @readonly\n * @since 3.19.0\n */\n this.isWebGL = (game.config.renderType === 2);\n\n /**\n * A custom cache that stores the Spine atlas data.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#cache\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.cache = game.cache.addCustom('spine');\n\n /**\n * A custom cache that stores the Spine Textures.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#spineTextures\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.spineTextures = game.cache.addCustom('spineTextures');\n\n /**\n * A reference to the global JSON Cache.\n *\n * @name SpinePlugin#json\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.json = game.cache.json;\n\n /**\n * A reference to the global Texture Manager.\n *\n * @name SpinePlugin#textures\n * @type {Phaser.Textures.TextureManager}\n * @since 3.19.0\n */\n this.textures = game.textures;\n\n /**\n * A flag that sets if the Skeleton Renderers will render debug information over the top\n * of the skeleton or not.\n *\n * @name SpinePlugin#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The underlying WebGL context of the Phaser renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#gl\n * @type {WebGLRenderingContext}\n * @since 3.19.0\n */\n this.gl;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\n *\n * @name SpinePlugin#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.19.0\n */\n this.renderer;\n\n /**\n * An instance of the Spine WebGL Scene Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#sceneRenderer\n * @type {spine.webgl.SceneRenderer}\n * @since 3.19.0\n */\n this.sceneRenderer;\n\n /**\n * An instance of the Spine Skeleton Renderer.\n *\n * @name SpinePlugin#skeletonRenderer\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\n * @since 3.19.0\n */\n this.skeletonRenderer;\n\n /**\n * An instance of the Spine Skeleton Debug Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#skeletonDebugRenderer\n * @type {spine.webgl.skeletonDebugRenderer}\n * @since 3.19.0\n */\n this.skeletonDebugRenderer;\n\n /**\n * A reference to the Spine runtime.\n * This is the runtime created by Esoteric Software\n *\n * @name SpinePlugin#plugin\n * @type {spine}\n * @since 3.19.0\n */\n this.plugin = Spine;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp1\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp1;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp2\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp2;\n\n if (this.isWebGL)\n {\n this.runtime = Spine.webgl;\n\n this.renderer = game.renderer;\n this.gl = game.renderer.gl;\n\n this.getAtlas = this.getAtlasWebGL;\n }\n else\n {\n this.runtime = Spine.canvas;\n\n this.renderer = game.renderer;\n\n this.getAtlas = this.getAtlasCanvas;\n }\n\n // Headless mode?\n if (!this.renderer)\n {\n this.renderer = {\n width: game.scale.width,\n height: game.scale.height,\n preRender: NOOP,\n postRender: NOOP,\n render: NOOP,\n destroy: NOOP\n };\n }\n\n var _this = this;\n\n var add = function (x, y, key, animationName, loop)\n {\n var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop);\n\n this.displayList.add(spineGO);\n this.updateList.add(spineGO);\n\n return spineGO;\n };\n\n var make = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var key = GetValue(config, 'key', null);\n var animationName = GetValue(config, 'animationName', null);\n var loop = GetValue(config, 'loop', false);\n\n var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, spineGO, config);\n\n // Spine specific\n var skinName = GetValue(config, 'skinName', false);\n\n if (skinName)\n {\n spineGO.setSkinByName(skinName);\n }\n\n var slotName = GetValue(config, 'slotName', false);\n var attachmentName = GetValue(config, 'attachmentName', null);\n\n if (slotName)\n {\n spineGO.setAttachment(slotName, attachmentName);\n }\n\n return spineGO.refresh();\n };\n\n var addContainer = function (x, y, children)\n {\n var spineGO = new SpineContainer(this.scene, _this, x, y, children);\n\n this.displayList.add(spineGO);\n\n return spineGO;\n };\n\n var makeContainer = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var x = GetValue(config, 'x', 0);\n var y = GetValue(config, 'y', 0);\n var children = GetValue(config, 'children', null);\n\n var container = new SpineContainer(this.scene, _this, x, y, children);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, container, config);\n\n return container;\n };\n\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\n pluginManager.registerGameObject('spine', add, make);\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\n },\n\n /**\n * Internal boot handler.\n *\n * @method SpinePlugin#boot\n * @private\n * @since 3.19.0\n */\n boot: function ()\n {\n if (this.isWebGL)\n {\n this.bootWebGL();\n this.onResize();\n this.game.scale.on(ResizeEvent, this.onResize, this);\n }\n else\n {\n this.bootCanvas();\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.once('shutdown', this.shutdown, this);\n eventEmitter.once('destroy', this.destroy, this);\n\n this.game.events.once('destroy', this.gameDestroy, this);\n },\n\n /**\n * Internal boot handler for the Canvas Renderer.\n *\n * @method SpinePlugin#bootCanvas\n * @private\n * @since 3.19.0\n */\n bootCanvas: function ()\n {\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\n },\n\n /**\n * Internal boot handler for the WebGL Renderer.\n *\n * @method SpinePlugin#bootWebGL\n * @private\n * @since 3.19.0\n */\n bootWebGL: function ()\n {\n this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\n\n var setBlendMode = function (srcBlend, dstBlend)\n {\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\n {\n var gl = this.context.gl;\n\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n\n if (this.isDrawing)\n {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n }\n };\n\n this.sceneRenderer.batcher.setBlendMode = setBlendMode;\n this.sceneRenderer.shapes.setBlendMode = setBlendMode;\n\n this.skeletonRenderer = this.sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = this.sceneRenderer.skeletonDebugRenderer;\n\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasCanvas\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasCanvas: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());\n });\n }\n\n return atlas;\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasWebGL\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasWebGL: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n var gl = this.sceneRenderer.context.gl;\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);\n });\n }\n\n return atlas;\n },\n\n /**\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\n * outlines around skeleton textures.\n *\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\n * Loading a file using a key that is already taken will result in a warning.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.spine({\n * key: 'mainmenu',\n * jsonURL: 'boy.json',\n * atlasURL: 'boy.atlas',\n * preMultipliedAlpha: true\n * });\n * ```\n *\n * If you need to load multiple Spine atlas files, provide them as an array:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\n * }\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the data from the Spine plugin.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\n *\n * @method Phaser.Loader.LoaderPlugin#spine\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.19.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var multifile;\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n multifile = new SpineFile(this, key[i]);\n\n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n this.addFile(multifile.files);\n }\n\n return this;\n },\n\n /**\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#worldToLocal\n * @since 3.19.0\n *\n * @param {number} x - The screen space x coordinate to convert.\n * @param {number} y - The screen space y coordinate to convert.\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\n *\n * @return {spine.Vector2} A Vector2 containing the translated point.\n */\n worldToLocal: function (x, y, skeleton, bone)\n {\n var temp1 = this.temp1;\n var temp2 = this.temp2;\n var camera = this.sceneRenderer.camera;\n\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\n\n var width = camera.viewportWidth;\n var height = camera.viewportHeight;\n\n camera.screenToWorld(temp1, width, height);\n\n if (bone && bone.parent !== null)\n {\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\n\n return new Spine.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new Spine.Vector2(temp1.x, temp1.y);\n }\n },\n\n /**\n * Returns a Spine Vector2 based on the given x and y values.\n *\n * @method SpinePlugin#getVector2\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector2: function (x, y)\n {\n return new Spine.Vector2(x, y);\n },\n\n /**\n * Returns a Spine Vector2 based on the given x, y and z values.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#getVector3\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n * @param {number} z - The Vector z value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector3: function (x, y, z)\n {\n return new Spine.webgl.Vector3(x, y, z);\n },\n\n /**\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBones\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBones: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBones = value;\n\n return this;\n },\n\n /**\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugRegionAttachments\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugRegionAttachments: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawRegionAttachments = value;\n\n return this;\n },\n\n /**\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBoundingBoxes\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBoundingBoxes: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshHull\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshHull: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshHull = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshTriangles\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshTriangles: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshTriangles = value;\n\n return this;\n },\n\n /**\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugPaths\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugPaths: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawPaths = value;\n\n return this;\n },\n\n /**\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugSkeletonXY\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugSkeletonXY: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawSkeletonXY = value;\n\n return this;\n },\n\n /**\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugClipping\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugClipping: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawClipping = value;\n\n return this;\n },\n\n /**\n * Sets the given vertex effect on the Spine Skeleton Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setEffect\n * @since 3.19.0\n *\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\n *\n * @return {this} This Spine Plugin.\n */\n setEffect: function (effect)\n {\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\n\n return this;\n },\n\n /**\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\n *\n * The Skeleton data should have already been loaded before calling this method.\n *\n * @method SpinePlugin#createSkeleton\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\n *\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\n */\n createSkeleton: function (key, skeletonJSON)\n {\n var atlasKey = key;\n var jsonKey = key;\n var split = (key.indexOf('.') !== -1);\n\n if (split)\n {\n var parts = key.split('.');\n\n atlasKey = parts.shift();\n jsonKey = parts.join('.');\n }\n\n var atlasData = this.cache.get(atlasKey);\n var atlas = this.getAtlas(atlasKey);\n\n if (!atlas)\n {\n return null;\n }\n\n if (!this.spineTextures.has(atlasKey))\n {\n this.spineTextures.add(atlasKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\n\n var data;\n\n if (skeletonJSON)\n {\n data = skeletonJSON;\n }\n else\n {\n var json = this.json.get(atlasKey);\n\n data = (split) ? GetValue(json, jsonKey) : json;\n }\n\n if (data)\n {\n var skeletonData = skeletonJson.readSkeletonData(data);\n\n var skeleton = new Spine.Skeleton(skeletonData);\n\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\n }\n else\n {\n return null;\n }\n },\n\n /**\n * Creates a new Animation State and Animation State Data for the given skeleton.\n *\n * The returned object contains two properties: `state` and `stateData` respectively.\n *\n * @method SpinePlugin#createAnimationState\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\n *\n * @return {any} An object containing the Animation State and Animation State Data instances.\n */\n createAnimationState: function (skeleton)\n {\n var stateData = new Spine.AnimationStateData(skeleton.data);\n\n var state = new Spine.AnimationState(stateData);\n\n return { stateData: stateData, state: state };\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpinePlugin#getBounds\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\n *\n * @return {any} The bounds object.\n */\n getBounds: function (skeleton)\n {\n var offset = new Spine.Vector2();\n var size = new Spine.Vector2();\n\n skeleton.getBounds(offset, size, []);\n\n return { offset: offset, size: size };\n },\n\n /**\n * Internal handler for when the renderer resizes.\n *\n * Only called if running in WebGL.\n *\n * @method SpinePlugin#onResize\n * @since 3.19.0\n */\n onResize: function ()\n {\n var renderer = this.renderer;\n var sceneRenderer = this.sceneRenderer;\n\n var viewportWidth = renderer.width;\n var viewportHeight = renderer.height;\n\n sceneRenderer.camera.position.x = viewportWidth / 2;\n sceneRenderer.camera.position.y = viewportHeight / 2;\n\n sceneRenderer.camera.viewportWidth = viewportWidth;\n sceneRenderer.camera.viewportHeight = viewportHeight;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n *\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method SpinePlugin#shutdown\n * @private\n * @since 3.19.0\n */\n shutdown: function ()\n {\n var eventEmitter = this.systems.events;\n\n eventEmitter.off('shutdown', this.shutdown, this);\n\n if (this.isWebGL)\n {\n this.game.scale.off(ResizeEvent, this.onResize, this);\n }\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n *\n * We need to shutdown and then kill off all external references.\n *\n * @method SpinePlugin#destroy\n * @private\n * @since 3.19.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.game = null;\n this.scene = null;\n this.systems = null;\n\n this.cache = null;\n this.spineTextures = null;\n this.json = null;\n this.textures = null;\n this.skeletonRenderer = null;\n this.gl = null;\n },\n\n /**\n * The Game that owns this plugin is being destroyed.\n *\n * Dispose of the Scene Renderer and remove the Game Objects.\n *\n * @method SpinePlugin#gameDestroy\n * @private\n * @since 3.50.0\n */\n gameDestroy: function ()\n {\n this.destroy();\n\n if (this.sceneRenderer)\n {\n this.sceneRenderer.dispose();\n }\n\n this.sceneRenderer = null;\n this.pluginManager = null;\n\n this.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n }\n\n});\n\nSpinePlugin.SpineGameObject = SpineGameObject;\nSpinePlugin.SpineContainer = SpineContainer;\n\n/**\n * Creates a new Spine Game Object and adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\n *\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\n *\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\n * name, then use `SpinePlugin.make` instead.\n *\n * @method SpinePlugin#add\n * @since 3.19.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\n/**\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 500, y: 500, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-idle', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * @method SpinePlugin#make\n * @since 3.19.0\n *\n * @param {any} config - The configuration object this Game Object will use to create itself.\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\nmodule.exports = SpinePlugin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../../src/utils/Class');\nvar Container = require('../../../../src/gameobjects/container/Container');\nvar SpineContainerRender = require('./SpineContainerRender');\n\n/**\n * @classdesc\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\n *\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\n * for Spine Game Objects. You must only add ever Spine Game Objects to this type of Container. Although Phaser will\n * not prevent you from adding other types, they will not render and are likely to throw runtime errors.\n *\n * To create one in a Scene, use the factory methods:\n *\n * ```javascript\n * this.add.spinecontainer();\n * ```\n *\n * or\n *\n * ```javascript\n * this.make.spinecontainer();\n * ```\n *\n * See the Container documentation for further details about what Containers can do.\n *\n * @class SpineContainer\n * @extends Phaser.GameObjects.Container\n * @constructor\n * @since 3.50.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\n */\nvar SpineContainer = new Class({\n\n Extends: Container,\n\n Mixins: [\n SpineContainerRender\n ],\n\n initialize:\n\n function SpineContainer (scene, plugin, x, y, children)\n {\n Container.call(this, scene, x, y, children);\n\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\n this.type = 'Spine';\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineContainer#plugin\n * @type {SpinePlugin}\n * @since 3.50.0\n */\n this.plugin = plugin;\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method SpineContainer#preDestroy\n * @protected\n * @since 3.50.0\n */\n preDestroy: function ()\n {\n this.removeAll(!!this.exclusive);\n\n this.localTransform.destroy();\n this.tempTransformMatrix.destroy();\n\n this.list = [];\n this._displayList = null;\n this.plugin = null;\n }\n\n});\n\nmodule.exports = SpineContainer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = SpineContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar Clamp = require('../../../../src/math/Clamp');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineContainerWebGLRenderer#renderWebGL\n * @since 3.50.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = container.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n var children = container.list;\n\n if (children.length === 0)\n {\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\n {\n sceneRenderer.end();\n\n renderer.rebindPipeline();\n }\n\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var alpha = container.alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n var GameObjectRenderMask = 15;\n\n if (renderer.newType)\n {\n // flush + clear if this is a new type\n renderer.clearPipeline();\n\n sceneRenderer.begin();\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var src = children[i];\n\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n continue;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(transformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeleton.color.a = Clamp(childAlpha * alpha, 0, 1);\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n // Restore alpha\n skeleton.color.a = childAlpha;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\n sceneRenderer.end();\n\n // And rebind the previous pipeline\n renderer.rebindPipeline();\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar AngleBetween = require('../../../../src/math/angle/Between');\nvar Clamp = require('../../../../src/math/Clamp');\nvar Class = require('../../../../src/utils/Class');\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar DegToRad = require('../../../../src/math/DegToRad');\nvar GameObject = require('../../../../src/gameobjects/GameObject');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar SpineEvents = require('../events/');\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\n\n/**\n * @classdesc\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\n * easily change the skin, slot attachment, bone positions and more.\n *\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\n * You can only create them if the Spine plugin has been loaded into Phaser.\n *\n * The quickest way is the Game Object Factory:\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\n * animation to loop. Look at the documentation for further details on each of these options.\n *\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\n * Configuration object:\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 512, y: 550, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-think', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\n * overall scale.\n *\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\n * update and render, it must be added to the display and update lists of your Scene:\n *\n * ```javascript\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\n * this.sys.displayList.add(jelly);\n * this.sys.updateList.add(jelly);\n * ```\n *\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\n * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but\n * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created.\n * If it's not suitable, provide your own shape to the `setInteractive` method.\n *\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\n * Object position with it. See the examples for further details.\n *\n * If your Spine Game Object has black outlines around the different parts of the texture when it\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\n *\n * @class SpineGameObject\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n */\nvar SpineGameObject = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n ComponentsComputedSize,\n ComponentsDepth,\n ComponentsFlip,\n ComponentsScrollFactor,\n ComponentsTransform,\n ComponentsVisible,\n SpineGameObjectRender\n ],\n\n initialize:\n\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\n {\n GameObject.call(this, scene, 'Spine');\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineGameObject#plugin\n * @type {SpinePlugin}\n * @since 3.19.0\n */\n this.plugin = plugin;\n\n /**\n * The Spine Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeleton\n * @type {spine.Skeleton}\n * @since 3.19.0\n */\n this.skeleton = null;\n\n /**\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeletonData\n * @type {spine.SkeletonData}\n * @since 3.19.0\n */\n this.skeletonData = null;\n\n /**\n * The Spine Animation State this Game Object is using.\n *\n * @name SpineGameObject#state\n * @type {spine.AnimationState}\n * @since 3.19.0\n */\n this.state = null;\n\n /**\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\n *\n * @name SpineGameObject#stateData\n * @type {spine.AnimationStateData}\n * @since 3.19.0\n */\n this.stateData = null;\n\n /**\n * A reference to the root bone of the Skeleton.\n *\n * @name SpineGameObject#root\n * @type {spine.Bone}\n * @since 3.19.0\n */\n this.root = null;\n\n /**\n * This object holds the calculated bounds of the current\n * pose, as set when a new Skeleton is applied.\n *\n * @name SpineGameObject#bounds\n * @type {any}\n * @since 3.19.0\n */\n this.bounds = null;\n\n /**\n * A Game Object level flag that allows you to enable debug drawing\n * to the Skeleton Debug Renderer by toggling it.\n *\n * @name SpineGameObject#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The factor to scale the Animation update time by.\n *\n * @name SpineGameObject#timeScale\n * @type {number}\n * @since 3.19.0\n */\n this.timeScale = 1;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginX\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginX = 0;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginY\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginY = 0;\n\n /**\n * A flag that stores if the texture associated with the current\n * Skin being used by this Game Object, has its alpha pre-multiplied\n * into it, or not.\n *\n * @name SpineGameObject#preMultipliedAlpha\n * @type {boolean}\n * @since 3.19.0\n */\n this.preMultipliedAlpha = false;\n\n /**\n * A default Blend Mode. You cannot change the blend mode of a\n * Spine Game Object.\n *\n * @name SpineGameObject#blendMode\n * @type {number}\n * @readonly\n * @since 3.19.0\n */\n this.blendMode = -1;\n\n this.setPosition(x, y);\n\n if (key)\n {\n this.setSkeleton(key, animationName, loop);\n }\n },\n\n /**\n * Overrides the default Game Object method and always returns true.\n * Rendering is decided in the renderer functions.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @return {boolean} Always returns `true`.\n */\n willRender: function ()\n {\n return true;\n },\n\n /**\n * Set the Alpha level for the whole Skeleton of this Game Object.\n *\n * The alpha controls the opacity of the Game Object as it renders.\n *\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * @method SpineGameObject#setAlpha\n * @since 3.19.0\n *\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (value, slotName)\n {\n if (value === undefined) { value = 1; }\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n slot.color.a = Clamp(value, 0, 1);\n }\n }\n else\n {\n this.alpha = value;\n }\n\n return this;\n },\n\n /**\n * The alpha value of the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#alpha\n * @type {number}\n * @since 3.19.0\n */\n alpha: {\n\n get: function ()\n {\n return this.skeleton.color.a;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.a = v;\n }\n\n if (v === 0)\n {\n this.renderFlags &= ~2;\n }\n else\n {\n this.renderFlags |= 2;\n }\n }\n\n },\n\n /**\n * The amount of red used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#red\n * @type {number}\n * @since 3.19.0\n */\n red: {\n\n get: function ()\n {\n return this.skeleton.color.r;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.r = v;\n }\n }\n\n },\n\n /**\n * The amount of green used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#green\n * @type {number}\n * @since 3.19.0\n */\n green: {\n\n get: function ()\n {\n return this.skeleton.color.g;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.g = v;\n }\n }\n\n },\n\n /**\n * The amount of blue used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#blue\n * @type {number}\n * @since 3.19.0\n */\n blue: {\n\n get: function ()\n {\n return this.skeleton.color.b;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.b = v;\n }\n }\n\n },\n\n /**\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\n *\n * @method SpineGameObject#setColor\n * @since 3.19.0\n *\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setColor: function (color, slotName)\n {\n if (color === undefined) { color = 0xffffff; }\n\n var red = (color >> 16 & 0xFF) / 255;\n var green = (color >> 8 & 0xFF) / 255;\n var blue = (color & 0xFF) / 255;\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\n\n var target = this.skeleton;\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n target = slot;\n }\n }\n\n target.color.r = red;\n target.color.g = green;\n target.color.b = blue;\n\n if (alpha !== null)\n {\n target.color.a = alpha;\n }\n\n return this;\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\n * that contains the Skeleton data.\n *\n * @method SpineGameObject#setSkeletonFromJSON\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\n {\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on its cache key.\n *\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\n * or slot attachment, or any other property to adjust it.\n *\n * @method SpineGameObject#setSkeleton\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\n\n this.skeletonData = data.skeletonData;\n\n this.preMultipliedAlpha = data.preMultipliedAlpha;\n\n var skeleton = data.skeleton;\n\n skeleton.setSkin();\n skeleton.setToSetupPose();\n\n this.skeleton = skeleton;\n\n // AnimationState\n data = this.plugin.createAnimationState(skeleton);\n\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.state = data.state;\n this.stateData = data.stateData;\n\n this.state.addListener({\n event: this.onEvent.bind(this),\n complete: this.onComplete.bind(this),\n start: this.onStart.bind(this),\n end: this.onEnd.bind(this),\n dispose: this.onDispose.bind(this),\n interrupted: this.onInterrupted.bind(this)\n });\n\n if (animationName)\n {\n this.setAnimation(0, animationName, loop);\n }\n\n this.root = this.getRootBone();\n\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.state.apply(skeleton);\n\n skeleton.updateCache();\n\n return this.updateSize();\n },\n\n /**\n * Internal event handler that emits the Spine onComplete event via this Game Object.\n *\n * @method SpineGameObject#onComplete\n * @fires SpinePluginEvents#COMPLETE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onComplete: function (entry)\n {\n this.emit(SpineEvents.COMPLETE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onDispose event via this Game Object.\n *\n * @method SpineGameObject#onDispose\n * @fires SpinePluginEvents#DISPOSE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onDispose: function (entry)\n {\n this.emit(SpineEvents.DISPOSE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onEnd event via this Game Object.\n *\n * @method SpineGameObject#onEnd\n * @fires SpinePluginEvents#END\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onEnd: function (entry)\n {\n this.emit(SpineEvents.END, entry);\n },\n\n /**\n * Internal event handler that emits the Spine Event event via this Game Object.\n *\n * @method SpineGameObject#onEvent\n * @fires SpinePluginEvents#EVENT\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n * @param {spine.Event} event - The Spine event.\n */\n onEvent: function (entry, event)\n {\n this.emit(SpineEvents.EVENT, entry, event);\n },\n\n /**\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\n *\n * @method SpineGameObject#onInterrupted\n * @fires SpinePluginEvents#INTERRUPTED\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onInterrupted: function (entry)\n {\n this.emit(SpineEvents.INTERRUPTED, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onStart event via this Game Object.\n *\n * @method SpineGameObject#onStart\n * @fires SpinePluginEvents#START\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onStart: function (entry)\n {\n this.emit(SpineEvents.START, entry);\n },\n\n /**\n * Refreshes the data about the current Skeleton.\n *\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\n *\n * Call this method if you need to access the Skeleton data directly, and it may have changed\n * recently.\n *\n * @method SpineGameObject#refresh\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n refresh: function ()\n {\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.updateSize();\n\n this.skeleton.updateCache();\n\n return this;\n },\n\n /**\n * Sets the size of this Game Object.\n *\n * If no arguments are given it uses the current skeleton data dimensions.\n *\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\n * when the skeleton data doesn't match what is required in-game.\n *\n * @method SpineGameObject#setSize\n * @since 3.19.0\n *\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setSize: function (width, height, offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (width === undefined) { width = skeleton.data.width; }\n if (height === undefined) { height = skeleton.data.height; }\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.width = width;\n this.height = height;\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Sets the offset of this Game Object from the Skeleton position.\n *\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\n *\n * @method SpineGameObject#setOffset\n * @since 3.19.0\n *\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setOffset: function (offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\n * It then syncs the skeleton bounds back to this Game Object.\n *\n * This method is called automatically as needed internally, however, it's also exposed should\n * you require overriding the size settings.\n *\n * @method SpineGameObject#updateSize\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n updateSize: function ()\n {\n var skeleton = this.skeleton;\n var renderer = this.plugin.renderer;\n\n var height = renderer.height;\n\n var oldScaleX = this.scaleX;\n var oldScaleY = this.scaleY;\n\n skeleton.x = this.x;\n skeleton.y = height - this.y;\n skeleton.scaleX = 1;\n skeleton.scaleY = 1;\n\n skeleton.updateWorldTransform();\n\n var bounds = this.getBounds();\n\n this.width = bounds.size.x;\n this.height = bounds.size.y;\n\n this.displayOriginX = this.x - bounds.offset.x;\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\n\n skeleton.scaleX = oldScaleX;\n skeleton.scaleY = oldScaleY;\n\n skeleton.updateWorldTransform();\n\n return this;\n },\n\n /**\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleX\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleY\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * Returns an array containing the names of all the bones in the Skeleton Data.\n *\n * @method SpineGameObject#getBoneList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\n */\n getBoneList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.bones.length; i++)\n {\n output.push(skeletonData.bones[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the skins in the Skeleton Data.\n *\n * @method SpineGameObject#getSkinList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\n */\n getSkinList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.skins.length; i++)\n {\n output.push(skeletonData.skins[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the slots in the Skeleton.\n *\n * @method SpineGameObject#getSlotList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\n */\n getSlotList: function ()\n {\n var output = [];\n\n var skeleton = this.skeleton;\n\n for (var i = 0; i < skeleton.slots.length; i++)\n {\n output.push(skeleton.slots[i].data.name);\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the animations in the Skeleton Data.\n *\n * @method SpineGameObject#getAnimationList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\n */\n getAnimationList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.animations.length; i++)\n {\n output.push(skeletonData.animations[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns the current animation being played on the given track, if any.\n *\n * @method SpineGameObject#getCurrentAnimation\n * @since 3.19.0\n *\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\n *\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\n */\n getCurrentAnimation: function (trackIndex)\n {\n if (trackIndex === undefined) { trackIndex = 0; }\n\n var current = this.state.getCurrent(trackIndex);\n\n if (current)\n {\n return current.animation;\n }\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#play\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n *\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\n */\n play: function (animationName, loop, ignoreIfPlaying)\n {\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\n\n return this;\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#setAnimation\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to play the animation on.\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\n {\n if (loop === undefined) { loop = false; }\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n\n if (ignoreIfPlaying && this.state)\n {\n var currentTrack = this.state.getCurrent(trackIndex);\n\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\n {\n return;\n }\n }\n\n if (this.findAnimation(animationName))\n {\n return this.state.setAnimation(trackIndex, animationName, loop);\n }\n },\n\n /**\n * Adds an animation to be played after the current or last queued animation for a track.\n * If the track is empty, it is equivalent to calling setAnimation.\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\n * If the previous entry is looping, its next loop completion is used instead of its duration.\n *\n * @method SpineGameObject#addAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {string} animationName - The string-based key of the animation to add.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n addAnimation: function (trackIndex, animationName, loop, delay)\n {\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\n },\n\n /**\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\n *\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\n * A mix duration of 0 still mixes out over one frame.\n *\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\n * property to the value keyed in the new animation.\n *\n * @method SpineGameObject#setEmptyAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {spine.TrackEntry} The returned Track Entry.\n */\n setEmptyAnimation: function (trackIndex, mixDuration)\n {\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\n },\n\n /**\n * Removes all animations from the track, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTrack\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n *\n * @return {this} This Game Object.\n */\n clearTrack: function (trackIndex)\n {\n this.state.clearTrack(trackIndex);\n\n return this;\n },\n\n /**\n * Removes all animations from all tracks, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTracks\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n clearTracks: function ()\n {\n this.state.clearTracks();\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkinByName\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to set.\n *\n * @return {this} This Game Object.\n */\n setSkinByName: function (skinName)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkinByName(skinName);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkin\n * @since 3.19.0\n *\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\n *\n * @return {this} This Game Object.\n */\n setSkin: function (newSkin)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkin(newSkin);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the mix duration when changing from the specified animation to the other.\n *\n * @method SpineGameObject#setMix\n * @since 3.19.0\n *\n * @param {string} fromName - The animation to mix from.\n * @param {string} toName - The animation to mix to.\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {this} This Game Object.\n */\n setMix: function (fromName, toName, duration)\n {\n this.stateData.setMix(fromName, toName, duration);\n\n return this;\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot\n * index and attachment name. First the skin is checked and if the attachment was not found,\n * the default skin is checked.\n *\n * @method SpineGameObject#getAttachment\n * @since 3.19.0\n *\n * @param {integer} slotIndex - The slot index to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachment: function (slotIndex, attachmentName)\n {\n return this.skeleton.getAttachment(slotIndex, attachmentName);\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\n *\n * @method SpineGameObject#getAttachmentByName\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachmentByName: function (slotName, attachmentName)\n {\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\n },\n\n /**\n * A convenience method to set an attachment by finding the slot with findSlot,\n * finding the attachment with getAttachment, then setting the slot's attachment.\n *\n * @method SpineGameObject#setAttachment\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to add the attachment to.\n * @param {string} attachmentName - The attachment name to add.\n *\n * @return {this} This Game Object.\n */\n setAttachment: function (slotName, attachmentName)\n {\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\n {\n for (var i = 0; i < slotName.length; i++)\n {\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\n }\n }\n else\n {\n this.skeleton.setAttachment(slotName, attachmentName);\n }\n\n return this;\n },\n\n /**\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\n *\n * @method SpineGameObject#setToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setToSetupPose: function ()\n {\n this.skeleton.setToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the slots and draw order to their setup pose values.\n *\n * @method SpineGameObject#setSlotsToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setSlotsToSetupPose: function ()\n {\n this.skeleton.setSlotsToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the bones and constraints to their setup pose values.\n *\n * @method SpineGameObject#setBonesToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setBonesToSetupPose: function ()\n {\n this.skeleton.setBonesToSetupPose();\n\n return this;\n },\n\n /**\n * Gets the root bone, or null.\n *\n * @method SpineGameObject#getRootBone\n * @since 3.19.0\n *\n * @return {spine.Bone} The root bone, or null.\n */\n getRootBone: function ()\n {\n return this.skeleton.getRootBone();\n },\n\n /**\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\n * towards the given position. You can set an optional angle offset, should the bone be\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\n *\n * @method SpineGameObject#angleBoneToXY\n * @since 3.19.0\n *\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\n * @param {number} [offset=0] - An offset to add to the rotation angle.\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\n *\n * @return {this} This Game Object.\n */\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\n {\n if (offset === undefined) { offset = 0; }\n if (minAngle === undefined) { minAngle = 0; }\n if (maxAngle === undefined) { maxAngle = 360; }\n\n var renderer = this.plugin.renderer;\n var height = renderer.height;\n\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\n\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\n\n return this;\n },\n\n /**\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBone\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {spine.Bone} The bone, or null.\n */\n findBone: function (boneName)\n {\n return this.skeleton.findBone(boneName);\n },\n\n /**\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBoneIndex\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {integer} The bone index. Or -1 if the bone was not found.\n */\n findBoneIndex: function (boneName)\n {\n return this.skeleton.findBoneIndex(boneName);\n },\n\n /**\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlot\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {spine.Slot} The Slot. May be null.\n */\n findSlot: function (slotName)\n {\n return this.skeleton.findSlot(slotName);\n },\n\n /**\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlotIndex\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {integer} The slot index. Or -1 if the Slot was not found.\n */\n findSlotIndex: function (slotName)\n {\n return this.skeleton.findSlotIndex(slotName);\n },\n\n /**\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\n * this method than to call it multiple times.\n *\n * @method SpineGameObject#findSkin\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to find.\n *\n * @return {spine.Skin} The Skin. May be null.\n */\n findSkin: function (skinName)\n {\n return this.skeletonData.findSkin(skinName);\n },\n\n /**\n * Finds an event by comparing each events's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findEvent\n * @since 3.19.0\n *\n * @param {string} eventDataName - The name of the event to find.\n *\n * @return {spine.EventData} The Event Data. May be null.\n */\n findEvent: function (eventDataName)\n {\n return this.skeletonData.findEvent(eventDataName);\n },\n\n /**\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findAnimation\n * @since 3.19.0\n *\n * @param {string} animationName - The name of the animation to find.\n *\n * @return {spine.Animation} The Animation. May be null.\n */\n findAnimation: function (animationName)\n {\n return this.skeletonData.findAnimation(animationName);\n },\n\n /**\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findIkConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.IkConstraintData} The IK constraint. May be null.\n */\n findIkConstraint: function (constraintName)\n {\n return this.skeletonData.findIkConstraint(constraintName);\n },\n\n /**\n * Finds an transform constraint by comparing each transform constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findTransformConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\n */\n findTransformConstraint: function (constraintName)\n {\n return this.skeletonData.findTransformConstraint(constraintName);\n },\n\n /**\n * Finds a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.PathConstraintData} The path constraint. May be null.\n */\n findPathConstraint: function (constraintName)\n {\n return this.skeletonData.findPathConstraint(constraintName);\n },\n\n /**\n * Finds the index of a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraintIndex\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\n */\n findPathConstraintIndex: function (constraintName)\n {\n return this.skeletonData.findPathConstraintIndex(constraintName);\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpineGameObject#getBounds\n * @since 3.19.0\n *\n * @return {any} The bounds object.\n */\n getBounds: function ()\n {\n return this.plugin.getBounds(this.skeleton);\n },\n\n /**\n * Internal update handler.\n *\n * @method SpineGameObject#preUpdate\n * @protected\n * @since 3.19.0\n *\n * @param {number} time - The current timestamp.\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\n */\n preUpdate: function (time, delta)\n {\n var skeleton = this.skeleton;\n\n this.state.update((delta / 1000) * this.timeScale);\n\n this.state.apply(skeleton);\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method SpineGameObject#preDestroy\n * @protected\n * @since 3.19.0\n */\n preDestroy: function ()\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.plugin = null;\n\n this.skeleton = null;\n this.skeletonData = null;\n\n this.state = null;\n this.stateData = null;\n }\n\n});\n\nmodule.exports = SpineGameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderCanvas\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var context = renderer.currentContext;\n\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var skeletonRenderer = plugin.skeletonRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\n\n if (!skeleton || !willRender)\n {\n return;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n\n // Inverse or we get upside-down skeletons\n skeleton.scaleY = calcMatrix.scaleY * -1;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeletonRenderer.ctx = context;\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\n\n context.save();\n\n skeletonRenderer.draw(skeleton);\n\n context.restore();\n};\n\nmodule.exports = SpineGameObjectCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderWebGL\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n var sceneRenderer = plugin.sceneRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n // If there is already a batch running, and the next type isn't a Spine object, or this is the end, we need to close it\n\n if (sceneRenderer.batcher.isDrawing && (!renderer.nextTypeMatch || renderer.finalType))\n {\n // The next object in the display list is not a Spine object, so we end the batch\n sceneRenderer.end();\n\n renderer.rebindPipeline();\n }\n\n if (!renderer.finalType)\n {\n // Reset the current type\n renderer.currentType = '';\n }\n\n return;\n }\n\n if (renderer.newType)\n {\n // flush + clear previous pipeline if this is a new type\n renderer.clearPipeline();\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (plugin.drawDebug || src.drawDebug)\n {\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\n var oldX = skeleton.x;\n var oldY = skeleton.y;\n\n skeleton.x = 0;\n skeleton.y = 0;\n\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\n\n skeleton.x = oldX;\n skeleton.y = oldY;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\n sceneRenderer.end();\n\n // And rebind the previous pipeline\n renderer.rebindPipeline();\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar spine;\n(function (spine) {\n var Animation = (function () {\n function Animation(name, timelines, duration) {\n if (name == null)\n throw new Error(\"name cannot be null.\");\n if (timelines == null)\n throw new Error(\"timelines cannot be null.\");\n this.name = name;\n this.timelines = timelines;\n this.timelineIds = [];\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds[timelines[i].getPropertyId()] = true;\n this.duration = duration;\n }\n Animation.prototype.hasTimeline = function (id) {\n return this.timelineIds[id] == true;\n };\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0)\n lastTime %= this.duration;\n }\n var timelines = this.timelines;\n for (var i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n };\n Animation.binarySearch = function (values, target, step) {\n if (step === void 0) { step = 1; }\n var low = 0;\n var high = values.length / step - 2;\n if (high == 0)\n return step;\n var current = high >>> 1;\n while (true) {\n if (values[(current + 1) * step] <= target)\n low = current + 1;\n else\n high = current;\n if (low == high)\n return (low + 1) * step;\n current = (low + high) >>> 1;\n }\n };\n Animation.linearSearch = function (values, target, step) {\n for (var i = 0, last = values.length - step; i <= last; i += step)\n if (values[i] > target)\n return i;\n return -1;\n };\n return Animation;\n }());\n spine.Animation = Animation;\n var MixBlend;\n (function (MixBlend) {\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\n var MixDirection;\n (function (MixDirection) {\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\n var TimelineType;\n (function (TimelineType) {\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\n var CurveTimeline = (function () {\n function CurveTimeline(frameCount) {\n if (frameCount <= 0)\n throw new Error(\"frameCount must be > 0: \" + frameCount);\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\n }\n CurveTimeline.prototype.getFrameCount = function () {\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\n };\n CurveTimeline.prototype.setLinear = function (frameIndex) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\n };\n CurveTimeline.prototype.setStepped = function (frameIndex) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\n };\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\n if (index == this.curves.length)\n return CurveTimeline.LINEAR;\n var type = this.curves[index];\n if (type == CurveTimeline.LINEAR)\n return CurveTimeline.LINEAR;\n if (type == CurveTimeline.STEPPED)\n return CurveTimeline.STEPPED;\n return CurveTimeline.BEZIER;\n };\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\n var curves = this.curves;\n curves[i++] = CurveTimeline.BEZIER;\n var x = dfx, y = dfy;\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n x += dfx;\n y += dfy;\n }\n };\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\n percent = spine.MathUtils.clamp(percent, 0, 1);\n var curves = this.curves;\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\n var type = curves[i];\n if (type == CurveTimeline.LINEAR)\n return percent;\n if (type == CurveTimeline.STEPPED)\n return 0;\n i++;\n var x = 0;\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n x = curves[i];\n if (x >= percent) {\n var prevX = void 0, prevY = void 0;\n if (i == start) {\n prevX = 0;\n prevY = 0;\n }\n else {\n prevX = curves[i - 2];\n prevY = curves[i - 1];\n }\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\n }\n }\n var y = curves[i - 1];\n return y + (1 - y) * (percent - x) / (1 - x);\n };\n CurveTimeline.LINEAR = 0;\n CurveTimeline.STEPPED = 1;\n CurveTimeline.BEZIER = 2;\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\n return CurveTimeline;\n }());\n spine.CurveTimeline = CurveTimeline;\n var RotateTimeline = (function (_super) {\n __extends(RotateTimeline, _super);\n function RotateTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\n return _this;\n }\n RotateTimeline.prototype.getPropertyId = function () {\n return (TimelineType.rotate << 24) + this.boneIndex;\n };\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\n frameIndex <<= 1;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\n };\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation;\n return;\n case MixBlend.first:\n var r_1 = bone.data.rotation - bone.rotation;\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\n }\n return;\n }\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + r_2 * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r_2 += bone.data.rotation - bone.rotation;\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\n case MixBlend.add:\n bone.rotation += r_2 * alpha;\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r += bone.data.rotation - bone.rotation;\n case MixBlend.add:\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n }\n };\n RotateTimeline.ENTRIES = 2;\n RotateTimeline.PREV_TIME = -2;\n RotateTimeline.PREV_ROTATION = -1;\n RotateTimeline.ROTATION = 1;\n return RotateTimeline;\n }(CurveTimeline));\n spine.RotateTimeline = RotateTimeline;\n var TranslateTimeline = (function (_super) {\n __extends(TranslateTimeline, _super);\n function TranslateTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\n return _this;\n }\n TranslateTimeline.prototype.getPropertyId = function () {\n return (TimelineType.translate << 24) + this.boneIndex;\n };\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\n frameIndex *= TranslateTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TranslateTimeline.X] = x;\n this.frames[frameIndex + TranslateTimeline.Y] = y;\n };\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case MixBlend.first:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\n x = frames[frames.length + TranslateTimeline.PREV_X];\n y = frames[frames.length + TranslateTimeline.PREV_Y];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\n x = frames[frame + TranslateTimeline.PREV_X];\n y = frames[frame + TranslateTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case MixBlend.add:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n };\n TranslateTimeline.ENTRIES = 3;\n TranslateTimeline.PREV_TIME = -3;\n TranslateTimeline.PREV_X = -2;\n TranslateTimeline.PREV_Y = -1;\n TranslateTimeline.X = 1;\n TranslateTimeline.Y = 2;\n return TranslateTimeline;\n }(CurveTimeline));\n spine.TranslateTimeline = TranslateTimeline;\n var ScaleTimeline = (function (_super) {\n __extends(ScaleTimeline, _super);\n function ScaleTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n ScaleTimeline.prototype.getPropertyId = function () {\n return (TimelineType.scale << 24) + this.boneIndex;\n };\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case MixBlend.first:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\n }\n else {\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\n x = frames[frame + ScaleTimeline.PREV_X];\n y = frames[frame + ScaleTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\n }\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n }\n else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n }\n else {\n var bx = 0, by = 0;\n if (direction == MixDirection.mixOut) {\n switch (blend) {\n case MixBlend.setup:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.add:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup:\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.add:\n bx = spine.MathUtils.signum(x);\n by = spine.MathUtils.signum(y);\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\n }\n }\n }\n };\n return ScaleTimeline;\n }(TranslateTimeline));\n spine.ScaleTimeline = ScaleTimeline;\n var ShearTimeline = (function (_super) {\n __extends(ShearTimeline, _super);\n function ShearTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n ShearTimeline.prototype.getPropertyId = function () {\n return (TimelineType.shear << 24) + this.boneIndex;\n };\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case MixBlend.first:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\n x = frames[frames.length + ShearTimeline.PREV_X];\n y = frames[frames.length + ShearTimeline.PREV_Y];\n }\n else {\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\n x = frames[frame + ShearTimeline.PREV_X];\n y = frames[frame + ShearTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case MixBlend.add:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n };\n return ShearTimeline;\n }(TranslateTimeline));\n spine.ShearTimeline = ShearTimeline;\n var ColorTimeline = (function (_super) {\n __extends(ColorTimeline, _super);\n function ColorTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\n return _this;\n }\n ColorTimeline.prototype.getPropertyId = function () {\n return (TimelineType.color << 24) + this.slotIndex;\n };\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\n frameIndex *= ColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + ColorTimeline.R] = r;\n this.frames[frameIndex + ColorTimeline.G] = g;\n this.frames[frameIndex + ColorTimeline.B] = b;\n this.frames[frameIndex + ColorTimeline.A] = a;\n };\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n return;\n case MixBlend.first:\n var color = slot.color, setup = slot.data.color;\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\n }\n return;\n }\n var r = 0, g = 0, b = 0, a = 0;\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\n var i = frames.length;\n r = frames[i + ColorTimeline.PREV_R];\n g = frames[i + ColorTimeline.PREV_G];\n b = frames[i + ColorTimeline.PREV_B];\n a = frames[i + ColorTimeline.PREV_A];\n }\n else {\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\n r = frames[frame + ColorTimeline.PREV_R];\n g = frames[frame + ColorTimeline.PREV_G];\n b = frames[frame + ColorTimeline.PREV_B];\n a = frames[frame + ColorTimeline.PREV_A];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\n r += (frames[frame + ColorTimeline.R] - r) * percent;\n g += (frames[frame + ColorTimeline.G] - g) * percent;\n b += (frames[frame + ColorTimeline.B] - b) * percent;\n a += (frames[frame + ColorTimeline.A] - a) * percent;\n }\n if (alpha == 1)\n slot.color.set(r, g, b, a);\n else {\n var color = slot.color;\n if (blend == MixBlend.setup)\n color.setFromColor(slot.data.color);\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\n }\n };\n ColorTimeline.ENTRIES = 5;\n ColorTimeline.PREV_TIME = -5;\n ColorTimeline.PREV_R = -4;\n ColorTimeline.PREV_G = -3;\n ColorTimeline.PREV_B = -2;\n ColorTimeline.PREV_A = -1;\n ColorTimeline.R = 1;\n ColorTimeline.G = 2;\n ColorTimeline.B = 3;\n ColorTimeline.A = 4;\n return ColorTimeline;\n }(CurveTimeline));\n spine.ColorTimeline = ColorTimeline;\n var TwoColorTimeline = (function (_super) {\n __extends(TwoColorTimeline, _super);\n function TwoColorTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\n return _this;\n }\n TwoColorTimeline.prototype.getPropertyId = function () {\n return (TimelineType.twoColor << 24) + this.slotIndex;\n };\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\n frameIndex *= TwoColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TwoColorTimeline.R] = r;\n this.frames[frameIndex + TwoColorTimeline.G] = g;\n this.frames[frameIndex + TwoColorTimeline.B] = b;\n this.frames[frameIndex + TwoColorTimeline.A] = a;\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\n };\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n slot.darkColor.setFromColor(slot.data.darkColor);\n return;\n case MixBlend.first:\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\n }\n return;\n }\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\n var i = frames.length;\n r = frames[i + TwoColorTimeline.PREV_R];\n g = frames[i + TwoColorTimeline.PREV_G];\n b = frames[i + TwoColorTimeline.PREV_B];\n a = frames[i + TwoColorTimeline.PREV_A];\n r2 = frames[i + TwoColorTimeline.PREV_R2];\n g2 = frames[i + TwoColorTimeline.PREV_G2];\n b2 = frames[i + TwoColorTimeline.PREV_B2];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\n r = frames[frame + TwoColorTimeline.PREV_R];\n g = frames[frame + TwoColorTimeline.PREV_G];\n b = frames[frame + TwoColorTimeline.PREV_B];\n a = frames[frame + TwoColorTimeline.PREV_A];\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\n }\n if (alpha == 1) {\n slot.color.set(r, g, b, a);\n slot.darkColor.set(r2, g2, b2, 1);\n }\n else {\n var light = slot.color, dark = slot.darkColor;\n if (blend == MixBlend.setup) {\n light.setFromColor(slot.data.color);\n dark.setFromColor(slot.data.darkColor);\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\n }\n };\n TwoColorTimeline.ENTRIES = 8;\n TwoColorTimeline.PREV_TIME = -8;\n TwoColorTimeline.PREV_R = -7;\n TwoColorTimeline.PREV_G = -6;\n TwoColorTimeline.PREV_B = -5;\n TwoColorTimeline.PREV_A = -4;\n TwoColorTimeline.PREV_R2 = -3;\n TwoColorTimeline.PREV_G2 = -2;\n TwoColorTimeline.PREV_B2 = -1;\n TwoColorTimeline.R = 1;\n TwoColorTimeline.G = 2;\n TwoColorTimeline.B = 3;\n TwoColorTimeline.A = 4;\n TwoColorTimeline.R2 = 5;\n TwoColorTimeline.G2 = 6;\n TwoColorTimeline.B2 = 7;\n return TwoColorTimeline;\n }(CurveTimeline));\n spine.TwoColorTimeline = TwoColorTimeline;\n var AttachmentTimeline = (function () {\n function AttachmentTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.attachmentNames = new Array(frameCount);\n }\n AttachmentTimeline.prototype.getPropertyId = function () {\n return (TimelineType.attachment << 24) + this.slotIndex;\n };\n AttachmentTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\n this.frames[frameIndex] = time;\n this.attachmentNames[frameIndex] = attachmentName;\n };\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == MixDirection.mixOut) {\n if (blend == MixBlend.setup)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n var frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n var frameIndex = 0;\n if (time >= frames[frames.length - 1])\n frameIndex = frames.length - 1;\n else\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\n var attachmentName = this.attachmentNames[frameIndex];\n skeleton.slots[this.slotIndex]\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n };\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);\n };\n return AttachmentTimeline;\n }());\n spine.AttachmentTimeline = AttachmentTimeline;\n var zeros = null;\n var DeformTimeline = (function (_super) {\n __extends(DeformTimeline, _super);\n function DeformTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount);\n _this.frameVertices = new Array(frameCount);\n if (zeros == null)\n zeros = spine.Utils.newFloatArray(64);\n return _this;\n }\n DeformTimeline.prototype.getPropertyId = function () {\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\n };\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\n this.frames[frameIndex] = time;\n this.frameVertices[frameIndex] = vertices;\n };\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var slotAttachment = slot.getAttachment();\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\n return;\n var deformArray = slot.deform;\n if (deformArray.length == 0)\n blend = MixBlend.setup;\n var frameVertices = this.frameVertices;\n var vertexCount = frameVertices[0].length;\n var frames = this.frames;\n if (time < frames[0]) {\n var vertexAttachment = slotAttachment;\n switch (blend) {\n case MixBlend.setup:\n deformArray.length = 0;\n return;\n case MixBlend.first:\n if (alpha == 1) {\n deformArray.length = 0;\n break;\n }\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\n }\n else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform_1[i] *= alpha;\n }\n }\n return;\n }\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\n if (time >= frames[frames.length - 1]) {\n var lastVertices = frameVertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\n }\n }\n else {\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\n deform[i_2] += lastVertices[i_2];\n }\n }\n else {\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup: {\n var vertexAttachment_1 = slotAttachment;\n if (vertexAttachment_1.bones == null) {\n var setupVertices = vertexAttachment_1.vertices;\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\n var setup = setupVertices[i_3];\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\n }\n }\n else {\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\n deform[i_4] = lastVertices[i_4] * alpha;\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\n break;\n case MixBlend.add:\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\n }\n }\n else {\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\n deform[i_7] += lastVertices[i_7] * alpha;\n }\n }\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time);\n var prevVertices = frameVertices[frame - 1];\n var nextVertices = frameVertices[frame];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\n var prev = prevVertices[i_8];\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\n }\n }\n else {\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\n var prev = prevVertices[i_9];\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\n }\n }\n }\n else {\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\n var prev = prevVertices[i_10];\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\n }\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup: {\n var vertexAttachment_2 = slotAttachment;\n if (vertexAttachment_2.bones == null) {\n var setupVertices = vertexAttachment_2.vertices;\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\n }\n }\n else {\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\n var prev = prevVertices[i_12];\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\n var prev = prevVertices[i_13];\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\n }\n break;\n case MixBlend.add:\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\n var prev = prevVertices[i_14];\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\n }\n }\n else {\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\n var prev = prevVertices[i_15];\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\n }\n }\n }\n }\n };\n return DeformTimeline;\n }(CurveTimeline));\n spine.DeformTimeline = DeformTimeline;\n var EventTimeline = (function () {\n function EventTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.events = new Array(frameCount);\n }\n EventTimeline.prototype.getPropertyId = function () {\n return TimelineType.event << 24;\n };\n EventTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\n this.frames[frameIndex] = event.time;\n this.events[frameIndex] = event;\n };\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (firedEvents == null)\n return;\n var frames = this.frames;\n var frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n }\n else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n var frame = 0;\n if (lastTime < frames[0])\n frame = 0;\n else {\n frame = Animation.binarySearch(frames, lastTime);\n var frameTime = frames[frame];\n while (frame > 0) {\n if (frames[frame - 1] != frameTime)\n break;\n frame--;\n }\n }\n for (; frame < frameCount && time >= frames[frame]; frame++)\n firedEvents.push(this.events[frame]);\n };\n return EventTimeline;\n }());\n spine.EventTimeline = EventTimeline;\n var DrawOrderTimeline = (function () {\n function DrawOrderTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.drawOrders = new Array(frameCount);\n }\n DrawOrderTimeline.prototype.getPropertyId = function () {\n return TimelineType.drawOrder << 24;\n };\n DrawOrderTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\n this.frames[frameIndex] = time;\n this.drawOrders[frameIndex] = drawOrder;\n };\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var drawOrder = skeleton.drawOrder;\n var slots = skeleton.slots;\n if (direction == MixDirection.mixOut) {\n if (blend == MixBlend.setup)\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n var frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first)\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n var frame = 0;\n if (time >= frames[frames.length - 1])\n frame = frames.length - 1;\n else\n frame = Animation.binarySearch(frames, time) - 1;\n var drawOrderToSetupIndex = this.drawOrders[frame];\n if (drawOrderToSetupIndex == null)\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\n else {\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n };\n return DrawOrderTimeline;\n }());\n spine.DrawOrderTimeline = DrawOrderTimeline;\n var IkConstraintTimeline = (function (_super) {\n __extends(IkConstraintTimeline, _super);\n function IkConstraintTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\n return _this;\n }\n IkConstraintTimeline.prototype.getPropertyId = function () {\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\n };\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\n frameIndex *= IkConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\n };\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n return;\n case MixBlend.first:\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n return;\n }\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n else {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n else {\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n else {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n else {\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n };\n IkConstraintTimeline.ENTRIES = 6;\n IkConstraintTimeline.PREV_TIME = -6;\n IkConstraintTimeline.PREV_MIX = -5;\n IkConstraintTimeline.PREV_SOFTNESS = -4;\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\n IkConstraintTimeline.PREV_COMPRESS = -2;\n IkConstraintTimeline.PREV_STRETCH = -1;\n IkConstraintTimeline.MIX = 1;\n IkConstraintTimeline.SOFTNESS = 2;\n IkConstraintTimeline.BEND_DIRECTION = 3;\n IkConstraintTimeline.COMPRESS = 4;\n IkConstraintTimeline.STRETCH = 5;\n return IkConstraintTimeline;\n }(CurveTimeline));\n spine.IkConstraintTimeline = IkConstraintTimeline;\n var TransformConstraintTimeline = (function (_super) {\n __extends(TransformConstraintTimeline, _super);\n function TransformConstraintTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\n return _this;\n }\n TransformConstraintTimeline.prototype.getPropertyId = function () {\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\n };\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\n frameIndex *= TransformConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\n };\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n var data = constraint.data;\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\n }\n return;\n }\n var rotate = 0, translate = 0, scale = 0, shear = 0;\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\n var i = frames.length;\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\n }\n if (blend == MixBlend.setup) {\n var data = constraint.data;\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\n }\n else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\n }\n };\n TransformConstraintTimeline.ENTRIES = 5;\n TransformConstraintTimeline.PREV_TIME = -5;\n TransformConstraintTimeline.PREV_ROTATE = -4;\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\n TransformConstraintTimeline.PREV_SCALE = -2;\n TransformConstraintTimeline.PREV_SHEAR = -1;\n TransformConstraintTimeline.ROTATE = 1;\n TransformConstraintTimeline.TRANSLATE = 2;\n TransformConstraintTimeline.SCALE = 3;\n TransformConstraintTimeline.SHEAR = 4;\n return TransformConstraintTimeline;\n }(CurveTimeline));\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\n var PathConstraintPositionTimeline = (function (_super) {\n __extends(PathConstraintPositionTimeline, _super);\n function PathConstraintPositionTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\n return _this;\n }\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\n };\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\n };\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.position = constraint.data.position;\n return;\n case MixBlend.first:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n var position = 0;\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\n }\n if (blend == MixBlend.setup)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n };\n PathConstraintPositionTimeline.ENTRIES = 2;\n PathConstraintPositionTimeline.PREV_TIME = -2;\n PathConstraintPositionTimeline.PREV_VALUE = -1;\n PathConstraintPositionTimeline.VALUE = 1;\n return PathConstraintPositionTimeline;\n }(CurveTimeline));\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\n var PathConstraintSpacingTimeline = (function (_super) {\n __extends(PathConstraintSpacingTimeline, _super);\n function PathConstraintSpacingTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\n };\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.spacing = constraint.data.spacing;\n return;\n case MixBlend.first:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n var spacing = 0;\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\n }\n if (blend == MixBlend.setup)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n };\n return PathConstraintSpacingTimeline;\n }(PathConstraintPositionTimeline));\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\n var PathConstraintMixTimeline = (function (_super) {\n __extends(PathConstraintMixTimeline, _super);\n function PathConstraintMixTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\n return _this;\n }\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\n };\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\n };\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = constraint.data.rotateMix;\n constraint.translateMix = constraint.data.translateMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\n }\n return;\n }\n var rotate = 0, translate = 0;\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\n }\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\n }\n if (blend == MixBlend.setup) {\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\n }\n else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n }\n };\n PathConstraintMixTimeline.ENTRIES = 3;\n PathConstraintMixTimeline.PREV_TIME = -3;\n PathConstraintMixTimeline.PREV_ROTATE = -2;\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\n PathConstraintMixTimeline.ROTATE = 1;\n PathConstraintMixTimeline.TRANSLATE = 2;\n return PathConstraintMixTimeline;\n }(CurveTimeline));\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AnimationState = (function () {\n function AnimationState(data) {\n this.tracks = new Array();\n this.timeScale = 1;\n this.unkeyedState = 0;\n this.events = new Array();\n this.listeners = new Array();\n this.queue = new EventQueue(this);\n this.propertyIDs = new spine.IntSet();\n this.animationsChanged = false;\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\n this.data = data;\n }\n AnimationState.prototype.update = function (delta) {\n delta *= this.timeScale;\n var tracks = this.tracks;\n for (var i = 0, n = tracks.length; i < n; i++) {\n var current = tracks[i];\n if (current == null)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n var currentDelta = delta * current.timeScale;\n if (current.delay > 0) {\n current.delay -= currentDelta;\n if (current.delay > 0)\n continue;\n currentDelta = -current.delay;\n current.delay = 0;\n }\n var next = current.next;\n if (next != null) {\n var nextTime = current.trackLast - next.delay;\n if (nextTime >= 0) {\n next.delay = 0;\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\n current.trackTime += currentDelta;\n this.setCurrent(i, next, true);\n while (next.mixingFrom != null) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n }\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\n tracks[i] = null;\n this.queue.end(current);\n this.disposeNext(current);\n continue;\n }\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\n var from = current.mixingFrom;\n current.mixingFrom = null;\n if (from != null)\n from.mixingTo = null;\n while (from != null) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n };\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\n var from = to.mixingFrom;\n if (from == null)\n return true;\n var finished = this.updateMixingFrom(from, delta);\n from.animationLast = from.nextAnimationLast;\n from.trackLast = from.nextTrackLast;\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\n to.mixingFrom = from.mixingFrom;\n if (from.mixingFrom != null)\n from.mixingFrom.mixingTo = to;\n to.interruptAlpha = from.interruptAlpha;\n this.queue.end(from);\n }\n return finished;\n }\n from.trackTime += delta * from.timeScale;\n to.mixTime += delta;\n return false;\n };\n AnimationState.prototype.apply = function (skeleton) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n var events = this.events;\n var tracks = this.tracks;\n var applied = false;\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\n var current = tracks[i_16];\n if (current == null || current.delay > 0)\n continue;\n applied = true;\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\n var mix = current.alpha;\n if (current.mixingFrom != null)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && current.next == null)\n mix = 0;\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\n var timelineCount = current.animation.timelines.length;\n var timelines = current.animation.timelines;\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\n for (var ii = 0; ii < timelineCount; ii++) {\n spine.Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof spine.AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\n }\n }\n else {\n var timelineMode = current.timelineMode;\n var firstFrame = current.timelinesRotation.length == 0;\n if (firstFrame)\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\n var timelinesRotation = current.timelinesRotation;\n for (var ii = 0; ii < timelineCount; ii++) {\n var timeline_1 = timelines[ii];\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\n if (timeline_1 instanceof spine.RotateTimeline) {\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\n }\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\n }\n else {\n spine.Utils.webkit602BugfixHelper(mix, blend);\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\n }\n }\n }\n this.queueEvents(current, animationTime);\n events.length = 0;\n current.nextAnimationLast = animationTime;\n current.nextTrackLast = current.trackTime;\n }\n var setupState = this.unkeyedState + AnimationState.SETUP;\n var slots = skeleton.slots;\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.attachmentState == setupState) {\n var attachmentName = slot.data.attachmentName;\n slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n };\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\n var from = to.mixingFrom;\n if (from.mixingFrom != null)\n this.applyMixingFrom(from, skeleton, blend);\n var mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == spine.MixBlend.first)\n blend = spine.MixBlend.setup;\n }\n else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != spine.MixBlend.first)\n blend = from.mixBlend;\n }\n var events = mix < from.eventThreshold ? this.events : null;\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\n var timelineCount = from.animation.timelines.length;\n var timelines = from.animation.timelines;\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n if (blend == spine.MixBlend.add) {\n for (var i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\n }\n else {\n var timelineMode = from.timelineMode;\n var timelineHoldMix = from.timelineHoldMix;\n var firstFrame = from.timelinesRotation.length == 0;\n if (firstFrame)\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\n var timelinesRotation = from.timelinesRotation;\n from.totalAlpha = 0;\n for (var i = 0; i < timelineCount; i++) {\n var timeline = timelines[i];\n var direction = spine.MixDirection.mixOut;\n var timelineBlend = void 0;\n var alpha = 0;\n switch (timelineMode[i]) {\n case AnimationState.SUBSEQUENT:\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case AnimationState.FIRST:\n timelineBlend = spine.MixBlend.setup;\n alpha = alphaMix;\n break;\n case AnimationState.HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case AnimationState.HOLD_FIRST:\n timelineBlend = spine.MixBlend.setup;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = spine.MixBlend.setup;\n var holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (timeline instanceof spine.RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof spine.AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\n else {\n spine.Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\n direction = spine.MixDirection.mixIn;\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\n }\n }\n }\n if (to.mixDuration > 0)\n this.queueEvents(from, animationTime);\n this.events.length = 0;\n from.nextAnimationLast = animationTime;\n from.nextTrackLast = from.trackTime;\n return mix;\n };\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = timeline.frames;\n if (time < frames[0]) {\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n }\n else {\n var frameIndex;\n if (time >= frames[frames.length - 1])\n frameIndex = frames.length - 1;\n else\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\n }\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\n };\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);\n if (attachments)\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\n };\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\n if (firstFrame)\n timelinesRotation[i] = 0;\n if (alpha == 1) {\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\n return;\n }\n var rotateTimeline = timeline;\n var frames = rotateTimeline.frames;\n var bone = skeleton.bones[rotateTimeline.boneIndex];\n if (!bone.active)\n return;\n var r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case spine.MixBlend.setup:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case spine.MixBlend.first:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n }\n else {\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\n else {\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\n var frameTime = frames[frame];\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n r2 = prevRotation + r2 * percent + bone.data.rotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n }\n }\n var total = 0, diff = r2 - r1;\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n }\n else {\n var lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n }\n else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n var current = diff > 0, dir = lastTotal >= 0;\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * spine.MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n r1 += total * alpha;\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\n };\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n var duration = animationEnd - animationStart;\n var trackLastWrapped = entry.trackLast % duration;\n var events = this.events;\n var i = 0, n = events.length;\n for (; i < n; i++) {\n var event_1 = events[i];\n if (event_1.time < trackLastWrapped)\n break;\n if (event_1.time > animationEnd)\n continue;\n this.queue.event(entry, event_1);\n }\n var complete = false;\n if (entry.loop)\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\n else\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\n if (complete)\n this.queue.complete(entry);\n for (; i < n; i++) {\n var event_2 = events[i];\n if (event_2.time < animationStart)\n continue;\n this.queue.event(entry, events[i]);\n }\n };\n AnimationState.prototype.clearTracks = function () {\n var oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (var i = 0, n = this.tracks.length; i < n; i++)\n this.clearTrack(i);\n this.tracks.length = 0;\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n };\n AnimationState.prototype.clearTrack = function (trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n var current = this.tracks[trackIndex];\n if (current == null)\n return;\n this.queue.end(current);\n this.disposeNext(current);\n var entry = current;\n while (true) {\n var from = entry.mixingFrom;\n if (from == null)\n break;\n this.queue.end(from);\n entry.mixingFrom = null;\n entry.mixingTo = null;\n entry = from;\n }\n this.tracks[current.trackIndex] = null;\n this.queue.drain();\n };\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\n var from = this.expandToIndex(index);\n this.tracks[index] = current;\n if (from != null) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom != null && from.mixDuration > 0)\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\n from.timelinesRotation.length = 0;\n }\n this.queue.start(current);\n };\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\n var animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n };\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\n if (animation == null)\n throw new Error(\"animation cannot be null.\");\n var interrupt = true;\n var current = this.expandToIndex(trackIndex);\n if (current != null) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.disposeNext(current);\n current = current.mixingFrom;\n interrupt = false;\n }\n else\n this.disposeNext(current);\n }\n var entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n };\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\n var animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n };\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\n if (animation == null)\n throw new Error(\"animation cannot be null.\");\n var last = this.expandToIndex(trackIndex);\n if (last != null) {\n while (last.next != null)\n last = last.next;\n }\n var entry = this.trackEntry(trackIndex, animation, loop, last);\n if (last == null) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n }\n else {\n last.next = entry;\n if (delay <= 0) {\n var duration = last.animationEnd - last.animationStart;\n if (duration != 0) {\n if (last.loop)\n delay += duration * (1 + ((last.trackTime / duration) | 0));\n else\n delay += Math.max(duration, last.trackTime);\n delay -= this.data.getMix(last.animation, animation);\n }\n else\n delay = last.trackTime;\n }\n }\n entry.delay = delay;\n return entry;\n };\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n };\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\n if (delay <= 0)\n delay -= mixDuration;\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n };\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\n var oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (var i = 0, n = this.tracks.length; i < n; i++) {\n var current = this.tracks[i];\n if (current != null)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n };\n AnimationState.prototype.expandToIndex = function (index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n };\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\n var entry = this.trackEntryPool.obtain();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.eventThreshold = 0;\n entry.attachmentThreshold = 0;\n entry.drawOrderThreshold = 0;\n entry.animationStart = 0;\n entry.animationEnd = animation.duration;\n entry.animationLast = -1;\n entry.nextAnimationLast = -1;\n entry.delay = 0;\n entry.trackTime = 0;\n entry.trackLast = -1;\n entry.nextTrackLast = -1;\n entry.trackEnd = Number.MAX_VALUE;\n entry.timeScale = 1;\n entry.alpha = 1;\n entry.interruptAlpha = 1;\n entry.mixTime = 0;\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\n entry.mixBlend = spine.MixBlend.replace;\n return entry;\n };\n AnimationState.prototype.disposeNext = function (entry) {\n var next = entry.next;\n while (next != null) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n };\n AnimationState.prototype._animationsChanged = function () {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n for (var i = 0, n = this.tracks.length; i < n; i++) {\n var entry = this.tracks[i];\n if (entry == null)\n continue;\n while (entry.mixingFrom != null)\n entry = entry.mixingFrom;\n do {\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry != null);\n }\n };\n AnimationState.prototype.computeHold = function (entry) {\n var to = entry.mixingTo;\n var timelines = entry.animation.timelines;\n var timelinesCount = entry.animation.timelines.length;\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\n entry.timelineHoldMix.length = 0;\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\n var propertyIDs = this.propertyIDs;\n if (to != null && to.holdPrevious) {\n for (var i = 0; i < timelinesCount; i++) {\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\n }\n return;\n }\n outer: for (var i = 0; i < timelinesCount; i++) {\n var timeline = timelines[i];\n var id = timeline.getPropertyId();\n if (!propertyIDs.add(id))\n timelineMode[i] = AnimationState.SUBSEQUENT;\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\n timelineMode[i] = AnimationState.FIRST;\n }\n else {\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\n if (next.animation.hasTimeline(id))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = AnimationState.HOLD_MIX;\n timelineDipMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = AnimationState.HOLD_FIRST;\n }\n }\n };\n AnimationState.prototype.getCurrent = function (trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n };\n AnimationState.prototype.addListener = function (listener) {\n if (listener == null)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n };\n AnimationState.prototype.removeListener = function (listener) {\n var index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n };\n AnimationState.prototype.clearListeners = function () {\n this.listeners.length = 0;\n };\n AnimationState.prototype.clearListenerNotifications = function () {\n this.queue.clear();\n };\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\n AnimationState.SUBSEQUENT = 0;\n AnimationState.FIRST = 1;\n AnimationState.HOLD_SUBSEQUENT = 2;\n AnimationState.HOLD_FIRST = 3;\n AnimationState.HOLD_MIX = 4;\n AnimationState.SETUP = 1;\n AnimationState.CURRENT = 2;\n return AnimationState;\n }());\n spine.AnimationState = AnimationState;\n var TrackEntry = (function () {\n function TrackEntry() {\n this.mixBlend = spine.MixBlend.replace;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n TrackEntry.prototype.reset = function () {\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.animation = null;\n this.listener = null;\n this.timelineMode.length = 0;\n this.timelineHoldMix.length = 0;\n this.timelinesRotation.length = 0;\n };\n TrackEntry.prototype.getAnimationTime = function () {\n if (this.loop) {\n var duration = this.animationEnd - this.animationStart;\n if (duration == 0)\n return this.animationStart;\n return (this.trackTime % duration) + this.animationStart;\n }\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\n };\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n };\n TrackEntry.prototype.isComplete = function () {\n return this.trackTime >= this.animationEnd - this.animationStart;\n };\n TrackEntry.prototype.resetRotationDirections = function () {\n this.timelinesRotation.length = 0;\n };\n return TrackEntry;\n }());\n spine.TrackEntry = TrackEntry;\n var EventQueue = (function () {\n function EventQueue(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n EventQueue.prototype.start = function (entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n };\n EventQueue.prototype.interrupt = function (entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n };\n EventQueue.prototype.end = function (entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n };\n EventQueue.prototype.dispose = function (entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n };\n EventQueue.prototype.complete = function (entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n };\n EventQueue.prototype.event = function (entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n };\n EventQueue.prototype.drain = function () {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n var objects = this.objects;\n var listeners = this.animState.listeners;\n for (var i = 0; i < objects.length; i += 2) {\n var type = objects[i];\n var entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener != null && entry.listener.start)\n entry.listener.start(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].start)\n listeners[ii].start(entry);\n break;\n case EventType.interrupt:\n if (entry.listener != null && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].interrupt)\n listeners[ii].interrupt(entry);\n break;\n case EventType.end:\n if (entry.listener != null && entry.listener.end)\n entry.listener.end(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].end)\n listeners[ii].end(entry);\n case EventType.dispose:\n if (entry.listener != null && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].dispose)\n listeners[ii].dispose(entry);\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener != null && entry.listener.complete)\n entry.listener.complete(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].complete)\n listeners[ii].complete(entry);\n break;\n case EventType.event:\n var event_3 = objects[i++ + 2];\n if (entry.listener != null && entry.listener.event)\n entry.listener.event(entry, event_3);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].event)\n listeners[ii].event(entry, event_3);\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n };\n EventQueue.prototype.clear = function () {\n this.objects.length = 0;\n };\n return EventQueue;\n }());\n spine.EventQueue = EventQueue;\n var EventType;\n (function (EventType) {\n EventType[EventType[\"start\"] = 0] = \"start\";\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\n EventType[EventType[\"end\"] = 2] = \"end\";\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\n EventType[EventType[\"complete\"] = 4] = \"complete\";\n EventType[EventType[\"event\"] = 5] = \"event\";\n })(EventType = spine.EventType || (spine.EventType = {}));\n var AnimationStateAdapter = (function () {\n function AnimationStateAdapter() {\n }\n AnimationStateAdapter.prototype.start = function (entry) {\n };\n AnimationStateAdapter.prototype.interrupt = function (entry) {\n };\n AnimationStateAdapter.prototype.end = function (entry) {\n };\n AnimationStateAdapter.prototype.dispose = function (entry) {\n };\n AnimationStateAdapter.prototype.complete = function (entry) {\n };\n AnimationStateAdapter.prototype.event = function (entry, event) {\n };\n return AnimationStateAdapter;\n }());\n spine.AnimationStateAdapter = AnimationStateAdapter;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AnimationStateData = (function () {\n function AnimationStateData(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (skeletonData == null)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\n var from = this.skeletonData.findAnimation(fromName);\n if (from == null)\n throw new Error(\"Animation not found: \" + fromName);\n var to = this.skeletonData.findAnimation(toName);\n if (to == null)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n };\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\n if (from == null)\n throw new Error(\"from cannot be null.\");\n if (to == null)\n throw new Error(\"to cannot be null.\");\n var key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n };\n AnimationStateData.prototype.getMix = function (from, to) {\n var key = from.name + \".\" + to.name;\n var value = this.animationToMixTime[key];\n return value === undefined ? this.defaultMix : value;\n };\n return AnimationStateData;\n }());\n spine.AnimationStateData = AnimationStateData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AssetManager = (function () {\n function AssetManager(textureLoader, pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.rawDataUris = {};\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n }\n AssetManager.prototype.downloadText = function (url, success, error) {\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n if (this.rawDataUris[url])\n url = this.rawDataUris[url];\n request.open(\"GET\", url, true);\n request.onload = function () {\n if (request.status == 200) {\n success(request.responseText);\n }\n else {\n error(request.status, request.responseText);\n }\n };\n request.onerror = function () {\n error(request.status, request.responseText);\n };\n request.send();\n };\n AssetManager.prototype.downloadBinary = function (url, success, error) {\n var request = new XMLHttpRequest();\n if (this.rawDataUris[url])\n url = this.rawDataUris[url];\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n request.onload = function () {\n if (request.status == 200) {\n success(new Uint8Array(request.response));\n }\n else {\n error(request.status, request.responseText);\n }\n };\n request.onerror = function () {\n error(request.status, request.responseText);\n };\n request.send();\n };\n AssetManager.prototype.setRawDataURI = function (path, data) {\n this.rawDataUris[this.pathPrefix + path] = data;\n };\n AssetManager.prototype.loadBinary = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadBinary(path, function (data) {\n _this.assets[path] = data;\n if (success)\n success(path, data);\n _this.toLoad--;\n _this.loaded++;\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.loadText = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadText(path, function (data) {\n _this.assets[path] = data;\n if (success)\n success(path, data);\n _this.toLoad--;\n _this.loaded++;\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.loadTexture = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n var storagePath = path;\n this.toLoad++;\n var img = new Image();\n img.crossOrigin = \"anonymous\";\n img.onload = function (ev) {\n var texture = _this.textureLoader(img);\n _this.assets[storagePath] = texture;\n _this.toLoad--;\n _this.loaded++;\n if (success)\n success(path, img);\n };\n img.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \" + path;\n _this.toLoad--;\n _this.loaded++;\n if (error)\n error(path, \"Couldn't load image \" + path);\n };\n if (this.rawDataUris[path])\n path = this.rawDataUris[path];\n img.src = path;\n };\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadText(path, function (atlasData) {\n var pagesLoaded = { count: 0 };\n var atlasPages = new Array();\n try {\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\n var image = document.createElement(\"img\");\n image.width = 16;\n image.height = 16;\n return new spine.FakeTexture(image);\n });\n }\n catch (e) {\n var ex = e;\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\n _this.toLoad--;\n _this.loaded++;\n return;\n }\n var _loop_1 = function (atlasPage) {\n var pageLoadError = false;\n _this.loadTexture(atlasPage, function (imagePath, image) {\n pagesLoaded.count++;\n if (pagesLoaded.count == atlasPages.length) {\n if (!pageLoadError) {\n try {\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\n });\n _this.assets[path] = atlas;\n if (success)\n success(path, atlas);\n _this.toLoad--;\n _this.loaded++;\n }\n catch (e) {\n var ex = e;\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\n _this.toLoad--;\n _this.loaded++;\n }\n }\n else {\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\n if (error)\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\n _this.toLoad--;\n _this.loaded++;\n }\n }\n }, function (imagePath, errorMessage) {\n pageLoadError = true;\n pagesLoaded.count++;\n if (pagesLoaded.count == atlasPages.length) {\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\n if (error)\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\n _this.toLoad--;\n _this.loaded++;\n }\n });\n };\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\n var atlasPage = atlasPages_1[_i];\n _loop_1(atlasPage);\n }\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.get = function (path) {\n path = this.pathPrefix + path;\n return this.assets[path];\n };\n AssetManager.prototype.remove = function (path) {\n path = this.pathPrefix + path;\n var asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n this.assets[path] = null;\n };\n AssetManager.prototype.removeAll = function () {\n for (var key in this.assets) {\n var asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n };\n AssetManager.prototype.isLoadingComplete = function () {\n return this.toLoad == 0;\n };\n AssetManager.prototype.getToLoad = function () {\n return this.toLoad;\n };\n AssetManager.prototype.getLoaded = function () {\n return this.loaded;\n };\n AssetManager.prototype.dispose = function () {\n this.removeAll();\n };\n AssetManager.prototype.hasErrors = function () {\n return Object.keys(this.errors).length > 0;\n };\n AssetManager.prototype.getErrors = function () {\n return this.errors;\n };\n return AssetManager;\n }());\n spine.AssetManager = AssetManager;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AtlasAttachmentLoader = (function () {\n function AtlasAttachmentLoader(atlas) {\n this.atlas = atlas;\n }\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\n var region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n var attachment = new spine.RegionAttachment(name);\n attachment.setRegion(region);\n return attachment;\n };\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\n var region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n var attachment = new spine.MeshAttachment(name);\n attachment.region = region;\n return attachment;\n };\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\n return new spine.BoundingBoxAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\n return new spine.PathAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\n return new spine.PointAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\n return new spine.ClippingAttachment(name);\n };\n return AtlasAttachmentLoader;\n }());\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BlendMode;\n (function (BlendMode) {\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Bone = (function () {\n function Bone(data, skeleton, parent) {\n this.children = new Array();\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.scaleX = 0;\n this.scaleY = 0;\n this.shearX = 0;\n this.shearY = 0;\n this.ax = 0;\n this.ay = 0;\n this.arotation = 0;\n this.ascaleX = 0;\n this.ascaleY = 0;\n this.ashearX = 0;\n this.ashearY = 0;\n this.appliedValid = false;\n this.a = 0;\n this.b = 0;\n this.c = 0;\n this.d = 0;\n this.worldY = 0;\n this.worldX = 0;\n this.sorted = false;\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.skeleton = skeleton;\n this.parent = parent;\n this.setToSetupPose();\n }\n Bone.prototype.isActive = function () {\n return this.active;\n };\n Bone.prototype.update = function () {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n };\n Bone.prototype.updateWorldTransform = function () {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n };\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\n this.ax = x;\n this.ay = y;\n this.arotation = rotation;\n this.ascaleX = scaleX;\n this.ascaleY = scaleY;\n this.ashearX = shearX;\n this.ashearY = shearY;\n this.appliedValid = true;\n var parent = this.parent;\n if (parent == null) {\n var skeleton = this.skeleton;\n var rotationY = rotation + 90 + shearY;\n var sx = skeleton.scaleX;\n var sy = skeleton.scaleY;\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n this.worldX = pa * x + pb * y + parent.worldX;\n this.worldY = pc * x + pd * y + parent.worldY;\n switch (this.data.transformMode) {\n case spine.TransformMode.Normal: {\n var rotationY = rotation + 90 + shearY;\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\n this.a = pa * la + pb * lc;\n this.b = pa * lb + pb * ld;\n this.c = pc * la + pd * lc;\n this.d = pc * lb + pd * ld;\n return;\n }\n case spine.TransformMode.OnlyTranslation: {\n var rotationY = rotation + 90 + shearY;\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case spine.TransformMode.NoRotationOrReflection: {\n var s = pa * pa + pc * pc;\n var prx = 0;\n if (s > 0.0001) {\n s = Math.abs(pa * pd - pb * pc) / s;\n pa /= this.skeleton.scaleX;\n pc /= this.skeleton.scaleY;\n pb = pc * s;\n pd = pa * s;\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\n }\n else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\n }\n var rx = rotation + shearX - prx;\n var ry = rotation + shearY - prx + 90;\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\n this.a = pa * la - pb * lc;\n this.b = pa * lb - pb * ld;\n this.c = pc * la + pd * lc;\n this.d = pc * lb + pd * ld;\n break;\n }\n case spine.TransformMode.NoScale:\n case spine.TransformMode.NoScaleOrReflection: {\n var cos = spine.MathUtils.cosDeg(rotation);\n var sin = spine.MathUtils.sinDeg(rotation);\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n var s = Math.sqrt(za * za + zc * zc);\n if (s > 0.00001)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == spine.TransformMode.NoScale\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n var r = Math.PI / 2 + Math.atan2(zc, za);\n var zb = Math.cos(r) * s;\n var zd = Math.sin(r) * s;\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\n this.a = za * la + zb * lc;\n this.b = za * lb + zb * ld;\n this.c = zc * la + zd * lc;\n this.d = zc * lb + zd * ld;\n break;\n }\n }\n this.a *= this.skeleton.scaleX;\n this.b *= this.skeleton.scaleX;\n this.c *= this.skeleton.scaleY;\n this.d *= this.skeleton.scaleY;\n };\n Bone.prototype.setToSetupPose = function () {\n var data = this.data;\n this.x = data.x;\n this.y = data.y;\n this.rotation = data.rotation;\n this.scaleX = data.scaleX;\n this.scaleY = data.scaleY;\n this.shearX = data.shearX;\n this.shearY = data.shearY;\n };\n Bone.prototype.getWorldRotationX = function () {\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\n };\n Bone.prototype.getWorldRotationY = function () {\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\n };\n Bone.prototype.getWorldScaleX = function () {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n };\n Bone.prototype.getWorldScaleY = function () {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n };\n Bone.prototype.updateAppliedTransform = function () {\n this.appliedValid = true;\n var parent = this.parent;\n if (parent == null) {\n this.ax = this.worldX;\n this.ay = this.worldY;\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\n this.ashearX = 0;\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\n return;\n }\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n var pid = 1 / (pa * pd - pb * pc);\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\n this.ax = (dx * pd * pid - dy * pb * pid);\n this.ay = (dy * pa * pid - dx * pc * pid);\n var ia = pid * pd;\n var id = pid * pa;\n var ib = pid * pb;\n var ic = pid * pc;\n var ra = ia * this.a - ib * this.c;\n var rb = ia * this.b - ib * this.d;\n var rc = id * this.c - ic * this.a;\n var rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 0.0001) {\n var det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\n }\n else {\n this.ascaleX = 0;\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\n this.ashearY = 0;\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\n }\n };\n Bone.prototype.worldToLocal = function (world) {\n var a = this.a, b = this.b, c = this.c, d = this.d;\n var invDet = 1 / (a * d - b * c);\n var x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = (x * d * invDet - y * b * invDet);\n world.y = (y * a * invDet - x * c * invDet);\n return world;\n };\n Bone.prototype.localToWorld = function (local) {\n var x = local.x, y = local.y;\n local.x = x * this.a + y * this.b + this.worldX;\n local.y = x * this.c + y * this.d + this.worldY;\n return local;\n };\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\n };\n Bone.prototype.localToWorldRotation = function (localRotation) {\n localRotation -= this.rotation - this.shearX;\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\n };\n Bone.prototype.rotateWorld = function (degrees) {\n var a = this.a, b = this.b, c = this.c, d = this.d;\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\n this.a = cos * a - sin * c;\n this.b = cos * b - sin * d;\n this.c = sin * a + cos * c;\n this.d = sin * b + cos * d;\n this.appliedValid = false;\n };\n return Bone;\n }());\n spine.Bone = Bone;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BoneData = (function () {\n function BoneData(index, name, parent) {\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.scaleX = 1;\n this.scaleY = 1;\n this.shearX = 0;\n this.shearY = 0;\n this.transformMode = TransformMode.Normal;\n this.skinRequired = false;\n this.color = new spine.Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n return BoneData;\n }());\n spine.BoneData = BoneData;\n var TransformMode;\n (function (TransformMode) {\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var ConstraintData = (function () {\n function ConstraintData(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n return ConstraintData;\n }());\n spine.ConstraintData = ConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Event = (function () {\n function Event(time, data) {\n if (data == null)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n return Event;\n }());\n spine.Event = Event;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var EventData = (function () {\n function EventData(name) {\n this.name = name;\n }\n return EventData;\n }());\n spine.EventData = EventData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IkConstraint = (function () {\n function IkConstraint(data, skeleton) {\n this.bendDirection = 0;\n this.compress = false;\n this.stretch = false;\n this.mix = 1;\n this.softness = 0;\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mix = data.mix;\n this.softness = data.softness;\n this.bendDirection = data.bendDirection;\n this.compress = data.compress;\n this.stretch = data.stretch;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n IkConstraint.prototype.isActive = function () {\n return this.active;\n };\n IkConstraint.prototype.apply = function () {\n this.update();\n };\n IkConstraint.prototype.update = function () {\n var target = this.target;\n var bones = this.bones;\n switch (bones.length) {\n case 1:\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\n break;\n case 2:\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\n break;\n }\n };\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var p = bone.parent;\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case spine.TransformMode.OnlyTranslation:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case spine.TransformMode.NoRotationOrReflection:\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n var sa = pa / bone.skeleton.scaleX;\n var sc = pc / bone.skeleton.scaleY;\n pb = -sc * s * bone.skeleton.scaleX;\n pd = sa * s * bone.skeleton.scaleY;\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\n default:\n var x = targetX - p.worldX, y = targetY - p.worldY;\n var d = pa * pd - pb * pc;\n tx = (x * pd - y * pb) / d - bone.ax;\n ty = (y * pa - x * pc) / d - bone.ay;\n }\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\n if (bone.ascaleX < 0)\n rotationIK += 180;\n if (rotationIK > 180)\n rotationIK -= 360;\n else if (rotationIK < -180)\n rotationIK += 360;\n var sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case spine.TransformMode.NoScale:\n case spine.TransformMode.NoScaleOrReflection:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\n var s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\n };\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\n if (alpha == 0) {\n child.updateWorldTransform();\n return;\n }\n if (!parent.appliedValid)\n parent.updateAppliedTransform();\n if (!child.appliedValid)\n child.updateAppliedTransform();\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\n var os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\n }\n else {\n os1 = 0;\n s2 = 1;\n }\n if (psy < 0) {\n psy = -psy;\n s2 = -s2;\n }\n if (csx < 0) {\n csx = -csx;\n os2 = 180;\n }\n else\n os2 = 0;\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n var u = Math.abs(psx - psy) <= 0.0001;\n if (!u) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n }\n else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n var pp = parent.parent;\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 0.0001) {\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n return;\n }\n x = targetX - pp.worldX;\n y = targetY - pp.worldY;\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n var dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) / 2;\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n var p = Math.min(1, sd / (softness * 2)) - 1;\n p = (sd - softness * (1 - p * p)) / td;\n tx -= p * tx;\n ty -= p * ty;\n dd = tx * tx + ty * ty;\n }\n }\n outer: if (u) {\n l2 *= psx;\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1)\n cos = -1;\n else if (cos > 1) {\n cos = 1;\n if (stretch)\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n }\n a2 = Math.acos(cos) * bendDir;\n a = l1 + l2 * cos;\n b = l2 * Math.sin(a2);\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\n }\n else {\n a = psx * l2;\n b = psy * l2;\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n var c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n var q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) / 2;\n var r0 = q / c2, r1 = c / q;\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\n if (r * r <= dd) {\n y = Math.sqrt(dd - r * r) * bendDir;\n a1 = ta - Math.atan2(y, r);\n a2 = Math.atan2(y / psy, (r - l1) / psx);\n break outer;\n }\n }\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\n c = -a * l1 / (aa - bb);\n if (c >= -1 && c <= 1) {\n c = Math.acos(c);\n x = a * Math.cos(c) + l1;\n y = b * Math.sin(c);\n d = x * x + y * y;\n if (d < minDist) {\n minAngle = c;\n minDist = d;\n minX = x;\n minY = y;\n }\n if (d > maxDist) {\n maxAngle = c;\n maxDist = d;\n maxX = x;\n maxY = y;\n }\n }\n if (dd <= (minDist + maxDist) / 2) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n }\n else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n var os = Math.atan2(cy, cx) * s2;\n var rotation = parent.arotation;\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\n if (a1 > 180)\n a1 -= 360;\n else if (a1 < -180)\n a1 += 360;\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\n if (a2 > 180)\n a2 -= 360;\n else if (a2 < -180)\n a2 += 360;\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n };\n return IkConstraint;\n }());\n spine.IkConstraint = IkConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IkConstraintData = (function (_super) {\n __extends(IkConstraintData, _super);\n function IkConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n _this.bendDirection = 1;\n _this.compress = false;\n _this.stretch = false;\n _this.uniform = false;\n _this.mix = 1;\n _this.softness = 0;\n return _this;\n }\n return IkConstraintData;\n }(spine.ConstraintData));\n spine.IkConstraintData = IkConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathConstraint = (function () {\n function PathConstraint(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.rotateMix = 0;\n this.translateMix = 0;\n this.spaces = new Array();\n this.positions = new Array();\n this.world = new Array();\n this.curves = new Array();\n this.lengths = new Array();\n this.segments = new Array();\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (var i = 0, n = data.bones.length; i < n; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findSlot(data.target.name);\n this.position = data.position;\n this.spacing = data.spacing;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n }\n PathConstraint.prototype.isActive = function () {\n return this.active;\n };\n PathConstraint.prototype.apply = function () {\n this.update();\n };\n PathConstraint.prototype.update = function () {\n var attachment = this.target.getAttachment();\n if (!(attachment instanceof spine.PathAttachment))\n return;\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\n var translate = translateMix > 0, rotate = rotateMix > 0;\n if (!translate && !rotate)\n return;\n var data = this.data;\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\n var rotateMode = data.rotateMode;\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n var bones = this.bones;\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\n var spacing = this.spacing;\n if (scale || !percentSpacing) {\n if (scale)\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\n for (var i = 0, n = spacesCount - 1; i < n;) {\n var bone = bones[i];\n var setupLength = bone.data.length;\n if (setupLength < PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = 0;\n }\n else if (percentSpacing) {\n if (scale) {\n var x = setupLength * bone.a, y = setupLength * bone.c;\n var length_1 = Math.sqrt(x * x + y * y);\n lengths[i] = length_1;\n }\n spaces[++i] = spacing;\n }\n else {\n var x = setupLength * bone.a, y = setupLength * bone.c;\n var length_2 = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length_2;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\n }\n }\n }\n else {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] = spacing;\n }\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n var tip = false;\n if (offsetRotation == 0)\n tip = rotateMode == spine.RotateMode.Chain;\n else {\n tip = false;\n var p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n }\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\n var bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * translateMix;\n bone.worldY += (boneY - bone.worldY) * translateMix;\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n var length_3 = lengths[i];\n if (length_3 != 0) {\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (rotate) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\n if (tangents)\n r = positions[p - 1];\n else if (spaces[i + 1] == 0)\n r = positions[p + 2];\n else\n r = Math.atan2(dy, dx);\n r -= Math.atan2(c, a);\n if (tip) {\n cos = Math.cos(r);\n sin = Math.sin(r);\n var length_4 = bone.data.length;\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\n }\n else {\n r += offsetRotation;\n }\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n cos = Math.cos(r);\n sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n }\n bone.appliedValid = false;\n }\n };\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\n var target = this.target;\n var position = this.position;\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\n var closed = path.closed;\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\n if (!path.constantSpeed) {\n var lengths = path.lengths;\n curveCount -= closed ? 1 : 2;\n var pathLength_1 = lengths[curveCount];\n if (percentPosition)\n position *= pathLength_1;\n if (percentSpacing) {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] *= pathLength_1;\n }\n world = spine.Utils.setArraySize(this.world, 8);\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n var space = spaces[i];\n position += space;\n var p = position;\n if (closed) {\n p %= pathLength_1;\n if (p < 0)\n p += pathLength_1;\n curve = 0;\n }\n else if (p < 0) {\n if (prevCurve != PathConstraint.BEFORE) {\n prevCurve = PathConstraint.BEFORE;\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\n }\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n }\n else if (p > pathLength_1) {\n if (prevCurve != PathConstraint.AFTER) {\n prevCurve = PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\n continue;\n }\n for (;; curve++) {\n var length_5 = lengths[curve];\n if (p > length_5)\n continue;\n if (curve == 0)\n p /= length_5;\n else {\n var prev = lengths[curve - 1];\n p = (p - prev) / (length_5 - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n }\n else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n }\n if (closed) {\n verticesLength += 2;\n world = spine.Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\n world[verticesLength - 2] = world[0];\n world[verticesLength - 1] = world[1];\n }\n else {\n curveCount--;\n verticesLength -= 4;\n world = spine.Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\n var pathLength = 0;\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\n cx1 = world[w];\n cy1 = world[w + 1];\n cx2 = world[w + 2];\n cy2 = world[w + 3];\n x2 = world[w + 4];\n y2 = world[w + 5];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n curves[i] = pathLength;\n x1 = x2;\n y1 = y2;\n }\n if (percentPosition)\n position *= pathLength;\n else\n position *= pathLength / path.lengths[curveCount - 1];\n if (percentSpacing) {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n var segments = this.segments;\n var curveLength = 0;\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n var space = spaces[i];\n position += space;\n var p = position;\n if (closed) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n }\n else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n }\n else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (;; curve++) {\n var length_6 = curves[curve];\n if (p > length_6)\n continue;\n if (curve == 0)\n p /= length_6;\n else {\n var prev = curves[curve - 1];\n p = (p - prev) / (length_6 - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n var ii = curve * 6;\n x1 = world[ii];\n y1 = world[ii + 1];\n cx1 = world[ii + 2];\n cy1 = world[ii + 3];\n cx2 = world[ii + 4];\n cy2 = world[ii + 5];\n x2 = world[ii + 6];\n y2 = world[ii + 7];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\n segments[0] = curveLength;\n for (ii = 1; ii < 8; ii++) {\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[ii] = curveLength;\n }\n dfx += ddfx;\n dfy += ddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[8] = curveLength;\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[9] = curveLength;\n segment = 0;\n }\n p *= curveLength;\n for (;; segment++) {\n var length_7 = segments[segment];\n if (p > length_7)\n continue;\n if (segment == 0)\n p /= length_7;\n else {\n var prev = segments[segment - 1];\n p = segment + (p - prev) / (length_7 - prev);\n }\n break;\n }\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n };\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n };\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n };\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\n if (p == 0 || isNaN(p)) {\n out[o] = x1;\n out[o + 1] = y1;\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\n return;\n }\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\n out[o] = x;\n out[o + 1] = y;\n if (tangents) {\n if (p < 0.001)\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\n else\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\n }\n };\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 0.00001;\n return PathConstraint;\n }());\n spine.PathConstraint = PathConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathConstraintData = (function (_super) {\n __extends(PathConstraintData, _super);\n function PathConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n return _this;\n }\n return PathConstraintData;\n }(spine.ConstraintData));\n spine.PathConstraintData = PathConstraintData;\n var PositionMode;\n (function (PositionMode) {\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\n var SpacingMode;\n (function (SpacingMode) {\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\n var RotateMode;\n (function (RotateMode) {\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Assets = (function () {\n function Assets(clientId) {\n this.toLoad = new Array();\n this.assets = {};\n this.clientId = clientId;\n }\n Assets.prototype.loaded = function () {\n var i = 0;\n for (var v in this.assets)\n i++;\n return i;\n };\n return Assets;\n }());\n var SharedAssetManager = (function () {\n function SharedAssetManager(pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n this.clientAssets = {};\n this.queuedAssets = {};\n this.rawAssets = {};\n this.errors = {};\n this.pathPrefix = pathPrefix;\n }\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined) {\n clientAssets = new Assets(clientId);\n this.clientAssets[clientId] = clientAssets;\n }\n if (textureLoader !== null)\n clientAssets.textureLoader = textureLoader;\n clientAssets.toLoad.push(path);\n if (this.queuedAssets[path] === path) {\n return false;\n }\n else {\n this.queuedAssets[path] = path;\n return true;\n }\n };\n SharedAssetManager.prototype.loadText = function (clientId, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, null, path))\n return;\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.onreadystatechange = function () {\n if (request.readyState == XMLHttpRequest.DONE) {\n if (request.status >= 200 && request.status < 300) {\n _this.rawAssets[path] = request.responseText;\n }\n else {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\n }\n }\n };\n request.open(\"GET\", path, true);\n request.send();\n };\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, null, path))\n return;\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.onreadystatechange = function () {\n if (request.readyState == XMLHttpRequest.DONE) {\n if (request.status >= 200 && request.status < 300) {\n _this.rawAssets[path] = JSON.parse(request.responseText);\n }\n else {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\n }\n }\n };\n request.open(\"GET\", path, true);\n request.send();\n };\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, textureLoader, path))\n return;\n var img = new Image();\n img.crossOrigin = \"anonymous\";\n img.onload = function (ev) {\n _this.rawAssets[path] = img;\n };\n img.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \" + path;\n };\n img.src = path;\n };\n SharedAssetManager.prototype.get = function (clientId, path) {\n path = this.pathPrefix + path;\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined)\n return true;\n return clientAssets.assets[path];\n };\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\n var path = clientAssets.toLoad[i];\n var asset = clientAssets.assets[path];\n if (asset === null || asset === undefined) {\n var rawAsset = this.rawAssets[path];\n if (rawAsset === null || rawAsset === undefined)\n continue;\n if (rawAsset instanceof HTMLImageElement) {\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\n }\n else {\n clientAssets.assets[path] = rawAsset;\n }\n }\n }\n };\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined)\n return true;\n this.updateClientAssets(clientAssets);\n return clientAssets.toLoad.length == clientAssets.loaded();\n };\n SharedAssetManager.prototype.dispose = function () {\n };\n SharedAssetManager.prototype.hasErrors = function () {\n return Object.keys(this.errors).length > 0;\n };\n SharedAssetManager.prototype.getErrors = function () {\n return this.errors;\n };\n return SharedAssetManager;\n }());\n spine.SharedAssetManager = SharedAssetManager;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Skeleton = (function () {\n function Skeleton(data) {\n this._updateCache = new Array();\n this.updateCacheReset = new Array();\n this.time = 0;\n this.scaleX = 1;\n this.scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++) {\n var boneData = data.bones[i];\n var bone = void 0;\n if (boneData.parent == null)\n bone = new spine.Bone(boneData, this, null);\n else {\n var parent_1 = this.bones[boneData.parent.index];\n bone = new spine.Bone(boneData, this, parent_1);\n parent_1.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (var i = 0; i < data.slots.length; i++) {\n var slotData = data.slots[i];\n var bone = this.bones[slotData.boneData.index];\n var slot = new spine.Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (var i = 0; i < data.ikConstraints.length; i++) {\n var ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (var i = 0; i < data.transformConstraints.length; i++) {\n var transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (var i = 0; i < data.pathConstraints.length; i++) {\n var pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\n }\n this.color = new spine.Color(1, 1, 1, 1);\n this.updateCache();\n }\n Skeleton.prototype.updateCache = function () {\n var updateCache = this._updateCache;\n updateCache.length = 0;\n this.updateCacheReset.length = 0;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin != null) {\n var skinBones = this.skin.bones;\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\n var bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone != null);\n }\n }\n var ikConstraints = this.ikConstraints;\n var transformConstraints = this.transformConstraints;\n var pathConstraints = this.pathConstraints;\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n var constraintCount = ikCount + transformCount + pathCount;\n outer: for (var i = 0; i < constraintCount; i++) {\n for (var ii = 0; ii < ikCount; ii++) {\n var constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (var ii = 0; ii < transformCount; ii++) {\n var constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (var ii = 0; ii < pathCount; ii++) {\n var constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (var i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n };\n Skeleton.prototype.sortIkConstraint = function (constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n var target = constraint.target;\n this.sortBone(target);\n var constrained = constraint.bones;\n var parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length > 1) {\n var child = constrained[constrained.length - 1];\n if (!(this._updateCache.indexOf(child) > -1))\n this.updateCacheReset.push(child);\n }\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n constrained[constrained.length - 1].sorted = true;\n };\n Skeleton.prototype.sortPathConstraint = function (constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n var slot = constraint.target;\n var slotIndex = slot.data.index;\n var slotBone = slot.bone;\n if (this.skin != null)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (var i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n var constrained = constraint.bones;\n var boneCount = constrained.length;\n for (var i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (var i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (var i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n };\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n var constrained = constraint.bones;\n var boneCount = constrained.length;\n if (constraint.data.local) {\n for (var i = 0; i < boneCount; i++) {\n var child = constrained[i];\n this.sortBone(child.parent);\n if (!(this._updateCache.indexOf(child) > -1))\n this.updateCacheReset.push(child);\n }\n }\n else {\n for (var i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (var ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (var ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n };\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\n var attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (var key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n };\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\n if (!(attachment instanceof spine.PathAttachment))\n return;\n var pathBones = attachment.bones;\n if (pathBones == null)\n this.sortBone(slotBone);\n else {\n var bones = this.bones;\n var i = 0;\n while (i < pathBones.length) {\n var boneCount = pathBones[i++];\n for (var n = i + boneCount; i < n; i++) {\n var boneIndex = pathBones[i];\n this.sortBone(bones[boneIndex]);\n }\n }\n }\n };\n Skeleton.prototype.sortBone = function (bone) {\n if (bone.sorted)\n return;\n var parent = bone.parent;\n if (parent != null)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n };\n Skeleton.prototype.sortReset = function (bones) {\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.active)\n continue;\n if (bone.sorted)\n this.sortReset(bone.children);\n bone.sorted = false;\n }\n };\n Skeleton.prototype.updateWorldTransform = function () {\n var updateCacheReset = this.updateCacheReset;\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\n var bone = updateCacheReset[i];\n bone.ax = bone.x;\n bone.ay = bone.y;\n bone.arotation = bone.rotation;\n bone.ascaleX = bone.scaleX;\n bone.ascaleY = bone.scaleY;\n bone.ashearX = bone.shearX;\n bone.ashearY = bone.shearY;\n bone.appliedValid = true;\n }\n var updateCache = this._updateCache;\n for (var i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n };\n Skeleton.prototype.setToSetupPose = function () {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n };\n Skeleton.prototype.setBonesToSetupPose = function () {\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var constraint = ikConstraints[i];\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n var data = constraint.data;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n }\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n var data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n }\n };\n Skeleton.prototype.setSlotsToSetupPose = function () {\n var slots = this.slots;\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (var i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n };\n Skeleton.prototype.getRootBone = function () {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n };\n Skeleton.prototype.findBone = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n };\n Skeleton.prototype.findBoneIndex = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n if (bones[i].data.name == boneName)\n return i;\n return -1;\n };\n Skeleton.prototype.findSlot = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n };\n Skeleton.prototype.findSlotIndex = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++)\n if (slots[i].data.name == slotName)\n return i;\n return -1;\n };\n Skeleton.prototype.setSkinByName = function (skinName) {\n var skin = this.data.findSkin(skinName);\n if (skin == null)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n };\n Skeleton.prototype.setSkin = function (newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin != null) {\n if (this.skin != null)\n newSkin.attachAll(this, this.skin);\n else {\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var name_1 = slot.data.attachmentName;\n if (name_1 != null) {\n var attachment = newSkin.getAttachment(i, name_1);\n if (attachment != null)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n };\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\n };\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\n if (attachmentName == null)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin != null) {\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment != null)\n return attachment;\n }\n if (this.data.defaultSkin != null)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n };\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.data.name == slotName) {\n var attachment = null;\n if (attachmentName != null) {\n attachment = this.getAttachment(i, attachmentName);\n if (attachment == null)\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\n }\n slot.setAttachment(attachment);\n return;\n }\n }\n throw new Error(\"Slot not found: \" + slotName);\n };\n Skeleton.prototype.findIkConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n };\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n };\n Skeleton.prototype.findPathConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n };\n Skeleton.prototype.getBounds = function (offset, size, temp) {\n if (temp === void 0) { temp = new Array(2); }\n if (offset == null)\n throw new Error(\"offset cannot be null.\");\n if (size == null)\n throw new Error(\"size cannot be null.\");\n var drawOrder = this.drawOrder;\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n var verticesLength = 0;\n var vertices = null;\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.RegionAttachment) {\n verticesLength = 8;\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices != null) {\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n var x = vertices[ii], y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n }\n offset.set(minX, minY);\n size.set(maxX - minX, maxY - minY);\n };\n Skeleton.prototype.update = function (delta) {\n this.time += delta;\n };\n return Skeleton;\n }());\n spine.Skeleton = Skeleton;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonBinary = (function () {\n function SkeletonBinary(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\n var scale = this.scale;\n var skeletonData = new spine.SkeletonData();\n skeletonData.name = \"\";\n var input = new BinaryInput(binary);\n skeletonData.hash = input.readString();\n skeletonData.version = input.readString();\n if (\"3.8.75\" == skeletonData.version)\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n var nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n var n = 0;\n n = input.readInt(true);\n for (var i = 0; i < n; i++)\n input.strings.push(input.readString());\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var name_2 = input.readString();\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n var data = new spine.BoneData(i, name_2, parent_2);\n data.rotation = input.readFloat();\n data.x = input.readFloat() * scale;\n data.y = input.readFloat() * scale;\n data.scaleX = input.readFloat();\n data.scaleY = input.readFloat();\n data.shearX = input.readFloat();\n data.shearY = input.readFloat();\n data.length = input.readFloat() * scale;\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\n data.skinRequired = input.readBoolean();\n if (nonessential)\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var slotName = input.readString();\n var boneData = skeletonData.bones[input.readInt(true)];\n var data = new spine.SlotData(i, slotName, boneData);\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\n var darkColor = input.readInt32();\n if (darkColor != -1)\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.IkConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.bones[input.readInt(true)];\n data.mix = input.readFloat();\n data.softness = input.readFloat() * scale;\n data.bendDirection = input.readByte();\n data.compress = input.readBoolean();\n data.stretch = input.readBoolean();\n data.uniform = input.readBoolean();\n skeletonData.ikConstraints.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.TransformConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.bones[input.readInt(true)];\n data.local = input.readBoolean();\n data.relative = input.readBoolean();\n data.offsetRotation = input.readFloat();\n data.offsetX = input.readFloat() * scale;\n data.offsetY = input.readFloat() * scale;\n data.offsetScaleX = input.readFloat();\n data.offsetScaleY = input.readFloat();\n data.offsetShearY = input.readFloat();\n data.rotateMix = input.readFloat();\n data.translateMix = input.readFloat();\n data.scaleMix = input.readFloat();\n data.shearMix = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.PathConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.slots[input.readInt(true)];\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == spine.PositionMode.Fixed)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n data.spacing *= scale;\n data.rotateMix = input.readFloat();\n data.translateMix = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin != null) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n var i = skeletonData.skins.length;\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++)\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\n }\n n = this.linkedMeshes.length;\n for (var i = 0; i < n; i++) {\n var linkedMesh = this.linkedMeshes[i];\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null)\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent_3 == null)\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent_3);\n linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var data = new spine.EventData(input.readStringRef());\n data.intValue = input.readInt(false);\n data.floatValue = input.readFloat();\n data.stringValue = input.readString();\n data.audioPath = input.readString();\n if (data.audioPath != null) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (var i = 0; i < n; i++)\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\n return skeletonData;\n };\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\n var skin = null;\n var slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new spine.Skin(\"default\");\n }\n else {\n skin = new spine.Skin(input.readStringRef());\n skin.bones.length = input.readInt(true);\n for (var i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\n slotCount = input.readInt(true);\n }\n for (var i = 0; i < slotCount; i++) {\n var slotIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var name_3 = input.readStringRef();\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\n if (attachment != null)\n skin.setAttachment(slotIndex, name_3, attachment);\n }\n }\n return skin;\n };\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n var scale = this.scale;\n var name = input.readStringRef();\n if (name == null)\n name = attachmentName;\n var typeIndex = input.readByte();\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\n switch (type) {\n case spine.AttachmentType.Region: {\n var path = input.readStringRef();\n var rotation = input.readFloat();\n var x = input.readFloat();\n var y = input.readFloat();\n var scaleX = input.readFloat();\n var scaleY = input.readFloat();\n var width = input.readFloat();\n var height = input.readFloat();\n var color = input.readInt32();\n if (path == null)\n path = name;\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null)\n return null;\n region.path = path;\n region.x = x * scale;\n region.y = y * scale;\n region.scaleX = scaleX;\n region.scaleY = scaleY;\n region.rotation = rotation;\n region.width = width * scale;\n region.height = height * scale;\n spine.Color.rgba8888ToColor(region.color, color);\n region.updateOffset();\n return region;\n }\n case spine.AttachmentType.BoundingBox: {\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var color = nonessential ? input.readInt32() : 0;\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n spine.Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case spine.AttachmentType.Mesh: {\n var path = input.readStringRef();\n var color = input.readInt32();\n var vertexCount = input.readInt(true);\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\n var triangles = this.readShortArray(input);\n var vertices = this.readVertices(input, vertexCount);\n var hullLength = input.readInt(true);\n var edges = null;\n var width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (path == null)\n path = name;\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n spine.Color.rgba8888ToColor(mesh.color, color);\n mesh.bones = vertices.bones;\n mesh.vertices = vertices.vertices;\n mesh.worldVerticesLength = vertexCount << 1;\n mesh.triangles = triangles;\n mesh.regionUVs = uvs;\n mesh.updateUVs();\n mesh.hullLength = hullLength << 1;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case spine.AttachmentType.LinkedMesh: {\n var path = input.readStringRef();\n var color = input.readInt32();\n var skinName = input.readStringRef();\n var parent_4 = input.readStringRef();\n var inheritDeform = input.readBoolean();\n var width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (path == null)\n path = name;\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n spine.Color.rgba8888ToColor(mesh.color, color);\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\n return mesh;\n }\n case spine.AttachmentType.Path: {\n var closed_1 = input.readBoolean();\n var constantSpeed = input.readBoolean();\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\n for (var i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n var color = nonessential ? input.readInt32() : 0;\n var path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null)\n return null;\n path.closed = closed_1;\n path.constantSpeed = constantSpeed;\n path.worldVerticesLength = vertexCount << 1;\n path.vertices = vertices.vertices;\n path.bones = vertices.bones;\n path.lengths = lengths;\n if (nonessential)\n spine.Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case spine.AttachmentType.Point: {\n var rotation = input.readFloat();\n var x = input.readFloat();\n var y = input.readFloat();\n var color = nonessential ? input.readInt32() : 0;\n var point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n spine.Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case spine.AttachmentType.Clipping: {\n var endSlotIndex = input.readInt(true);\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var color = nonessential ? input.readInt32() : 0;\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null)\n return null;\n clip.endSlot = skeletonData.slots[endSlotIndex];\n clip.worldVerticesLength = vertexCount << 1;\n clip.vertices = vertices.vertices;\n clip.bones = vertices.bones;\n if (nonessential)\n spine.Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n };\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\n var verticesLength = vertexCount << 1;\n var vertices = new Vertices();\n var scale = this.scale;\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n var weights = new Array();\n var bonesArray = new Array();\n for (var i = 0; i < vertexCount; i++) {\n var boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (var ii = 0; ii < boneCount; ii++) {\n bonesArray.push(input.readInt(true));\n weights.push(input.readFloat() * scale);\n weights.push(input.readFloat() * scale);\n weights.push(input.readFloat());\n }\n }\n vertices.vertices = spine.Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n };\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\n var array = new Array(n);\n if (scale == 1) {\n for (var i = 0; i < n; i++)\n array[i] = input.readFloat();\n }\n else {\n for (var i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n };\n SkeletonBinary.prototype.readShortArray = function (input) {\n var n = input.readInt(true);\n var array = new Array(n);\n for (var i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n };\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\n var timelines = new Array();\n var scale = this.scale;\n var duration = 0;\n var tempColor1 = new spine.Color();\n var tempColor2 = new spine.Color();\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var slotIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.SLOT_ATTACHMENT: {\n var timeline = new spine.AttachmentTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\n break;\n }\n case SkeletonBinary.SLOT_COLOR: {\n var timeline = new spine.ColorTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.SLOT_TWO_COLOR: {\n var timeline = new spine.TwoColorTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var boneIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.BONE_ROTATE: {\n var timeline = new spine.RotateTimeline(frameCount);\n timeline.boneIndex = boneIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.BONE_TRANSLATE:\n case SkeletonBinary.BONE_SCALE:\n case SkeletonBinary.BONE_SHEAR: {\n var timeline = void 0;\n var timelineScale = 1;\n if (timelineType == SkeletonBinary.BONE_SCALE)\n timeline = new spine.ScaleTimeline(frameCount);\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\n timeline = new spine.ShearTimeline(frameCount);\n else {\n timeline = new spine.TranslateTimeline(frameCount);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var frameCount = input.readInt(true);\n var timeline = new spine.IkConstraintTimeline(frameCount);\n timeline.ikConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var frameCount = input.readInt(true);\n var timeline = new spine.TransformConstraintTimeline(frameCount);\n timeline.transformConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var data = skeletonData.pathConstraints[index];\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.PATH_POSITION:\n case SkeletonBinary.PATH_SPACING: {\n var timeline = void 0;\n var timelineScale = 1;\n if (timelineType == SkeletonBinary.PATH_SPACING) {\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n timelineScale = scale;\n }\n else {\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\n if (data.positionMode == spine.PositionMode.Fixed)\n timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.PATH_MIX: {\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\n timeline.pathConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var skin = skeletonData.skins[input.readInt(true)];\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var slotIndex = input.readInt(true);\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\n var weighted = attachment.bones != null;\n var vertices = attachment.vertices;\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n var frameCount = input.readInt(true);\n var timeline = new spine.DeformTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n var deform = void 0;\n var end = input.readInt(true);\n if (end == 0)\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = spine.Utils.newFloatArray(deformLength);\n var start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (var v = start; v < end; v++)\n deform[v] = input.readFloat();\n }\n else {\n for (var v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (var v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frameIndex, time, deform);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\n }\n }\n }\n var drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\n var slotCount = skeletonData.slots.length;\n for (var i = 0; i < drawOrderCount; i++) {\n var time = input.readFloat();\n var offsetCount = input.readInt(true);\n var drawOrder = spine.Utils.newArray(slotCount, 0);\n for (var ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\n var originalIndex = 0, unchangedIndex = 0;\n for (var ii = 0; ii < offsetCount; ii++) {\n var slotIndex = input.readInt(true);\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\n }\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n for (var ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n timeline.setFrame(i, time, drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\n }\n var eventCount = input.readInt(true);\n if (eventCount > 0) {\n var timeline = new spine.EventTimeline(eventCount);\n for (var i = 0; i < eventCount; i++) {\n var time = input.readFloat();\n var eventData = skeletonData.events[input.readInt(true)];\n var event_4 = new spine.Event(time, eventData);\n event_4.intValue = input.readInt(false);\n event_4.floatValue = input.readFloat();\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event_4.data.audioPath != null) {\n event_4.volume = input.readFloat();\n event_4.balance = input.readFloat();\n }\n timeline.setFrame(i, event_4);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\n }\n return new spine.Animation(name, timelines, duration);\n };\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\n switch (input.readByte()) {\n case SkeletonBinary.CURVE_STEPPED:\n timeline.setStepped(frameIndex);\n break;\n case SkeletonBinary.CURVE_BEZIER:\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n break;\n }\n };\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\n };\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\n SkeletonBinary.BONE_ROTATE = 0;\n SkeletonBinary.BONE_TRANSLATE = 1;\n SkeletonBinary.BONE_SCALE = 2;\n SkeletonBinary.BONE_SHEAR = 3;\n SkeletonBinary.SLOT_ATTACHMENT = 0;\n SkeletonBinary.SLOT_COLOR = 1;\n SkeletonBinary.SLOT_TWO_COLOR = 2;\n SkeletonBinary.PATH_POSITION = 0;\n SkeletonBinary.PATH_SPACING = 1;\n SkeletonBinary.PATH_MIX = 2;\n SkeletonBinary.CURVE_LINEAR = 0;\n SkeletonBinary.CURVE_STEPPED = 1;\n SkeletonBinary.CURVE_BEZIER = 2;\n return SkeletonBinary;\n }());\n spine.SkeletonBinary = SkeletonBinary;\n var BinaryInput = (function () {\n function BinaryInput(data, strings, index, buffer) {\n if (strings === void 0) { strings = new Array(); }\n if (index === void 0) { index = 0; }\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n BinaryInput.prototype.readByte = function () {\n return this.buffer.getInt8(this.index++);\n };\n BinaryInput.prototype.readShort = function () {\n var value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n };\n BinaryInput.prototype.readInt32 = function () {\n var value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n };\n BinaryInput.prototype.readInt = function (optimizePositive) {\n var b = this.readByte();\n var result = b & 0x7F;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 7;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 14;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 21;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\n };\n BinaryInput.prototype.readStringRef = function () {\n var index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n };\n BinaryInput.prototype.readString = function () {\n var byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n var chars = \"\";\n var charCount = 0;\n for (var i = 0; i < byteCount;) {\n var b = this.readByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n };\n BinaryInput.prototype.readFloat = function () {\n var value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n };\n BinaryInput.prototype.readBoolean = function () {\n return this.readByte() != 0;\n };\n return BinaryInput;\n }());\n var LinkedMesh = (function () {\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n return LinkedMesh;\n }());\n var Vertices = (function () {\n function Vertices(bones, vertices) {\n if (bones === void 0) { bones = null; }\n if (vertices === void 0) { vertices = null; }\n this.bones = bones;\n this.vertices = vertices;\n }\n return Vertices;\n }());\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonBounds = (function () {\n function SkeletonBounds() {\n this.minX = 0;\n this.minY = 0;\n this.maxX = 0;\n this.maxY = 0;\n this.boundingBoxes = new Array();\n this.polygons = new Array();\n this.polygonPool = new spine.Pool(function () {\n return spine.Utils.newFloatArray(16);\n });\n }\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n var boundingBoxes = this.boundingBoxes;\n var polygons = this.polygons;\n var polygonPool = this.polygonPool;\n var slots = skeleton.slots;\n var slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (var i = 0; i < slotCount; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.BoundingBoxAttachment) {\n var boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n var polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\n }\n polygons.push(polygon);\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\n }\n }\n if (updateAabb) {\n this.aabbCompute();\n }\n else {\n this.minX = Number.POSITIVE_INFINITY;\n this.minY = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.maxY = Number.NEGATIVE_INFINITY;\n }\n };\n SkeletonBounds.prototype.aabbCompute = function () {\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++) {\n var polygon = polygons[i];\n var vertices = polygon;\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n var x = vertices[ii];\n var y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n };\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n };\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\n var minX = this.minX;\n var minY = this.minY;\n var maxX = this.maxX;\n var maxY = this.maxY;\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\n return false;\n var m = (y2 - y1) / (x2 - x1);\n var y = m * (minX - x1) + y1;\n if (y > minY && y < maxY)\n return true;\n y = m * (maxX - x1) + y1;\n if (y > minY && y < maxY)\n return true;\n var x = (minY - y1) / m + x1;\n if (x > minX && x < maxX)\n return true;\n x = (maxY - y1) / m + x1;\n if (x > minX && x < maxX)\n return true;\n return false;\n };\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n };\n SkeletonBounds.prototype.containsPoint = function (x, y) {\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++)\n if (this.containsPointPolygon(polygons[i], x, y))\n return this.boundingBoxes[i];\n return null;\n };\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\n var vertices = polygon;\n var nn = polygon.length;\n var prevIndex = nn - 2;\n var inside = false;\n for (var ii = 0; ii < nn; ii += 2) {\n var vertexY = vertices[ii + 1];\n var prevY = vertices[prevIndex + 1];\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\n var vertexX = vertices[ii];\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\n inside = !inside;\n }\n prevIndex = ii;\n }\n return inside;\n };\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++)\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\n return this.boundingBoxes[i];\n return null;\n };\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\n var vertices = polygon;\n var nn = polygon.length;\n var width12 = x1 - x2, height12 = y1 - y2;\n var det1 = x1 * y2 - y1 * x2;\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (var ii = 0; ii < nn; ii += 2) {\n var x4 = vertices[ii], y4 = vertices[ii + 1];\n var det2 = x3 * y4 - y3 * x4;\n var width34 = x3 - x4, height34 = y3 - y4;\n var det3 = width12 * height34 - height12 * width34;\n var x = (det1 * width34 - width12 * det2) / det3;\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\n var y = (det1 * height34 - height12 * det2) / det3;\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\n return true;\n }\n x3 = x4;\n y3 = y4;\n }\n return false;\n };\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\n if (boundingBox == null)\n throw new Error(\"boundingBox cannot be null.\");\n var index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n };\n SkeletonBounds.prototype.getWidth = function () {\n return this.maxX - this.minX;\n };\n SkeletonBounds.prototype.getHeight = function () {\n return this.maxY - this.minY;\n };\n return SkeletonBounds;\n }());\n spine.SkeletonBounds = SkeletonBounds;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonClipping = (function () {\n function SkeletonClipping() {\n this.triangulator = new spine.Triangulator();\n this.clippingPolygon = new Array();\n this.clipOutput = new Array();\n this.clippedVertices = new Array();\n this.clippedTriangles = new Array();\n this.scratch = new Array();\n }\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\n if (this.clipAttachment != null)\n return 0;\n this.clipAttachment = clip;\n var n = clip.worldVerticesLength;\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n var clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\n var polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n };\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n };\n SkeletonClipping.prototype.clipEnd = function () {\n if (this.clipAttachment == null)\n return;\n this.clipAttachment = null;\n this.clippingPolygons = null;\n this.clippedVertices.length = 0;\n this.clippedTriangles.length = 0;\n this.clippingPolygon.length = 0;\n };\n SkeletonClipping.prototype.isClipping = function () {\n return this.clipAttachment != null;\n };\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n var clippedTriangles = this.clippedTriangles;\n var polygons = this.clippingPolygons;\n var polygonsCount = this.clippingPolygons.length;\n var vertexSize = twoColor ? 12 : 8;\n var index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer: for (var i = 0; i < trianglesLength; i += 3) {\n var vertexOffset = triangles[i] << 1;\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (var p = 0; p < polygonsCount; p++) {\n var s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n var clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\n var clipOutputCount = clipOutputLength >> 1;\n var clipOutputItems = this.clipOutput;\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\n clippedVerticesItems[s] = x;\n clippedVerticesItems[s + 1] = y;\n clippedVerticesItems[s + 2] = light.r;\n clippedVerticesItems[s + 3] = light.g;\n clippedVerticesItems[s + 4] = light.b;\n clippedVerticesItems[s + 5] = light.a;\n var c0 = x - x3, c1 = y - y3;\n var a = (d0 * c0 + d1 * c1) * d;\n var b = (d4 * c0 + d2 * c1) * d;\n var c = 1 - a - b;\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\n if (twoColor) {\n clippedVerticesItems[s + 8] = dark.r;\n clippedVerticesItems[s + 9] = dark.g;\n clippedVerticesItems[s + 10] = dark.b;\n clippedVerticesItems[s + 11] = dark.a;\n }\n s += vertexSize;\n }\n s = clippedTriangles.length;\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (var ii = 1; ii < clipOutputCount; ii++) {\n clippedTrianglesItems[s] = index;\n clippedTrianglesItems[s + 1] = (index + ii);\n clippedTrianglesItems[s + 2] = (index + ii + 1);\n s += 3;\n }\n index += clipOutputCount + 1;\n }\n else {\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\n clippedVerticesItems[s] = x1;\n clippedVerticesItems[s + 1] = y1;\n clippedVerticesItems[s + 2] = light.r;\n clippedVerticesItems[s + 3] = light.g;\n clippedVerticesItems[s + 4] = light.b;\n clippedVerticesItems[s + 5] = light.a;\n if (!twoColor) {\n clippedVerticesItems[s + 6] = u1;\n clippedVerticesItems[s + 7] = v1;\n clippedVerticesItems[s + 8] = x2;\n clippedVerticesItems[s + 9] = y2;\n clippedVerticesItems[s + 10] = light.r;\n clippedVerticesItems[s + 11] = light.g;\n clippedVerticesItems[s + 12] = light.b;\n clippedVerticesItems[s + 13] = light.a;\n clippedVerticesItems[s + 14] = u2;\n clippedVerticesItems[s + 15] = v2;\n clippedVerticesItems[s + 16] = x3;\n clippedVerticesItems[s + 17] = y3;\n clippedVerticesItems[s + 18] = light.r;\n clippedVerticesItems[s + 19] = light.g;\n clippedVerticesItems[s + 20] = light.b;\n clippedVerticesItems[s + 21] = light.a;\n clippedVerticesItems[s + 22] = u3;\n clippedVerticesItems[s + 23] = v3;\n }\n else {\n clippedVerticesItems[s + 6] = u1;\n clippedVerticesItems[s + 7] = v1;\n clippedVerticesItems[s + 8] = dark.r;\n clippedVerticesItems[s + 9] = dark.g;\n clippedVerticesItems[s + 10] = dark.b;\n clippedVerticesItems[s + 11] = dark.a;\n clippedVerticesItems[s + 12] = x2;\n clippedVerticesItems[s + 13] = y2;\n clippedVerticesItems[s + 14] = light.r;\n clippedVerticesItems[s + 15] = light.g;\n clippedVerticesItems[s + 16] = light.b;\n clippedVerticesItems[s + 17] = light.a;\n clippedVerticesItems[s + 18] = u2;\n clippedVerticesItems[s + 19] = v2;\n clippedVerticesItems[s + 20] = dark.r;\n clippedVerticesItems[s + 21] = dark.g;\n clippedVerticesItems[s + 22] = dark.b;\n clippedVerticesItems[s + 23] = dark.a;\n clippedVerticesItems[s + 24] = x3;\n clippedVerticesItems[s + 25] = y3;\n clippedVerticesItems[s + 26] = light.r;\n clippedVerticesItems[s + 27] = light.g;\n clippedVerticesItems[s + 28] = light.b;\n clippedVerticesItems[s + 29] = light.a;\n clippedVerticesItems[s + 30] = u3;\n clippedVerticesItems[s + 31] = v3;\n clippedVerticesItems[s + 32] = dark.r;\n clippedVerticesItems[s + 33] = dark.g;\n clippedVerticesItems[s + 34] = dark.b;\n clippedVerticesItems[s + 35] = dark.a;\n }\n s = clippedTriangles.length;\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\n clippedTrianglesItems[s] = index;\n clippedTrianglesItems[s + 1] = (index + 1);\n clippedTrianglesItems[s + 2] = (index + 2);\n index += 3;\n continue outer;\n }\n }\n }\n };\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\n var originalOutput = output;\n var clipped = false;\n var input = null;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\n }\n else\n input = this.scratch;\n input.length = 0;\n input.push(x1);\n input.push(y1);\n input.push(x2);\n input.push(y2);\n input.push(x3);\n input.push(y3);\n input.push(x1);\n input.push(y1);\n output.length = 0;\n var clippingVertices = clippingArea;\n var clippingVerticesLast = clippingArea.length - 4;\n for (var i = 0;; i += 2) {\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n var inputVertices = input;\n var inputVerticesLength = input.length - 2, outputStart = output.length;\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\n if (side2) {\n output.push(inputX2);\n output.push(inputY2);\n continue;\n }\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 0.000001) {\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n }\n else {\n output.push(edgeX);\n output.push(edgeY);\n }\n }\n else if (side2) {\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 0.000001) {\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n }\n else {\n output.push(edgeX);\n output.push(edgeY);\n }\n output.push(inputX2);\n output.push(inputY2);\n }\n clipped = true;\n }\n if (outputStart == output.length) {\n originalOutput.length = 0;\n return true;\n }\n output.push(output[0]);\n output.push(output[1]);\n if (i == clippingVerticesLast)\n break;\n var temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (var i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n }\n else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n };\n SkeletonClipping.makeClockwise = function (polygon) {\n var vertices = polygon;\n var verticeslength = polygon.length;\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\n p1x = vertices[i];\n p1y = vertices[i + 1];\n p2x = vertices[i + 2];\n p2y = vertices[i + 3];\n area += p1x * p2y - p2x * p1y;\n }\n if (area < 0)\n return;\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n var x = vertices[i], y = vertices[i + 1];\n var other = lastX - i;\n vertices[i] = vertices[other];\n vertices[i + 1] = vertices[other + 1];\n vertices[other] = x;\n vertices[other + 1] = y;\n }\n };\n return SkeletonClipping;\n }());\n spine.SkeletonClipping = SkeletonClipping;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonData = (function () {\n function SkeletonData() {\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.events = new Array();\n this.animations = new Array();\n this.ikConstraints = new Array();\n this.transformConstraints = new Array();\n this.pathConstraints = new Array();\n this.fps = 0;\n }\n SkeletonData.prototype.findBone = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n };\n SkeletonData.prototype.findBoneIndex = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n if (bones[i].name == boneName)\n return i;\n return -1;\n };\n SkeletonData.prototype.findSlot = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n };\n SkeletonData.prototype.findSlotIndex = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++)\n if (slots[i].name == slotName)\n return i;\n return -1;\n };\n SkeletonData.prototype.findSkin = function (skinName) {\n if (skinName == null)\n throw new Error(\"skinName cannot be null.\");\n var skins = this.skins;\n for (var i = 0, n = skins.length; i < n; i++) {\n var skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n };\n SkeletonData.prototype.findEvent = function (eventDataName) {\n if (eventDataName == null)\n throw new Error(\"eventDataName cannot be null.\");\n var events = this.events;\n for (var i = 0, n = events.length; i < n; i++) {\n var event_5 = events[i];\n if (event_5.name == eventDataName)\n return event_5;\n }\n return null;\n };\n SkeletonData.prototype.findAnimation = function (animationName) {\n if (animationName == null)\n throw new Error(\"animationName cannot be null.\");\n var animations = this.animations;\n for (var i = 0, n = animations.length; i < n; i++) {\n var animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n };\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\n if (pathConstraintName == null)\n throw new Error(\"pathConstraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++)\n if (pathConstraints[i].name == pathConstraintName)\n return i;\n return -1;\n };\n return SkeletonData;\n }());\n spine.SkeletonData = SkeletonData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonJson = (function () {\n function SkeletonJson(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n SkeletonJson.prototype.readSkeletonData = function (json) {\n var scale = this.scale;\n var skeletonData = new spine.SkeletonData();\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\n var skeletonMap = root.skeleton;\n if (skeletonMap != null) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.spine;\n if (\"3.8.75\" == skeletonData.version)\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\n skeletonData.x = skeletonMap.x;\n skeletonData.y = skeletonMap.y;\n skeletonData.width = skeletonMap.width;\n skeletonData.height = skeletonMap.height;\n skeletonData.fps = skeletonMap.fps;\n skeletonData.imagesPath = skeletonMap.images;\n }\n if (root.bones) {\n for (var i = 0; i < root.bones.length; i++) {\n var boneMap = root.bones[i];\n var parent_5 = null;\n var parentName = this.getValue(boneMap, \"parent\", null);\n if (parentName != null) {\n parent_5 = skeletonData.findBone(parentName);\n if (parent_5 == null)\n throw new Error(\"Parent bone not found: \" + parentName);\n }\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (var i = 0; i < root.slots.length; i++) {\n var slotMap = root.slots[i];\n var slotName = slotMap.name;\n var boneName = slotMap.bone;\n var boneData = skeletonData.findBone(boneName);\n if (boneData == null)\n throw new Error(\"Slot bone not found: \" + boneName);\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\n var color = this.getValue(slotMap, \"color\", null);\n if (color != null)\n data.color.setFromString(color);\n var dark = this.getValue(slotMap, \"dark\", null);\n if (dark != null) {\n data.darkColor = new spine.Color(1, 1, 1, 1);\n data.darkColor.setFromString(dark);\n }\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (var i = 0; i < root.ik.length; i++) {\n var constraintMap = root.ik[i];\n var data = new spine.IkConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"IK bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null)\n throw new Error(\"IK target bone not found: \" + targetName);\n data.mix = this.getValue(constraintMap, \"mix\", 1);\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = this.getValue(constraintMap, \"compress\", false);\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (var i = 0; i < root.transform.length; i++) {\n var constraintMap = root.transform[i];\n var data = new spine.TransformConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null)\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\n data.local = this.getValue(constraintMap, \"local\", false);\n data.relative = this.getValue(constraintMap, \"relative\", false);\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (var i = 0; i < root.path.length; i++) {\n var constraintMap = root.path[i];\n var data = new spine.PathConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findSlot(targetName);\n if (data.target == null)\n throw new Error(\"Path target slot not found: \" + targetName);\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.position = this.getValue(constraintMap, \"position\", 0);\n if (data.positionMode == spine.PositionMode.Fixed)\n data.position *= scale;\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n data.spacing *= scale;\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (var i = 0; i < root.skins.length; i++) {\n var skinMap = root.skins[i];\n var skin = new spine.Skin(skinMap.name);\n if (skinMap.bones) {\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\n var bone = skeletonData.findBone(skinMap.bones[ii]);\n if (bone == null)\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\n if (constraint == null)\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\n if (constraint == null)\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (var ii = 0; ii < skinMap.path.length; ii++) {\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\n if (constraint == null)\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\n skin.constraints.push(constraint);\n }\n }\n for (var slotName in skinMap.attachments) {\n var slot = skeletonData.findSlot(slotName);\n if (slot == null)\n throw new Error(\"Slot not found: \" + slotName);\n var slotMap = skinMap.attachments[slotName];\n for (var entryName in slotMap) {\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment != null)\n skin.setAttachment(slot.index, entryName, attachment);\n }\n }\n skeletonData.skins.push(skin);\n if (skin.name == \"default\")\n skeletonData.defaultSkin = skin;\n }\n }\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\n var linkedMesh = this.linkedMeshes[i];\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null)\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent_6 == null)\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent_6);\n linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (var eventName in root.events) {\n var eventMap = root.events[eventName];\n var data = new spine.EventData(eventName);\n data.intValue = this.getValue(eventMap, \"int\", 0);\n data.floatValue = this.getValue(eventMap, \"float\", 0);\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\n data.audioPath = this.getValue(eventMap, \"audio\", null);\n if (data.audioPath != null) {\n data.volume = this.getValue(eventMap, \"volume\", 1);\n data.balance = this.getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (var animationName in root.animations) {\n var animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n };\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\n var scale = this.scale;\n name = this.getValue(map, \"name\", name);\n var type = this.getValue(map, \"type\", \"region\");\n switch (type) {\n case \"region\": {\n var path = this.getValue(map, \"path\", name);\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null)\n return null;\n region.path = path;\n region.x = this.getValue(map, \"x\", 0) * scale;\n region.y = this.getValue(map, \"y\", 0) * scale;\n region.scaleX = this.getValue(map, \"scaleX\", 1);\n region.scaleY = this.getValue(map, \"scaleY\", 1);\n region.rotation = this.getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n region.color.setFromString(color);\n region.updateOffset();\n return region;\n }\n case \"boundingbox\": {\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n var path = this.getValue(map, \"path\", name);\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n mesh.color.setFromString(color);\n mesh.width = this.getValue(map, \"width\", 0) * scale;\n mesh.height = this.getValue(map, \"height\", 0) * scale;\n var parent_7 = this.getValue(map, \"parent\", null);\n if (parent_7 != null) {\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\n return mesh;\n }\n var uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n mesh.updateUVs();\n mesh.edges = this.getValue(map, \"edges\", null);\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n var path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null)\n return null;\n path.closed = this.getValue(map, \"closed\", false);\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\n var vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\n for (var i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n var point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null)\n return null;\n point.x = this.getValue(map, \"x\", 0) * scale;\n point.y = this.getValue(map, \"y\", 0) * scale;\n point.rotation = this.getValue(map, \"rotation\", 0);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null)\n return null;\n var end = this.getValue(map, \"end\", null);\n if (end != null) {\n var slot = skeletonData.findSlot(end);\n if (slot == null)\n throw new Error(\"Clipping end slot not found: \" + end);\n clip.endSlot = slot;\n }\n var vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n };\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\n var scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n var vertices = map.vertices;\n if (verticesLength == vertices.length) {\n var scaledVertices = spine.Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (var i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n var weights = new Array();\n var bones = new Array();\n for (var i = 0, n = vertices.length; i < n;) {\n var boneCount = vertices[i++];\n bones.push(boneCount);\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\n bones.push(vertices[i]);\n weights.push(vertices[i + 1] * scale);\n weights.push(vertices[i + 2] * scale);\n weights.push(vertices[i + 3]);\n }\n }\n attachment.bones = bones;\n attachment.vertices = spine.Utils.toFloatArray(weights);\n };\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\n var scale = this.scale;\n var timelines = new Array();\n var duration = 0;\n if (map.slots) {\n for (var slotName in map.slots) {\n var slotMap = map.slots[slotName];\n var slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + slotName);\n for (var timelineName in slotMap) {\n var timelineMap = slotMap[timelineName];\n if (timelineName == \"attachment\") {\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n else if (timelineName == \"color\") {\n var timeline = new spine.ColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var color = new spine.Color();\n color.setFromString(valueMap.color);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\n }\n else if (timelineName == \"twoColor\") {\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var light = new spine.Color();\n var dark = new spine.Color();\n light.setFromString(valueMap.light);\n dark.setFromString(valueMap.dark);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\n }\n else\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\n }\n }\n }\n if (map.bones) {\n for (var boneName in map.bones) {\n var boneMap = map.bones[boneName];\n var boneIndex = skeletonData.findBoneIndex(boneName);\n if (boneIndex == -1)\n throw new Error(\"Bone not found: \" + boneName);\n for (var timelineName in boneMap) {\n var timelineMap = boneMap[timelineName];\n if (timelineName === \"rotate\") {\n var timeline = new spine.RotateTimeline(timelineMap.length);\n timeline.boneIndex = boneIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\n }\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\n var timeline = null;\n var timelineScale = 1, defaultValue = 0;\n if (timelineName === \"scale\") {\n timeline = new spine.ScaleTimeline(timelineMap.length);\n defaultValue = 1;\n }\n else if (timelineName === \"shear\")\n timeline = new spine.ShearTimeline(timelineMap.length);\n else {\n timeline = new spine.TranslateTimeline(timelineMap.length);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\n }\n else\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\n }\n }\n }\n if (map.ik) {\n for (var constraintName in map.ik) {\n var constraintMap = map.ik[constraintName];\n var constraint = skeletonData.findIkConstraint(constraintName);\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n var frameIndex = 0;\n for (var i = 0; i < constraintMap.length; i++) {\n var valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\n }\n }\n if (map.transform) {\n for (var constraintName in map.transform) {\n var constraintMap = map.transform[constraintName];\n var constraint = skeletonData.findTransformConstraint(constraintName);\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n var frameIndex = 0;\n for (var i = 0; i < constraintMap.length; i++) {\n var valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\n }\n }\n if (map.path) {\n for (var constraintName in map.path) {\n var constraintMap = map.path[constraintName];\n var index = skeletonData.findPathConstraintIndex(constraintName);\n if (index == -1)\n throw new Error(\"Path constraint not found: \" + constraintName);\n var data = skeletonData.pathConstraints[index];\n for (var timelineName in constraintMap) {\n var timelineMap = constraintMap[timelineName];\n if (timelineName === \"position\" || timelineName === \"spacing\") {\n var timeline = null;\n var timelineScale = 1;\n if (timelineName === \"spacing\") {\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n timelineScale = scale;\n }\n else {\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\n if (data.positionMode == spine.PositionMode.Fixed)\n timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\n }\n else if (timelineName === \"mix\") {\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\n timeline.pathConstraintIndex = index;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\n }\n }\n }\n }\n if (map.deform) {\n for (var deformName in map.deform) {\n var deformMap = map.deform[deformName];\n var skin = skeletonData.findSkin(deformName);\n if (skin == null)\n throw new Error(\"Skin not found: \" + deformName);\n for (var slotName in deformMap) {\n var slotMap = deformMap[slotName];\n var slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + slotMap.name);\n for (var timelineName in slotMap) {\n var timelineMap = slotMap[timelineName];\n var attachment = skin.getAttachment(slotIndex, timelineName);\n if (attachment == null)\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\n var weighted = attachment.bones != null;\n var vertices = attachment.vertices;\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n var timeline = new spine.DeformTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n var frameIndex = 0;\n for (var j = 0; j < timelineMap.length; j++) {\n var valueMap = timelineMap[j];\n var deform = void 0;\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\n if (verticesValue == null)\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = spine.Utils.newFloatArray(deformLength);\n var start = this.getValue(valueMap, \"offset\", 0);\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (var i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (var i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n }\n }\n }\n var drawOrderNode = map.drawOrder;\n if (drawOrderNode == null)\n drawOrderNode = map.draworder;\n if (drawOrderNode != null) {\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\n var slotCount = skeletonData.slots.length;\n var frameIndex = 0;\n for (var j = 0; j < drawOrderNode.length; j++) {\n var drawOrderMap = drawOrderNode[j];\n var drawOrder = null;\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\n if (offsets != null) {\n drawOrder = spine.Utils.newArray(slotCount, -1);\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\n var originalIndex = 0, unchangedIndex = 0;\n for (var i = 0; i < offsets.length; i++) {\n var offsetMap = offsets[i];\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + offsetMap.slot);\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\n }\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n for (var i = slotCount - 1; i >= 0; i--)\n if (drawOrder[i] == -1)\n drawOrder[i] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n if (map.events) {\n var timeline = new spine.EventTimeline(map.events.length);\n var frameIndex = 0;\n for (var i = 0; i < map.events.length; i++) {\n var eventMap = map.events[i];\n var eventData = skeletonData.findEvent(eventMap.name);\n if (eventData == null)\n throw new Error(\"Event not found: \" + eventMap.name);\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\n if (event_6.data.audioPath != null) {\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frameIndex++, event_6);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n if (isNaN(duration)) {\n throw new Error(\"Error while parsing animation, duration is NaN\");\n }\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\n };\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\n if (!map.hasOwnProperty(\"curve\"))\n return;\n if (map.curve == \"stepped\")\n timeline.setStepped(frameIndex);\n else {\n var curve = map.curve;\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\n }\n };\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\n return map[prop] !== undefined ? map[prop] : defaultValue;\n };\n SkeletonJson.blendModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"normal\")\n return spine.BlendMode.Normal;\n if (str == \"additive\")\n return spine.BlendMode.Additive;\n if (str == \"multiply\")\n return spine.BlendMode.Multiply;\n if (str == \"screen\")\n return spine.BlendMode.Screen;\n throw new Error(\"Unknown blend mode: \" + str);\n };\n SkeletonJson.positionModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"fixed\")\n return spine.PositionMode.Fixed;\n if (str == \"percent\")\n return spine.PositionMode.Percent;\n throw new Error(\"Unknown position mode: \" + str);\n };\n SkeletonJson.spacingModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"length\")\n return spine.SpacingMode.Length;\n if (str == \"fixed\")\n return spine.SpacingMode.Fixed;\n if (str == \"percent\")\n return spine.SpacingMode.Percent;\n throw new Error(\"Unknown position mode: \" + str);\n };\n SkeletonJson.rotateModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"tangent\")\n return spine.RotateMode.Tangent;\n if (str == \"chain\")\n return spine.RotateMode.Chain;\n if (str == \"chainscale\")\n return spine.RotateMode.ChainScale;\n throw new Error(\"Unknown rotate mode: \" + str);\n };\n SkeletonJson.transformModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"normal\")\n return spine.TransformMode.Normal;\n if (str == \"onlytranslation\")\n return spine.TransformMode.OnlyTranslation;\n if (str == \"norotationorreflection\")\n return spine.TransformMode.NoRotationOrReflection;\n if (str == \"noscale\")\n return spine.TransformMode.NoScale;\n if (str == \"noscaleorreflection\")\n return spine.TransformMode.NoScaleOrReflection;\n throw new Error(\"Unknown transform mode: \" + str);\n };\n return SkeletonJson;\n }());\n spine.SkeletonJson = SkeletonJson;\n var LinkedMesh = (function () {\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n return LinkedMesh;\n }());\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkinEntry = (function () {\n function SkinEntry(slotIndex, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n return SkinEntry;\n }());\n spine.SkinEntry = SkinEntry;\n var Skin = (function () {\n function Skin(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\n if (attachment == null)\n throw new Error(\"attachment cannot be null.\");\n var attachments = this.attachments;\n if (slotIndex >= attachments.length)\n attachments.length = slotIndex + 1;\n if (!attachments[slotIndex])\n attachments[slotIndex] = {};\n attachments[slotIndex][name] = attachment;\n };\n Skin.prototype.addSkin = function (skin) {\n for (var i = 0; i < skin.bones.length; i++) {\n var bone = skin.bones[i];\n var contained = false;\n for (var j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (var i = 0; i < skin.constraints.length; i++) {\n var constraint = skin.constraints[i];\n var contained = false;\n for (var j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n var attachments = skin.getAttachments();\n for (var i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n };\n Skin.prototype.copySkin = function (skin) {\n for (var i = 0; i < skin.bones.length; i++) {\n var bone = skin.bones[i];\n var contained = false;\n for (var j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (var i = 0; i < skin.constraints.length; i++) {\n var constraint = skin.constraints[i];\n var contained = false;\n for (var j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n var attachments = skin.getAttachments();\n for (var i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (attachment.attachment == null)\n continue;\n if (attachment.attachment instanceof spine.MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n };\n Skin.prototype.getAttachment = function (slotIndex, name) {\n var dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n };\n Skin.prototype.removeAttachment = function (slotIndex, name) {\n var dictionary = this.attachments[slotIndex];\n if (dictionary)\n dictionary[name] = null;\n };\n Skin.prototype.getAttachments = function () {\n var entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n var slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (var name_4 in slotAttachments) {\n var attachment = slotAttachments[name_4];\n if (attachment)\n entries.push(new SkinEntry(i, name_4, attachment));\n }\n }\n }\n return entries;\n };\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\n var slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (var name_5 in slotAttachments) {\n var attachment = slotAttachments[name_5];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\n }\n }\n };\n Skin.prototype.clear = function () {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n };\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\n var slotIndex = 0;\n for (var i = 0; i < skeleton.slots.length; i++) {\n var slot = skeleton.slots[i];\n var slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n var dictionary = oldSkin.attachments[slotIndex];\n for (var key in dictionary) {\n var skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n var attachment = this.getAttachment(slotIndex, key);\n if (attachment != null)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n };\n return Skin;\n }());\n spine.Skin = Skin;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Slot = (function () {\n function Slot(data, bone) {\n this.deform = new Array();\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (bone == null)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new spine.Color();\n this.darkColor = data.darkColor == null ? null : new spine.Color();\n this.setToSetupPose();\n }\n Slot.prototype.getSkeleton = function () {\n return this.bone.skeleton;\n };\n Slot.prototype.getAttachment = function () {\n return this.attachment;\n };\n Slot.prototype.setAttachment = function (attachment) {\n if (this.attachment == attachment)\n return;\n this.attachment = attachment;\n this.attachmentTime = this.bone.skeleton.time;\n this.deform.length = 0;\n };\n Slot.prototype.setAttachmentTime = function (time) {\n this.attachmentTime = this.bone.skeleton.time - time;\n };\n Slot.prototype.getAttachmentTime = function () {\n return this.bone.skeleton.time - this.attachmentTime;\n };\n Slot.prototype.setToSetupPose = function () {\n this.color.setFromColor(this.data.color);\n if (this.darkColor != null)\n this.darkColor.setFromColor(this.data.darkColor);\n if (this.data.attachmentName == null)\n this.attachment = null;\n else {\n this.attachment = null;\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\n }\n };\n return Slot;\n }());\n spine.Slot = Slot;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SlotData = (function () {\n function SlotData(index, name, boneData) {\n this.color = new spine.Color(1, 1, 1, 1);\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (name == null)\n throw new Error(\"name cannot be null.\");\n if (boneData == null)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n return SlotData;\n }());\n spine.SlotData = SlotData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Texture = (function () {\n function Texture(image) {\n this._image = image;\n }\n Texture.prototype.getImage = function () {\n return this._image;\n };\n Texture.filterFromString = function (text) {\n switch (text.toLowerCase()) {\n case \"nearest\": return TextureFilter.Nearest;\n case \"linear\": return TextureFilter.Linear;\n case \"mipmap\": return TextureFilter.MipMap;\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\n default: throw new Error(\"Unknown texture filter \" + text);\n }\n };\n Texture.wrapFromString = function (text) {\n switch (text.toLowerCase()) {\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\n case \"repeat\": return TextureWrap.Repeat;\n default: throw new Error(\"Unknown texture wrap \" + text);\n }\n };\n return Texture;\n }());\n spine.Texture = Texture;\n var TextureFilter;\n (function (TextureFilter) {\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\n var TextureWrap;\n (function (TextureWrap) {\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\n var TextureRegion = (function () {\n function TextureRegion() {\n this.u = 0;\n this.v = 0;\n this.u2 = 0;\n this.v2 = 0;\n this.width = 0;\n this.height = 0;\n this.rotate = false;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n return TextureRegion;\n }());\n spine.TextureRegion = TextureRegion;\n var FakeTexture = (function (_super) {\n __extends(FakeTexture, _super);\n function FakeTexture() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\n FakeTexture.prototype.dispose = function () { };\n return FakeTexture;\n }(Texture));\n spine.FakeTexture = FakeTexture;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TextureAtlas = (function () {\n function TextureAtlas(atlasText, textureLoader) {\n this.pages = new Array();\n this.regions = new Array();\n this.load(atlasText, textureLoader);\n }\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\n if (textureLoader == null)\n throw new Error(\"textureLoader cannot be null.\");\n var reader = new TextureAtlasReader(atlasText);\n var tuple = new Array(4);\n var page = null;\n while (true) {\n var line = reader.readLine();\n if (line == null)\n break;\n line = line.trim();\n if (line.length == 0)\n page = null;\n else if (!page) {\n page = new TextureAtlasPage();\n page.name = line;\n if (reader.readTuple(tuple) == 2) {\n page.width = parseInt(tuple[0]);\n page.height = parseInt(tuple[1]);\n reader.readTuple(tuple);\n }\n reader.readTuple(tuple);\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\n var direction = reader.readValue();\n page.uWrap = spine.TextureWrap.ClampToEdge;\n page.vWrap = spine.TextureWrap.ClampToEdge;\n if (direction == \"x\")\n page.uWrap = spine.TextureWrap.Repeat;\n else if (direction == \"y\")\n page.vWrap = spine.TextureWrap.Repeat;\n else if (direction == \"xy\")\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\n page.texture = textureLoader(line);\n page.texture.setFilters(page.minFilter, page.magFilter);\n page.texture.setWraps(page.uWrap, page.vWrap);\n page.width = page.texture.getImage().width;\n page.height = page.texture.getImage().height;\n this.pages.push(page);\n }\n else {\n var region = new TextureAtlasRegion();\n region.name = line;\n region.page = page;\n var rotateValue = reader.readValue();\n if (rotateValue.toLocaleLowerCase() == \"true\") {\n region.degrees = 90;\n }\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\n region.degrees = 0;\n }\n else {\n region.degrees = parseFloat(rotateValue);\n }\n region.rotate = region.degrees == 90;\n reader.readTuple(tuple);\n var x = parseInt(tuple[0]);\n var y = parseInt(tuple[1]);\n reader.readTuple(tuple);\n var width = parseInt(tuple[0]);\n var height = parseInt(tuple[1]);\n region.u = x / page.width;\n region.v = y / page.height;\n if (region.rotate) {\n region.u2 = (x + height) / page.width;\n region.v2 = (y + width) / page.height;\n }\n else {\n region.u2 = (x + width) / page.width;\n region.v2 = (y + height) / page.height;\n }\n region.x = x;\n region.y = y;\n region.width = Math.abs(width);\n region.height = Math.abs(height);\n if (reader.readTuple(tuple) == 4) {\n if (reader.readTuple(tuple) == 4) {\n reader.readTuple(tuple);\n }\n }\n region.originalWidth = parseInt(tuple[0]);\n region.originalHeight = parseInt(tuple[1]);\n reader.readTuple(tuple);\n region.offsetX = parseInt(tuple[0]);\n region.offsetY = parseInt(tuple[1]);\n region.index = parseInt(reader.readValue());\n region.texture = page.texture;\n this.regions.push(region);\n }\n }\n };\n TextureAtlas.prototype.findRegion = function (name) {\n for (var i = 0; i < this.regions.length; i++) {\n if (this.regions[i].name == name) {\n return this.regions[i];\n }\n }\n return null;\n };\n TextureAtlas.prototype.dispose = function () {\n for (var i = 0; i < this.pages.length; i++) {\n this.pages[i].texture.dispose();\n }\n };\n return TextureAtlas;\n }());\n spine.TextureAtlas = TextureAtlas;\n var TextureAtlasReader = (function () {\n function TextureAtlasReader(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n TextureAtlasReader.prototype.readLine = function () {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n };\n TextureAtlasReader.prototype.readValue = function () {\n var line = this.readLine();\n var colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n return line.substring(colon + 1).trim();\n };\n TextureAtlasReader.prototype.readTuple = function (tuple) {\n var line = this.readLine();\n var colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n var i = 0, lastMatch = colon + 1;\n for (; i < 3; i++) {\n var comma = line.indexOf(\",\", lastMatch);\n if (comma == -1)\n break;\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n }\n tuple[i] = line.substring(lastMatch).trim();\n return i + 1;\n };\n return TextureAtlasReader;\n }());\n var TextureAtlasPage = (function () {\n function TextureAtlasPage() {\n }\n return TextureAtlasPage;\n }());\n spine.TextureAtlasPage = TextureAtlasPage;\n var TextureAtlasRegion = (function (_super) {\n __extends(TextureAtlasRegion, _super);\n function TextureAtlasRegion() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return TextureAtlasRegion;\n }(spine.TextureRegion));\n spine.TextureAtlasRegion = TextureAtlasRegion;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TransformConstraint = (function () {\n function TransformConstraint(data, skeleton) {\n this.rotateMix = 0;\n this.translateMix = 0;\n this.scaleMix = 0;\n this.shearMix = 0;\n this.temp = new spine.Vector2();\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n this.scaleMix = data.scaleMix;\n this.shearMix = data.shearMix;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n TransformConstraint.prototype.isActive = function () {\n return this.active;\n };\n TransformConstraint.prototype.apply = function () {\n this.update();\n };\n TransformConstraint.prototype.update = function () {\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n }\n else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n };\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n var offsetRotation = this.data.offsetRotation * degRadReflect;\n var offsetShearY = this.data.offsetShearY * degRadReflect;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n var modified = false;\n if (rotateMix != 0) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n var cos = Math.cos(r), sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n modified = true;\n }\n if (translateMix != 0) {\n var temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * translateMix;\n bone.worldY += (temp.y - bone.worldY) * translateMix;\n modified = true;\n }\n if (scaleMix > 0) {\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n var ts = Math.sqrt(ta * ta + tc * tc);\n if (s > 0.00001)\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\n bone.a *= s;\n bone.c *= s;\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n ts = Math.sqrt(tb * tb + td * td);\n if (s > 0.00001)\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\n bone.b *= s;\n bone.d *= s;\n modified = true;\n }\n if (shearMix > 0) {\n var b = bone.b, d = bone.d;\n var by = Math.atan2(d, b);\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r = by + (r + offsetShearY) * shearMix;\n var s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n modified = true;\n }\n if (modified)\n bone.appliedValid = false;\n }\n };\n TransformConstraint.prototype.applyRelativeWorld = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n var modified = false;\n if (rotateMix != 0) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var r = Math.atan2(tc, ta) + offsetRotation;\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n var cos = Math.cos(r), sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n modified = true;\n }\n if (translateMix != 0) {\n var temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * translateMix;\n bone.worldY += temp.y * translateMix;\n modified = true;\n }\n if (scaleMix > 0) {\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\n bone.a *= s;\n bone.c *= s;\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\n bone.b *= s;\n bone.d *= s;\n modified = true;\n }\n if (shearMix > 0) {\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n var b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\n var s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n modified = true;\n }\n if (modified)\n bone.appliedValid = false;\n }\n };\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n if (!target.appliedValid)\n target.updateAppliedTransform();\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var rotation = bone.arotation;\n if (rotateMix != 0) {\n var r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n rotation += r * rotateMix;\n }\n var x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax - x + this.data.offsetX) * translateMix;\n y += (target.ay - y + this.data.offsetY) * translateMix;\n }\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix != 0) {\n if (scaleX > 0.00001)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\n if (scaleY > 0.00001)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\n }\n var shearY = bone.ashearY;\n if (shearMix != 0) {\n var r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n bone.shearY += r * shearMix;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n };\n TransformConstraint.prototype.applyRelativeLocal = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n if (!target.appliedValid)\n target.updateAppliedTransform();\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var rotation = bone.arotation;\n if (rotateMix != 0)\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\n var x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax + this.data.offsetX) * translateMix;\n y += (target.ay + this.data.offsetY) * translateMix;\n }\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix != 0) {\n if (scaleX > 0.00001)\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\n if (scaleY > 0.00001)\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\n }\n var shearY = bone.ashearY;\n if (shearMix != 0)\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n };\n return TransformConstraint;\n }());\n spine.TransformConstraint = TransformConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TransformConstraintData = (function (_super) {\n __extends(TransformConstraintData, _super);\n function TransformConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n _this.rotateMix = 0;\n _this.translateMix = 0;\n _this.scaleMix = 0;\n _this.shearMix = 0;\n _this.offsetRotation = 0;\n _this.offsetX = 0;\n _this.offsetY = 0;\n _this.offsetScaleX = 0;\n _this.offsetScaleY = 0;\n _this.offsetShearY = 0;\n _this.relative = false;\n _this.local = false;\n return _this;\n }\n return TransformConstraintData;\n }(spine.ConstraintData));\n spine.TransformConstraintData = TransformConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Triangulator = (function () {\n function Triangulator() {\n this.convexPolygons = new Array();\n this.convexPolygonsIndices = new Array();\n this.indicesArray = new Array();\n this.isConcaveArray = new Array();\n this.triangles = new Array();\n this.polygonPool = new spine.Pool(function () {\n return new Array();\n });\n this.polygonIndicesPool = new spine.Pool(function () {\n return new Array();\n });\n }\n Triangulator.prototype.triangulate = function (verticesArray) {\n var vertices = verticesArray;\n var vertexCount = verticesArray.length >> 1;\n var indices = this.indicesArray;\n indices.length = 0;\n for (var i = 0; i < vertexCount; i++)\n indices[i] = i;\n var isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (var i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n var triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n var previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer: if (!isConcave[i]) {\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n var v = indices[ii] << 1;\n var vx = vertices[v], vy = vertices[v + 1];\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\n break outer;\n }\n }\n }\n break;\n }\n if (next == 0) {\n do {\n if (!isConcave[i])\n break;\n i--;\n } while (i > 0);\n break;\n }\n previous = i;\n i = next;\n next = (next + 1) % vertexCount;\n }\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\n triangles.push(indices[i]);\n triangles.push(indices[(i + 1) % vertexCount]);\n indices.splice(i, 1);\n isConcave.splice(i, 1);\n vertexCount--;\n var previousIndex = (vertexCount + i - 1) % vertexCount;\n var nextIndex = i == vertexCount ? 0 : i;\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\n }\n if (vertexCount == 3) {\n triangles.push(indices[2]);\n triangles.push(indices[0]);\n triangles.push(indices[1]);\n }\n return triangles;\n };\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\n var vertices = verticesArray;\n var convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n var convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n var polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n var polygon = this.polygonPool.obtain();\n polygon.length = 0;\n var fanBaseIndex = -1, lastWinding = 0;\n for (var i = 0, n = triangles.length; i < n; i += 3) {\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\n var merged = false;\n if (fanBaseIndex == t1) {\n var o = polygon.length - 4;\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\n if (winding1 == lastWinding && winding2 == lastWinding) {\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices.push(t3);\n merged = true;\n }\n }\n if (!merged) {\n if (polygon.length > 0) {\n convexPolygons.push(polygon);\n convexPolygonsIndices.push(polygonIndices);\n }\n else {\n this.polygonPool.free(polygon);\n this.polygonIndicesPool.free(polygonIndices);\n }\n polygon = this.polygonPool.obtain();\n polygon.length = 0;\n polygon.push(x1);\n polygon.push(y1);\n polygon.push(x2);\n polygon.push(y2);\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n polygonIndices.push(t1);\n polygonIndices.push(t2);\n polygonIndices.push(t3);\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\n fanBaseIndex = t1;\n }\n }\n if (polygon.length > 0) {\n convexPolygons.push(polygon);\n convexPolygonsIndices.push(polygonIndices);\n }\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n var firstIndex = polygonIndices[0];\n var lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n var o = polygon.length - 4;\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\n var firstX = polygon[0], firstY = polygon[1];\n var secondX = polygon[2], secondY = polygon[3];\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (var ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n var otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n var otherFirstIndex = otherIndices[0];\n var otherSecondIndex = otherIndices[1];\n var otherLastIndex = otherIndices[2];\n var otherPoly = convexPolygons[ii];\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\n if (winding1 == winding && winding2 == winding) {\n otherPoly.length = 0;\n otherIndices.length = 0;\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices.push(otherLastIndex);\n prevPrevX = prevX;\n prevPrevY = prevY;\n prevX = x3;\n prevY = y3;\n ii = 0;\n }\n }\n }\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\n polygon = convexPolygons[i];\n if (polygon.length == 0) {\n convexPolygons.splice(i, 1);\n this.polygonPool.free(polygon);\n polygonIndices = convexPolygonsIndices[i];\n convexPolygonsIndices.splice(i, 1);\n this.polygonIndicesPool.free(polygonIndices);\n }\n }\n return convexPolygons;\n };\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n var current = indices[index] << 1;\n var next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\n };\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n };\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\n var px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n };\n return Triangulator;\n }());\n spine.Triangulator = Triangulator;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IntSet = (function () {\n function IntSet() {\n this.array = new Array();\n }\n IntSet.prototype.add = function (value) {\n var contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n };\n IntSet.prototype.contains = function (value) {\n return this.array[value | 0] != undefined;\n };\n IntSet.prototype.remove = function (value) {\n this.array[value | 0] = undefined;\n };\n IntSet.prototype.clear = function () {\n this.array.length = 0;\n };\n return IntSet;\n }());\n spine.IntSet = IntSet;\n var Color = (function () {\n function Color(r, g, b, a) {\n if (r === void 0) { r = 0; }\n if (g === void 0) { g = 0; }\n if (b === void 0) { b = 0; }\n if (a === void 0) { a = 0; }\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n Color.prototype.set = function (r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n this.clamp();\n return this;\n };\n Color.prototype.setFromColor = function (c) {\n this.r = c.r;\n this.g = c.g;\n this.b = c.b;\n this.a = c.a;\n return this;\n };\n Color.prototype.setFromString = function (hex) {\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\n return this;\n };\n Color.prototype.add = function (r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n this.clamp();\n return this;\n };\n Color.prototype.clamp = function () {\n if (this.r < 0)\n this.r = 0;\n else if (this.r > 1)\n this.r = 1;\n if (this.g < 0)\n this.g = 0;\n else if (this.g > 1)\n this.g = 1;\n if (this.b < 0)\n this.b = 0;\n else if (this.b > 1)\n this.b = 1;\n if (this.a < 0)\n this.a = 0;\n else if (this.a > 1)\n this.a = 1;\n return this;\n };\n Color.rgba8888ToColor = function (color, value) {\n color.r = ((value & 0xff000000) >>> 24) / 255;\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\n color.a = ((value & 0x000000ff)) / 255;\n };\n Color.rgb888ToColor = function (color, value) {\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\n color.b = ((value & 0x000000ff)) / 255;\n };\n Color.WHITE = new Color(1, 1, 1, 1);\n Color.RED = new Color(1, 0, 0, 1);\n Color.GREEN = new Color(0, 1, 0, 1);\n Color.BLUE = new Color(0, 0, 1, 1);\n Color.MAGENTA = new Color(1, 0, 1, 1);\n return Color;\n }());\n spine.Color = Color;\n var MathUtils = (function () {\n function MathUtils() {\n }\n MathUtils.clamp = function (value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n };\n MathUtils.cosDeg = function (degrees) {\n return Math.cos(degrees * MathUtils.degRad);\n };\n MathUtils.sinDeg = function (degrees) {\n return Math.sin(degrees * MathUtils.degRad);\n };\n MathUtils.signum = function (value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n };\n MathUtils.toInt = function (x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n };\n MathUtils.cbrt = function (x) {\n var y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n };\n MathUtils.randomTriangular = function (min, max) {\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n };\n MathUtils.randomTriangularWith = function (min, max, mode) {\n var u = Math.random();\n var d = max - min;\n if (u <= (mode - min) / d)\n return min + Math.sqrt(u * d * (mode - min));\n return max - Math.sqrt((1 - u) * d * (max - mode));\n };\n MathUtils.PI = 3.1415927;\n MathUtils.PI2 = MathUtils.PI * 2;\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\n MathUtils.radDeg = MathUtils.radiansToDegrees;\n MathUtils.degreesToRadians = MathUtils.PI / 180;\n MathUtils.degRad = MathUtils.degreesToRadians;\n return MathUtils;\n }());\n spine.MathUtils = MathUtils;\n var Interpolation = (function () {\n function Interpolation() {\n }\n Interpolation.prototype.apply = function (start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n };\n return Interpolation;\n }());\n spine.Interpolation = Interpolation;\n var Pow = (function (_super) {\n __extends(Pow, _super);\n function Pow(power) {\n var _this = _super.call(this) || this;\n _this.power = 2;\n _this.power = power;\n return _this;\n }\n Pow.prototype.applyInternal = function (a) {\n if (a <= 0.5)\n return Math.pow(a * 2, this.power) / 2;\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\n };\n return Pow;\n }(Interpolation));\n spine.Pow = Pow;\n var PowOut = (function (_super) {\n __extends(PowOut, _super);\n function PowOut(power) {\n return _super.call(this, power) || this;\n }\n PowOut.prototype.applyInternal = function (a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n };\n return PowOut;\n }(Pow));\n spine.PowOut = PowOut;\n var Utils = (function () {\n function Utils() {\n }\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n };\n Utils.setArraySize = function (array, size, value) {\n if (value === void 0) { value = 0; }\n var oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (var i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n };\n Utils.ensureArrayCapacity = function (array, size, value) {\n if (value === void 0) { value = 0; }\n if (array.length >= size)\n return array;\n return Utils.setArraySize(array, size, value);\n };\n Utils.newArray = function (size, defaultValue) {\n var array = new Array(size);\n for (var i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n };\n Utils.newFloatArray = function (size) {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Float32Array(size);\n }\n else {\n var array = new Array(size);\n for (var i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n };\n Utils.newShortArray = function (size) {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Int16Array(size);\n }\n else {\n var array = new Array(size);\n for (var i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n };\n Utils.toFloatArray = function (array) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n };\n Utils.toSinglePrecision = function (value) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n };\n Utils.webkit602BugfixHelper = function (alpha, blend) {\n };\n Utils.contains = function (array, element, identity) {\n if (identity === void 0) { identity = true; }\n for (var i = 0; i < array.length; i++) {\n if (array[i] == element)\n return true;\n }\n return false;\n };\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\n return Utils;\n }());\n spine.Utils = Utils;\n var DebugUtils = (function () {\n function DebugUtils() {\n }\n DebugUtils.logBones = function (skeleton) {\n for (var i = 0; i < skeleton.bones.length; i++) {\n var bone = skeleton.bones[i];\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\n }\n };\n return DebugUtils;\n }());\n spine.DebugUtils = DebugUtils;\n var Pool = (function () {\n function Pool(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n Pool.prototype.obtain = function () {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n };\n Pool.prototype.free = function (item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n };\n Pool.prototype.freeAll = function (items) {\n for (var i = 0; i < items.length; i++) {\n this.free(items[i]);\n }\n };\n Pool.prototype.clear = function () {\n this.items.length = 0;\n };\n return Pool;\n }());\n spine.Pool = Pool;\n var Vector2 = (function () {\n function Vector2(x, y) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n this.x = x;\n this.y = y;\n }\n Vector2.prototype.set = function (x, y) {\n this.x = x;\n this.y = y;\n return this;\n };\n Vector2.prototype.length = function () {\n var x = this.x;\n var y = this.y;\n return Math.sqrt(x * x + y * y);\n };\n Vector2.prototype.normalize = function () {\n var len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n };\n return Vector2;\n }());\n spine.Vector2 = Vector2;\n var TimeKeeper = (function () {\n function TimeKeeper() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1000;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n TimeKeeper.prototype.update = function () {\n var now = Date.now() / 1000;\n this.delta = now - this.lastTime;\n this.frameTime += this.delta;\n this.totalTime += this.delta;\n if (this.delta > this.maxDelta)\n this.delta = this.maxDelta;\n this.lastTime = now;\n this.frameCount++;\n if (this.frameTime > 1) {\n this.framesPerSecond = this.frameCount / this.frameTime;\n this.frameTime = 0;\n this.frameCount = 0;\n }\n };\n return TimeKeeper;\n }());\n spine.TimeKeeper = TimeKeeper;\n var WindowedMean = (function () {\n function WindowedMean(windowSize) {\n if (windowSize === void 0) { windowSize = 32; }\n this.addedValues = 0;\n this.lastValue = 0;\n this.mean = 0;\n this.dirty = true;\n this.values = new Array(windowSize);\n }\n WindowedMean.prototype.hasEnoughData = function () {\n return this.addedValues >= this.values.length;\n };\n WindowedMean.prototype.addValue = function (value) {\n if (this.addedValues < this.values.length)\n this.addedValues++;\n this.values[this.lastValue++] = value;\n if (this.lastValue > this.values.length - 1)\n this.lastValue = 0;\n this.dirty = true;\n };\n WindowedMean.prototype.getMean = function () {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n var mean = 0;\n for (var i = 0; i < this.values.length; i++) {\n mean += this.values[i];\n }\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n else {\n return 0;\n }\n };\n return WindowedMean;\n }());\n spine.WindowedMean = WindowedMean;\n})(spine || (spine = {}));\n(function () {\n if (!Math.fround) {\n Math.fround = (function (array) {\n return function (x) {\n return array[0] = x, array[0];\n };\n })(new Float32Array(1));\n }\n})();\nvar spine;\n(function (spine) {\n var Attachment = (function () {\n function Attachment(name) {\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n return Attachment;\n }());\n spine.Attachment = Attachment;\n var VertexAttachment = (function (_super) {\n __extends(VertexAttachment, _super);\n function VertexAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\n _this.worldVerticesLength = 0;\n _this.deformAttachment = _this;\n return _this;\n }\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\n count = offset + (count >> 1) * stride;\n var skeleton = slot.bone.skeleton;\n var deformArray = slot.deform;\n var vertices = this.vertices;\n var bones = this.bones;\n if (bones == null) {\n if (deformArray.length > 0)\n vertices = deformArray;\n var bone = slot.bone;\n var x = bone.worldX;\n var y = bone.worldY;\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n var v = 0, skip = 0;\n for (var i = 0; i < start; i += 2) {\n var n = bones[v];\n v += n + 1;\n skip += n;\n }\n var skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (var w = offset, b = skip * 3; w < count; w += stride) {\n var wx = 0, wy = 0;\n var n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n var bone = skeletonBones[bones[v]];\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n else {\n var deform = deformArray;\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n var wx = 0, wy = 0;\n var n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n var bone = skeletonBones[bones[v]];\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n };\n VertexAttachment.prototype.copyTo = function (attachment) {\n if (this.bones != null) {\n attachment.bones = new Array(this.bones.length);\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n }\n else\n attachment.bones = null;\n if (this.vertices != null) {\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n else\n attachment.vertices = null;\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.deformAttachment = this.deformAttachment;\n };\n VertexAttachment.nextID = 0;\n return VertexAttachment;\n }(Attachment));\n spine.VertexAttachment = VertexAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AttachmentType;\n (function (AttachmentType) {\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BoundingBoxAttachment = (function (_super) {\n __extends(BoundingBoxAttachment, _super);\n function BoundingBoxAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n BoundingBoxAttachment.prototype.copy = function () {\n var copy = new BoundingBoxAttachment(name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n };\n return BoundingBoxAttachment;\n }(spine.VertexAttachment));\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var ClippingAttachment = (function (_super) {\n __extends(ClippingAttachment, _super);\n function ClippingAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\n return _this;\n }\n ClippingAttachment.prototype.copy = function () {\n var copy = new ClippingAttachment(name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return ClippingAttachment;\n }(spine.VertexAttachment));\n spine.ClippingAttachment = ClippingAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var MeshAttachment = (function (_super) {\n __extends(MeshAttachment, _super);\n function MeshAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(1, 1, 1, 1);\n _this.tempColor = new spine.Color(0, 0, 0, 0);\n return _this;\n }\n MeshAttachment.prototype.updateUVs = function () {\n var regionUVs = this.regionUVs;\n if (this.uvs == null || this.uvs.length != regionUVs.length)\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\n var uvs = this.uvs;\n var n = this.uvs.length;\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof spine.TextureAtlasRegion) {\n var region = this.region;\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\n switch (region.degrees) {\n case 90:\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\n width = region.originalHeight / textureWidth;\n height = region.originalWidth / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + regionUVs[i + 1] * width;\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\n }\n return;\n case 180:\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\n v -= region.offsetY / textureHeight;\n width = region.originalWidth / textureWidth;\n height = region.originalHeight / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + (1 - regionUVs[i]) * width;\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\n }\n return;\n case 270:\n u -= region.offsetY / textureWidth;\n v -= region.offsetX / textureHeight;\n width = region.originalHeight / textureWidth;\n height = region.originalWidth / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\n uvs[i + 1] = v + regionUVs[i] * height;\n }\n return;\n }\n u -= region.offsetX / textureWidth;\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\n width = region.originalWidth / textureWidth;\n height = region.originalHeight / textureHeight;\n }\n else if (this.region == null) {\n u = v = 0;\n width = height = 1;\n }\n else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + regionUVs[i] * width;\n uvs[i + 1] = v + regionUVs[i + 1] * height;\n }\n };\n MeshAttachment.prototype.getParentMesh = function () {\n return this.parentMesh;\n };\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh != null) {\n this.bones = parentMesh.bones;\n this.vertices = parentMesh.vertices;\n this.worldVerticesLength = parentMesh.worldVerticesLength;\n this.regionUVs = parentMesh.regionUVs;\n this.triangles = parentMesh.triangles;\n this.hullLength = parentMesh.hullLength;\n this.worldVerticesLength = parentMesh.worldVerticesLength;\n }\n };\n MeshAttachment.prototype.copy = function () {\n if (this.parentMesh != null)\n return this.newLinkedMesh();\n var copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n if (this.edges != null) {\n copy.edges = new Array(this.edges.length);\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\n }\n copy.width = this.width;\n copy.height = this.height;\n return copy;\n };\n MeshAttachment.prototype.newLinkedMesh = function () {\n var copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n copy.deformAttachment = this.deformAttachment;\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\n copy.updateUVs();\n return copy;\n };\n return MeshAttachment;\n }(spine.VertexAttachment));\n spine.MeshAttachment = MeshAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathAttachment = (function (_super) {\n __extends(PathAttachment, _super);\n function PathAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.closed = false;\n _this.constantSpeed = false;\n _this.color = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n PathAttachment.prototype.copy = function () {\n var copy = new PathAttachment(name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\n copy.closed = closed;\n copy.constantSpeed = this.constantSpeed;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return PathAttachment;\n }(spine.VertexAttachment));\n spine.PathAttachment = PathAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PointAttachment = (function (_super) {\n __extends(PointAttachment, _super);\n function PointAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\n return _this;\n }\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\n return point;\n };\n PointAttachment.prototype.computeWorldRotation = function (bone) {\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\n var x = cos * bone.a + sin * bone.b;\n var y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\n };\n PointAttachment.prototype.copy = function () {\n var copy = new PointAttachment(name);\n copy.x = this.x;\n copy.y = this.y;\n copy.rotation = this.rotation;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return PointAttachment;\n }(spine.VertexAttachment));\n spine.PointAttachment = PointAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var RegionAttachment = (function (_super) {\n __extends(RegionAttachment, _super);\n function RegionAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.x = 0;\n _this.y = 0;\n _this.scaleX = 1;\n _this.scaleY = 1;\n _this.rotation = 0;\n _this.width = 0;\n _this.height = 0;\n _this.color = new spine.Color(1, 1, 1, 1);\n _this.offset = spine.Utils.newFloatArray(8);\n _this.uvs = spine.Utils.newFloatArray(8);\n _this.tempColor = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n RegionAttachment.prototype.updateOffset = function () {\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n var localX2 = localX + this.region.width * regionScaleX;\n var localY2 = localY + this.region.height * regionScaleY;\n var radians = this.rotation * Math.PI / 180;\n var cos = Math.cos(radians);\n var sin = Math.sin(radians);\n var localXCos = localX * cos + this.x;\n var localXSin = localX * sin;\n var localYCos = localY * cos + this.y;\n var localYSin = localY * sin;\n var localX2Cos = localX2 * cos + this.x;\n var localX2Sin = localX2 * sin;\n var localY2Cos = localY2 * cos + this.y;\n var localY2Sin = localY2 * sin;\n var offset = this.offset;\n offset[RegionAttachment.OX1] = localXCos - localYSin;\n offset[RegionAttachment.OY1] = localYCos + localXSin;\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\n };\n RegionAttachment.prototype.setRegion = function (region) {\n this.region = region;\n var uvs = this.uvs;\n if (region.rotate) {\n uvs[2] = region.u;\n uvs[3] = region.v2;\n uvs[4] = region.u;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v;\n uvs[0] = region.u2;\n uvs[1] = region.v2;\n }\n else {\n uvs[0] = region.u;\n uvs[1] = region.v2;\n uvs[2] = region.u;\n uvs[3] = region.v;\n uvs[4] = region.u2;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v2;\n }\n };\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\n var vertexOffset = this.offset;\n var x = bone.worldX, y = bone.worldY;\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[RegionAttachment.OX1];\n offsetY = vertexOffset[RegionAttachment.OY1];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX2];\n offsetY = vertexOffset[RegionAttachment.OY2];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX3];\n offsetY = vertexOffset[RegionAttachment.OY3];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX4];\n offsetY = vertexOffset[RegionAttachment.OY4];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n };\n RegionAttachment.prototype.copy = function () {\n var copy = new RegionAttachment(this.name);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\n copy.path = this.path;\n copy.x = this.x;\n copy.y = this.y;\n copy.scaleX = this.scaleX;\n copy.scaleY = this.scaleY;\n copy.rotation = this.rotation;\n copy.width = this.width;\n copy.height = this.height;\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n return copy;\n };\n RegionAttachment.OX1 = 0;\n RegionAttachment.OY1 = 1;\n RegionAttachment.OX2 = 2;\n RegionAttachment.OY2 = 3;\n RegionAttachment.OX3 = 4;\n RegionAttachment.OY3 = 5;\n RegionAttachment.OX4 = 6;\n RegionAttachment.OY4 = 7;\n RegionAttachment.X1 = 0;\n RegionAttachment.Y1 = 1;\n RegionAttachment.C1R = 2;\n RegionAttachment.C1G = 3;\n RegionAttachment.C1B = 4;\n RegionAttachment.C1A = 5;\n RegionAttachment.U1 = 6;\n RegionAttachment.V1 = 7;\n RegionAttachment.X2 = 8;\n RegionAttachment.Y2 = 9;\n RegionAttachment.C2R = 10;\n RegionAttachment.C2G = 11;\n RegionAttachment.C2B = 12;\n RegionAttachment.C2A = 13;\n RegionAttachment.U2 = 14;\n RegionAttachment.V2 = 15;\n RegionAttachment.X3 = 16;\n RegionAttachment.Y3 = 17;\n RegionAttachment.C3R = 18;\n RegionAttachment.C3G = 19;\n RegionAttachment.C3B = 20;\n RegionAttachment.C3A = 21;\n RegionAttachment.U3 = 22;\n RegionAttachment.V3 = 23;\n RegionAttachment.X4 = 24;\n RegionAttachment.Y4 = 25;\n RegionAttachment.C4R = 26;\n RegionAttachment.C4G = 27;\n RegionAttachment.C4B = 28;\n RegionAttachment.C4A = 29;\n RegionAttachment.U4 = 30;\n RegionAttachment.V4 = 31;\n return RegionAttachment;\n }(spine.Attachment));\n spine.RegionAttachment = RegionAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var JitterEffect = (function () {\n function JitterEffect(jitterX, jitterY) {\n this.jitterX = 0;\n this.jitterY = 0;\n this.jitterX = jitterX;\n this.jitterY = jitterY;\n }\n JitterEffect.prototype.begin = function (skeleton) {\n };\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n };\n JitterEffect.prototype.end = function () {\n };\n return JitterEffect;\n }());\n spine.JitterEffect = JitterEffect;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SwirlEffect = (function () {\n function SwirlEffect(radius) {\n this.centerX = 0;\n this.centerY = 0;\n this.radius = 0;\n this.angle = 0;\n this.worldX = 0;\n this.worldY = 0;\n this.radius = radius;\n }\n SwirlEffect.prototype.begin = function (skeleton) {\n this.worldX = skeleton.x + this.centerX;\n this.worldY = skeleton.y + this.centerY;\n };\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\n var x = position.x - this.worldX;\n var y = position.y - this.worldY;\n var dist = Math.sqrt(x * x + y * y);\n if (dist < this.radius) {\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\n var cos = Math.cos(theta);\n var sin = Math.sin(theta);\n position.x = cos * x - sin * y + this.worldX;\n position.y = sin * x + cos * y + this.worldY;\n }\n };\n SwirlEffect.prototype.end = function () {\n };\n SwirlEffect.interpolation = new spine.PowOut(2);\n return SwirlEffect;\n }());\n spine.SwirlEffect = SwirlEffect;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var AssetManager = (function (_super) {\n __extends(AssetManager, _super);\n function AssetManager(pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\n }\n return AssetManager;\n }(spine.AssetManager));\n canvas.AssetManager = AssetManager;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var CanvasTexture = (function (_super) {\n __extends(CanvasTexture, _super);\n function CanvasTexture(image) {\n return _super.call(this, image) || this;\n }\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\n CanvasTexture.prototype.dispose = function () { };\n return CanvasTexture;\n }(spine.Texture));\n canvas.CanvasTexture = CanvasTexture;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var SkeletonRenderer = (function () {\n function SkeletonRenderer(context) {\n this.triangleRendering = false;\n this.debugRendering = false;\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\n this.tempColor = new spine.Color();\n this.ctx = context;\n }\n SkeletonRenderer.prototype.draw = function (skeleton) {\n if (this.triangleRendering)\n this.drawTriangles(skeleton);\n else\n this.drawImages(skeleton);\n };\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\n var ctx = this.ctx;\n var drawOrder = skeleton.drawOrder;\n if (this.debugRendering)\n ctx.strokeStyle = \"green\";\n ctx.save();\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n var regionAttachment = null;\n var region = null;\n var image = null;\n if (attachment instanceof spine.RegionAttachment) {\n regionAttachment = attachment;\n region = regionAttachment.region;\n image = region.texture.getImage();\n }\n else\n continue;\n var skeleton_1 = slot.bone.skeleton;\n var skeletonColor = skeleton_1.color;\n var slotColor = slot.color;\n var regionColor = regionAttachment.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\n var att = attachment;\n var bone = slot.bone;\n var w = region.width;\n var h = region.height;\n ctx.save();\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\n ctx.translate(attachment.offset[0], attachment.offset[1]);\n ctx.rotate(attachment.rotation * Math.PI / 180);\n var atlasScale = att.width / w;\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\n ctx.translate(w / 2, h / 2);\n if (attachment.region.rotate) {\n var t = w;\n w = h;\n h = t;\n ctx.rotate(-Math.PI / 2);\n }\n ctx.scale(1, -1);\n ctx.translate(-w / 2, -h / 2);\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\n ctx.globalAlpha = color.a;\n }\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\n if (this.debugRendering)\n ctx.strokeRect(0, 0, w, h);\n ctx.restore();\n }\n ctx.restore();\n };\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\n var blendMode = null;\n var vertices = this.vertices;\n var triangles = null;\n var drawOrder = skeleton.drawOrder;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n var attachment = slot.getAttachment();\n var texture = null;\n var region = null;\n if (attachment instanceof spine.RegionAttachment) {\n var regionAttachment = attachment;\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\n region = regionAttachment.region;\n texture = region.texture.getImage();\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n vertices = this.computeMeshVertices(slot, mesh, false);\n triangles = mesh.triangles;\n texture = mesh.region.renderObject.texture.getImage();\n }\n else\n continue;\n if (texture != null) {\n var slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n }\n var skeleton_2 = slot.bone.skeleton;\n var skeletonColor = skeleton_2.color;\n var slotColor = slot.color;\n var attachmentColor = attachment.color;\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\n var ctx = this.ctx;\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\n ctx.globalAlpha = color.a;\n }\n for (var j = 0; j < triangles.length; j += 3) {\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\n if (this.debugRendering) {\n ctx.strokeStyle = \"green\";\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.lineTo(x0, y0);\n ctx.stroke();\n }\n }\n }\n }\n this.ctx.globalAlpha = 1;\n };\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\n var ctx = this.ctx;\n u0 *= img.width;\n v0 *= img.height;\n u1 *= img.width;\n v1 *= img.height;\n u2 *= img.width;\n v2 *= img.height;\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.closePath();\n x1 -= x0;\n y1 -= y0;\n x2 -= x0;\n y2 -= y0;\n u1 -= u0;\n v1 -= v0;\n u2 -= u0;\n v2 -= v0;\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\n ctx.save();\n ctx.transform(a, b, c, d, e, f);\n ctx.clip();\n ctx.drawImage(img, 0, 0);\n ctx.restore();\n };\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\n var skeleton = slot.bone.skeleton;\n var skeletonColor = skeleton.color;\n var slotColor = slot.color;\n var regionColor = region.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var multiplier = pma ? alpha : 1;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\n var vertices = this.vertices;\n var uvs = region.uvs;\n vertices[spine.RegionAttachment.C1R] = color.r;\n vertices[spine.RegionAttachment.C1G] = color.g;\n vertices[spine.RegionAttachment.C1B] = color.b;\n vertices[spine.RegionAttachment.C1A] = color.a;\n vertices[spine.RegionAttachment.U1] = uvs[0];\n vertices[spine.RegionAttachment.V1] = uvs[1];\n vertices[spine.RegionAttachment.C2R] = color.r;\n vertices[spine.RegionAttachment.C2G] = color.g;\n vertices[spine.RegionAttachment.C2B] = color.b;\n vertices[spine.RegionAttachment.C2A] = color.a;\n vertices[spine.RegionAttachment.U2] = uvs[2];\n vertices[spine.RegionAttachment.V2] = uvs[3];\n vertices[spine.RegionAttachment.C3R] = color.r;\n vertices[spine.RegionAttachment.C3G] = color.g;\n vertices[spine.RegionAttachment.C3B] = color.b;\n vertices[spine.RegionAttachment.C3A] = color.a;\n vertices[spine.RegionAttachment.U3] = uvs[4];\n vertices[spine.RegionAttachment.V3] = uvs[5];\n vertices[spine.RegionAttachment.C4R] = color.r;\n vertices[spine.RegionAttachment.C4G] = color.g;\n vertices[spine.RegionAttachment.C4B] = color.b;\n vertices[spine.RegionAttachment.C4A] = color.a;\n vertices[spine.RegionAttachment.U4] = uvs[6];\n vertices[spine.RegionAttachment.V4] = uvs[7];\n return vertices;\n };\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\n var skeleton = slot.bone.skeleton;\n var skeletonColor = skeleton.color;\n var slotColor = slot.color;\n var regionColor = mesh.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var multiplier = pma ? alpha : 1;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\n var numVertices = mesh.worldVerticesLength / 2;\n if (this.vertices.length < mesh.worldVerticesLength) {\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\n }\n var vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\n var uvs = mesh.uvs;\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\n vertices[v++] = color.r;\n vertices[v++] = color.g;\n vertices[v++] = color.b;\n vertices[v++] = color.a;\n vertices[v++] = uvs[u++];\n vertices[v++] = uvs[u++];\n v += 2;\n }\n return vertices;\n };\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\n return SkeletonRenderer;\n }());\n canvas.SkeletonRenderer = SkeletonRenderer;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var AssetManager = (function (_super) {\n __extends(AssetManager, _super);\n function AssetManager(context, pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n return _super.call(this, function (image) {\n return new spine.webgl.GLTexture(context, image);\n }, pathPrefix) || this;\n }\n return AssetManager;\n }(spine.AssetManager));\n webgl.AssetManager = AssetManager;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var OrthoCamera = (function () {\n function OrthoCamera(viewportWidth, viewportHeight) {\n this.position = new webgl.Vector3(0, 0, 0);\n this.direction = new webgl.Vector3(0, 0, -1);\n this.up = new webgl.Vector3(0, 1, 0);\n this.near = 0;\n this.far = 100;\n this.zoom = 1;\n this.viewportWidth = 0;\n this.viewportHeight = 0;\n this.projectionView = new webgl.Matrix4();\n this.inverseProjectionView = new webgl.Matrix4();\n this.projection = new webgl.Matrix4();\n this.view = new webgl.Matrix4();\n this.tmp = new webgl.Vector3();\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n this.update();\n }\n OrthoCamera.prototype.update = function () {\n var projection = this.projection;\n var view = this.view;\n var projectionView = this.projectionView;\n var inverseProjectionView = this.inverseProjectionView;\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\n view.lookAt(this.position, this.direction, this.up);\n projectionView.set(projection.values);\n projectionView.multiply(view);\n inverseProjectionView.set(projectionView.values).invert();\n };\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\n var tmp = this.tmp;\n tmp.x = (2 * x) / screenWidth - 1;\n tmp.y = (2 * y) / screenHeight - 1;\n tmp.z = (2 * screenCoords.z) - 1;\n tmp.project(this.inverseProjectionView);\n screenCoords.set(tmp.x, tmp.y, tmp.z);\n return screenCoords;\n };\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n };\n return OrthoCamera;\n }());\n webgl.OrthoCamera = OrthoCamera;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var GLTexture = (function (_super) {\n __extends(GLTexture, _super);\n function GLTexture(context, image, useMipMaps) {\n if (useMipMaps === void 0) { useMipMaps = false; }\n var _this = _super.call(this, image) || this;\n _this.texture = null;\n _this.boundUnit = 0;\n _this.useMipMaps = false;\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n _this.useMipMaps = useMipMaps;\n _this.restore();\n _this.context.addRestorable(_this);\n return _this;\n }\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\n var gl = this.context.gl;\n this.bind();\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\n };\n GLTexture.validateMagFilter = function (magFilter) {\n switch (magFilter) {\n case spine.TextureFilter.MipMap:\n case spine.TextureFilter.MipMapLinearLinear:\n case spine.TextureFilter.MipMapLinearNearest:\n case spine.TextureFilter.MipMapNearestLinear:\n case spine.TextureFilter.MipMapNearestNearest:\n return spine.TextureFilter.Linear;\n default:\n return magFilter;\n }\n };\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\n var gl = this.context.gl;\n this.bind();\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\n };\n GLTexture.prototype.update = function (useMipMaps) {\n var gl = this.context.gl;\n if (!this.texture) {\n this.texture = this.context.gl.createTexture();\n }\n this.bind();\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n if (useMipMaps)\n gl.generateMipmap(gl.TEXTURE_2D);\n };\n GLTexture.prototype.restore = function () {\n this.texture = null;\n this.update(this.useMipMaps);\n };\n GLTexture.prototype.bind = function (unit) {\n if (unit === void 0) { unit = 0; }\n var gl = this.context.gl;\n this.boundUnit = unit;\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n };\n GLTexture.prototype.unbind = function () {\n var gl = this.context.gl;\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\n gl.bindTexture(gl.TEXTURE_2D, null);\n };\n GLTexture.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n gl.deleteTexture(this.texture);\n };\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\n return GLTexture;\n }(spine.Texture));\n webgl.GLTexture = GLTexture;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n webgl.M00 = 0;\n webgl.M01 = 4;\n webgl.M02 = 8;\n webgl.M03 = 12;\n webgl.M10 = 1;\n webgl.M11 = 5;\n webgl.M12 = 9;\n webgl.M13 = 13;\n webgl.M20 = 2;\n webgl.M21 = 6;\n webgl.M22 = 10;\n webgl.M23 = 14;\n webgl.M30 = 3;\n webgl.M31 = 7;\n webgl.M32 = 11;\n webgl.M33 = 15;\n var Matrix4 = (function () {\n function Matrix4() {\n this.temp = new Float32Array(16);\n this.values = new Float32Array(16);\n var v = this.values;\n v[webgl.M00] = 1;\n v[webgl.M11] = 1;\n v[webgl.M22] = 1;\n v[webgl.M33] = 1;\n }\n Matrix4.prototype.set = function (values) {\n this.values.set(values);\n return this;\n };\n Matrix4.prototype.transpose = function () {\n var t = this.temp;\n var v = this.values;\n t[webgl.M00] = v[webgl.M00];\n t[webgl.M01] = v[webgl.M10];\n t[webgl.M02] = v[webgl.M20];\n t[webgl.M03] = v[webgl.M30];\n t[webgl.M10] = v[webgl.M01];\n t[webgl.M11] = v[webgl.M11];\n t[webgl.M12] = v[webgl.M21];\n t[webgl.M13] = v[webgl.M31];\n t[webgl.M20] = v[webgl.M02];\n t[webgl.M21] = v[webgl.M12];\n t[webgl.M22] = v[webgl.M22];\n t[webgl.M23] = v[webgl.M32];\n t[webgl.M30] = v[webgl.M03];\n t[webgl.M31] = v[webgl.M13];\n t[webgl.M32] = v[webgl.M23];\n t[webgl.M33] = v[webgl.M33];\n return this.set(t);\n };\n Matrix4.prototype.identity = function () {\n var v = this.values;\n v[webgl.M00] = 1;\n v[webgl.M01] = 0;\n v[webgl.M02] = 0;\n v[webgl.M03] = 0;\n v[webgl.M10] = 0;\n v[webgl.M11] = 1;\n v[webgl.M12] = 0;\n v[webgl.M13] = 0;\n v[webgl.M20] = 0;\n v[webgl.M21] = 0;\n v[webgl.M22] = 1;\n v[webgl.M23] = 0;\n v[webgl.M30] = 0;\n v[webgl.M31] = 0;\n v[webgl.M32] = 0;\n v[webgl.M33] = 1;\n return this;\n };\n Matrix4.prototype.invert = function () {\n var v = this.values;\n var t = this.temp;\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n if (l_det == 0)\n throw new Error(\"non-invertible matrix\");\n var inv_det = 1.0 / l_det;\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\n v[webgl.M00] = t[webgl.M00] * inv_det;\n v[webgl.M01] = t[webgl.M01] * inv_det;\n v[webgl.M02] = t[webgl.M02] * inv_det;\n v[webgl.M03] = t[webgl.M03] * inv_det;\n v[webgl.M10] = t[webgl.M10] * inv_det;\n v[webgl.M11] = t[webgl.M11] * inv_det;\n v[webgl.M12] = t[webgl.M12] * inv_det;\n v[webgl.M13] = t[webgl.M13] * inv_det;\n v[webgl.M20] = t[webgl.M20] * inv_det;\n v[webgl.M21] = t[webgl.M21] * inv_det;\n v[webgl.M22] = t[webgl.M22] * inv_det;\n v[webgl.M23] = t[webgl.M23] * inv_det;\n v[webgl.M30] = t[webgl.M30] * inv_det;\n v[webgl.M31] = t[webgl.M31] * inv_det;\n v[webgl.M32] = t[webgl.M32] * inv_det;\n v[webgl.M33] = t[webgl.M33] * inv_det;\n return this;\n };\n Matrix4.prototype.determinant = function () {\n var v = this.values;\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n };\n Matrix4.prototype.translate = function (x, y, z) {\n var v = this.values;\n v[webgl.M03] += x;\n v[webgl.M13] += y;\n v[webgl.M23] += z;\n return this;\n };\n Matrix4.prototype.copy = function () {\n return new Matrix4().set(this.values);\n };\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\n this.identity();\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\n var l_a1 = (far + near) / (near - far);\n var l_a2 = (2 * far * near) / (near - far);\n var v = this.values;\n v[webgl.M00] = l_fd / aspectRatio;\n v[webgl.M10] = 0;\n v[webgl.M20] = 0;\n v[webgl.M30] = 0;\n v[webgl.M01] = 0;\n v[webgl.M11] = l_fd;\n v[webgl.M21] = 0;\n v[webgl.M31] = 0;\n v[webgl.M02] = 0;\n v[webgl.M12] = 0;\n v[webgl.M22] = l_a1;\n v[webgl.M32] = -1;\n v[webgl.M03] = 0;\n v[webgl.M13] = 0;\n v[webgl.M23] = l_a2;\n v[webgl.M33] = 0;\n return this;\n };\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\n return this.ortho(x, x + width, y, y + height, 0, 1);\n };\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\n this.identity();\n var x_orth = 2 / (right - left);\n var y_orth = 2 / (top - bottom);\n var z_orth = -2 / (far - near);\n var tx = -(right + left) / (right - left);\n var ty = -(top + bottom) / (top - bottom);\n var tz = -(far + near) / (far - near);\n var v = this.values;\n v[webgl.M00] = x_orth;\n v[webgl.M10] = 0;\n v[webgl.M20] = 0;\n v[webgl.M30] = 0;\n v[webgl.M01] = 0;\n v[webgl.M11] = y_orth;\n v[webgl.M21] = 0;\n v[webgl.M31] = 0;\n v[webgl.M02] = 0;\n v[webgl.M12] = 0;\n v[webgl.M22] = z_orth;\n v[webgl.M32] = 0;\n v[webgl.M03] = tx;\n v[webgl.M13] = ty;\n v[webgl.M23] = tz;\n v[webgl.M33] = 1;\n return this;\n };\n Matrix4.prototype.multiply = function (matrix) {\n var t = this.temp;\n var v = this.values;\n var m = matrix.values;\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\n return this.set(this.temp);\n };\n Matrix4.prototype.multiplyLeft = function (matrix) {\n var t = this.temp;\n var v = this.values;\n var m = matrix.values;\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\n return this.set(this.temp);\n };\n Matrix4.prototype.lookAt = function (position, direction, up) {\n Matrix4.initTemps();\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\n zAxis.setFrom(direction).normalize();\n xAxis.setFrom(direction).normalize();\n xAxis.cross(up).normalize();\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\n this.identity();\n var val = this.values;\n val[webgl.M00] = xAxis.x;\n val[webgl.M01] = xAxis.y;\n val[webgl.M02] = xAxis.z;\n val[webgl.M10] = yAxis.x;\n val[webgl.M11] = yAxis.y;\n val[webgl.M12] = yAxis.z;\n val[webgl.M20] = -zAxis.x;\n val[webgl.M21] = -zAxis.y;\n val[webgl.M22] = -zAxis.z;\n Matrix4.tmpMatrix.identity();\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\n this.multiply(Matrix4.tmpMatrix);\n return this;\n };\n Matrix4.initTemps = function () {\n if (Matrix4.xAxis === null)\n Matrix4.xAxis = new webgl.Vector3();\n if (Matrix4.yAxis === null)\n Matrix4.yAxis = new webgl.Vector3();\n if (Matrix4.zAxis === null)\n Matrix4.zAxis = new webgl.Vector3();\n };\n Matrix4.xAxis = null;\n Matrix4.yAxis = null;\n Matrix4.zAxis = null;\n Matrix4.tmpMatrix = new Matrix4();\n return Matrix4;\n }());\n webgl.Matrix4 = Matrix4;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Mesh = (function () {\n function Mesh(context, attributes, maxVertices, maxIndices) {\n this.attributes = attributes;\n this.verticesLength = 0;\n this.dirtyVertices = false;\n this.indicesLength = 0;\n this.dirtyIndices = false;\n this.elementsPerVertex = 0;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.elementsPerVertex = 0;\n for (var i = 0; i < attributes.length; i++) {\n this.elementsPerVertex += attributes[i].numElements;\n }\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\n this.indices = new Uint16Array(maxIndices);\n this.context.addRestorable(this);\n }\n Mesh.prototype.getAttributes = function () { return this.attributes; };\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\n Mesh.prototype.setVerticesLength = function (length) {\n this.dirtyVertices = true;\n this.verticesLength = length;\n };\n Mesh.prototype.getVertices = function () { return this.vertices; };\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\n Mesh.prototype.setIndicesLength = function (length) {\n this.dirtyIndices = true;\n this.indicesLength = length;\n };\n Mesh.prototype.getIndices = function () { return this.indices; };\n ;\n Mesh.prototype.getVertexSizeInFloats = function () {\n var size = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n var attribute = this.attributes[i];\n size += attribute.numElements;\n }\n return size;\n };\n Mesh.prototype.setVertices = function (vertices) {\n this.dirtyVertices = true;\n if (vertices.length > this.vertices.length)\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\n this.vertices.set(vertices, 0);\n this.verticesLength = vertices.length;\n };\n Mesh.prototype.setIndices = function (indices) {\n this.dirtyIndices = true;\n if (indices.length > this.indices.length)\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\n this.indices.set(indices, 0);\n this.indicesLength = indices.length;\n };\n Mesh.prototype.draw = function (shader, primitiveType) {\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\n };\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\n var gl = this.context.gl;\n if (this.dirtyVertices || this.dirtyIndices)\n this.update();\n this.bind(shader);\n if (this.indicesLength > 0) {\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\n }\n else {\n gl.drawArrays(primitiveType, offset, count);\n }\n this.unbind(shader);\n };\n Mesh.prototype.bind = function (shader) {\n var gl = this.context.gl;\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n var offset = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n var attrib = this.attributes[i];\n var location_1 = shader.getAttributeLocation(attrib.name);\n gl.enableVertexAttribArray(location_1);\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\n offset += attrib.numElements;\n }\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n };\n Mesh.prototype.unbind = function (shader) {\n var gl = this.context.gl;\n for (var i = 0; i < this.attributes.length; i++) {\n var attrib = this.attributes[i];\n var location_2 = shader.getAttributeLocation(attrib.name);\n gl.disableVertexAttribArray(location_2);\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\n };\n Mesh.prototype.update = function () {\n var gl = this.context.gl;\n if (this.dirtyVertices) {\n if (!this.verticesBuffer) {\n this.verticesBuffer = gl.createBuffer();\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\n this.dirtyVertices = false;\n }\n if (this.dirtyIndices) {\n if (!this.indicesBuffer) {\n this.indicesBuffer = gl.createBuffer();\n }\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\n this.dirtyIndices = false;\n }\n };\n Mesh.prototype.restore = function () {\n this.verticesBuffer = null;\n this.indicesBuffer = null;\n this.update();\n };\n Mesh.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n gl.deleteBuffer(this.verticesBuffer);\n gl.deleteBuffer(this.indicesBuffer);\n };\n return Mesh;\n }());\n webgl.Mesh = Mesh;\n var VertexAttribute = (function () {\n function VertexAttribute(name, type, numElements) {\n this.name = name;\n this.type = type;\n this.numElements = numElements;\n }\n return VertexAttribute;\n }());\n webgl.VertexAttribute = VertexAttribute;\n var Position2Attribute = (function (_super) {\n __extends(Position2Attribute, _super);\n function Position2Attribute() {\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\n }\n return Position2Attribute;\n }(VertexAttribute));\n webgl.Position2Attribute = Position2Attribute;\n var Position3Attribute = (function (_super) {\n __extends(Position3Attribute, _super);\n function Position3Attribute() {\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\n }\n return Position3Attribute;\n }(VertexAttribute));\n webgl.Position3Attribute = Position3Attribute;\n var TexCoordAttribute = (function (_super) {\n __extends(TexCoordAttribute, _super);\n function TexCoordAttribute(unit) {\n if (unit === void 0) { unit = 0; }\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\n }\n return TexCoordAttribute;\n }(VertexAttribute));\n webgl.TexCoordAttribute = TexCoordAttribute;\n var ColorAttribute = (function (_super) {\n __extends(ColorAttribute, _super);\n function ColorAttribute() {\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\n }\n return ColorAttribute;\n }(VertexAttribute));\n webgl.ColorAttribute = ColorAttribute;\n var Color2Attribute = (function (_super) {\n __extends(Color2Attribute, _super);\n function Color2Attribute() {\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\n }\n return Color2Attribute;\n }(VertexAttribute));\n webgl.Color2Attribute = Color2Attribute;\n var VertexAttributeType;\n (function (VertexAttributeType) {\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var PolygonBatcher = (function () {\n function PolygonBatcher(context, twoColorTint, maxVertices) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n if (maxVertices === void 0) { maxVertices = 10920; }\n this.isDrawing = false;\n this.shader = null;\n this.lastTexture = null;\n this.verticesLength = 0;\n this.indicesLength = 0;\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n var attributes = twoColorTint ?\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\n this.srcBlend = this.context.gl.SRC_ALPHA;\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\n }\n PolygonBatcher.prototype.begin = function (shader) {\n var gl = this.context.gl;\n if (this.isDrawing)\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\n this.drawCalls = 0;\n this.shader = shader;\n this.lastTexture = null;\n this.isDrawing = true;\n gl.enable(gl.BLEND);\n gl.blendFunc(this.srcBlend, this.dstBlend);\n };\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\n var gl = this.context.gl;\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n };\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\n if (texture != this.lastTexture) {\n this.flush();\n this.lastTexture = texture;\n }\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\n this.flush();\n }\n var indexStart = this.mesh.numVertices();\n this.mesh.getVertices().set(vertices, this.verticesLength);\n this.verticesLength += vertices.length;\n this.mesh.setVerticesLength(this.verticesLength);\n var indicesArray = this.mesh.getIndices();\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\n indicesArray[i] = indices[j] + indexStart;\n this.indicesLength += indices.length;\n this.mesh.setIndicesLength(this.indicesLength);\n };\n PolygonBatcher.prototype.flush = function () {\n var gl = this.context.gl;\n if (this.verticesLength == 0)\n return;\n this.lastTexture.bind();\n this.mesh.draw(this.shader, gl.TRIANGLES);\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.mesh.setVerticesLength(0);\n this.mesh.setIndicesLength(0);\n this.drawCalls++;\n };\n PolygonBatcher.prototype.end = function () {\n var gl = this.context.gl;\n if (!this.isDrawing)\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\n if (this.verticesLength > 0 || this.indicesLength > 0)\n this.flush();\n this.shader = null;\n this.lastTexture = null;\n this.isDrawing = false;\n gl.disable(gl.BLEND);\n };\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\n PolygonBatcher.prototype.dispose = function () {\n this.mesh.dispose();\n };\n return PolygonBatcher;\n }());\n webgl.PolygonBatcher = PolygonBatcher;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var SceneRenderer = (function () {\n function SceneRenderer(canvas, context, twoColorTint) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n this.twoColorTint = false;\n this.activeRenderer = null;\n this.QUAD = [\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n ];\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n this.WHITE = new spine.Color(1, 1, 1, 1);\n this.canvas = canvas;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.twoColorTint = twoColorTint;\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\n this.shapesShader = webgl.Shader.newColored(this.context);\n this.shapes = new webgl.ShapeRenderer(this.context);\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\n }\n SceneRenderer.prototype.begin = function () {\n this.camera.update();\n this.enableRenderer(this.batcher);\n };\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\n this.enableRenderer(this.batcher);\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\n };\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n if (ignoredBones === void 0) { ignoredBones = null; }\n this.enableRenderer(this.shapes);\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\n };\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u;\n quad[i++] = v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u2;\n quad[i++] = v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u2;\n quad[i++] = v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u;\n quad[i++] = v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\n if (color === void 0) { color = null; }\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var worldOriginX = x + pivotX;\n var worldOriginY = y + pivotY;\n var fx = -pivotX;\n var fy = -pivotY;\n var fx2 = width - pivotX;\n var fy2 = height - pivotY;\n var p1x = fx;\n var p1y = fy;\n var p2x = fx;\n var p2y = fy2;\n var p3x = fx2;\n var p3y = fy2;\n var p4x = fx2;\n var p4y = fy;\n var x1 = 0;\n var y1 = 0;\n var x2 = 0;\n var y2 = 0;\n var x3 = 0;\n var y3 = 0;\n var x4 = 0;\n var y4 = 0;\n if (angle != 0) {\n var cos = spine.MathUtils.cosDeg(angle);\n var sin = spine.MathUtils.sinDeg(angle);\n x1 = cos * p1x - sin * p1y;\n y1 = sin * p1x + cos * p1y;\n x4 = cos * p2x - sin * p2y;\n y4 = sin * p2x + cos * p2y;\n x3 = cos * p3x - sin * p3y;\n y3 = sin * p3x + cos * p3y;\n x2 = x3 + (x1 - x4);\n y2 = y3 + (y1 - y4);\n }\n else {\n x1 = p1x;\n y1 = p1y;\n x4 = p2x;\n y4 = p2y;\n x3 = p3x;\n y3 = p3y;\n x2 = p4x;\n y2 = p4y;\n }\n x1 += worldOriginX;\n y1 += worldOriginY;\n x2 += worldOriginX;\n y2 += worldOriginY;\n x3 += worldOriginX;\n y3 += worldOriginY;\n x4 += worldOriginX;\n y4 += worldOriginY;\n var i = 0;\n quad[i++] = x1;\n quad[i++] = y1;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x2;\n quad[i++] = y2;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x3;\n quad[i++] = y3;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x4;\n quad[i++] = y4;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\n if (color === void 0) { color = null; }\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u;\n quad[i++] = region.v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u2;\n quad[i++] = region.v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u2;\n quad[i++] = region.v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u;\n quad[i++] = region.v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.line(x, y, x2, y2, color);\n };\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\n };\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n if (color4 === void 0) { color4 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\n };\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.rect(filled, x, y, width, height, color);\n };\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\n };\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.polygon(polygonVertices, offset, count, color);\n };\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\n if (color === void 0) { color = null; }\n if (segments === void 0) { segments = 0; }\n this.enableRenderer(this.shapes);\n this.shapes.circle(filled, x, y, radius, color, segments);\n };\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\n };\n SceneRenderer.prototype.end = function () {\n if (this.activeRenderer === this.batcher)\n this.batcher.end();\n else if (this.activeRenderer === this.shapes)\n this.shapes.end();\n this.activeRenderer = null;\n };\n SceneRenderer.prototype.resize = function (resizeMode) {\n var canvas = this.canvas;\n var w = canvas.clientWidth;\n var h = canvas.clientHeight;\n if (canvas.width != w || canvas.height != h) {\n canvas.width = w;\n canvas.height = h;\n }\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\n if (resizeMode === ResizeMode.Stretch) {\n }\n else if (resizeMode === ResizeMode.Expand) {\n this.camera.setViewport(w, h);\n }\n else if (resizeMode === ResizeMode.Fit) {\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\n var targetRatio = targetHeight / targetWidth;\n var sourceRatio = sourceHeight / sourceWidth;\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\n this.camera.viewportWidth = sourceWidth * scale;\n this.camera.viewportHeight = sourceHeight * scale;\n }\n this.camera.update();\n };\n SceneRenderer.prototype.enableRenderer = function (renderer) {\n if (this.activeRenderer === renderer)\n return;\n this.end();\n if (renderer instanceof webgl.PolygonBatcher) {\n this.batcherShader.bind();\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.batcherShader.setUniformi(\"u_texture\", 0);\n this.batcher.begin(this.batcherShader);\n this.activeRenderer = this.batcher;\n }\n else if (renderer instanceof webgl.ShapeRenderer) {\n this.shapesShader.bind();\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.shapes.begin(this.shapesShader);\n this.activeRenderer = this.shapes;\n }\n else {\n this.activeRenderer = this.skeletonDebugRenderer;\n }\n };\n SceneRenderer.prototype.dispose = function () {\n this.batcher.dispose();\n this.batcherShader.dispose();\n this.shapes.dispose();\n this.shapesShader.dispose();\n this.skeletonDebugRenderer.dispose();\n };\n return SceneRenderer;\n }());\n webgl.SceneRenderer = SceneRenderer;\n var ResizeMode;\n (function (ResizeMode) {\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Shader = (function () {\n function Shader(context, vertexShader, fragmentShader) {\n this.vertexShader = vertexShader;\n this.fragmentShader = fragmentShader;\n this.vs = null;\n this.fs = null;\n this.program = null;\n this.tmp2x2 = new Float32Array(2 * 2);\n this.tmp3x3 = new Float32Array(3 * 3);\n this.tmp4x4 = new Float32Array(4 * 4);\n this.vsSource = vertexShader;\n this.fsSource = fragmentShader;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.context.addRestorable(this);\n this.compile();\n }\n Shader.prototype.getProgram = function () { return this.program; };\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\n Shader.prototype.compile = function () {\n var gl = this.context.gl;\n try {\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\n this.program = this.compileProgram(this.vs, this.fs);\n }\n catch (e) {\n this.dispose();\n throw e;\n }\n };\n Shader.prototype.compileShader = function (type, source) {\n var gl = this.context.gl;\n var shader = gl.createShader(type);\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n if (!gl.isContextLost())\n throw new Error(error);\n }\n return shader;\n };\n Shader.prototype.compileProgram = function (vs, fs) {\n var gl = this.context.gl;\n var program = gl.createProgram();\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n if (!gl.isContextLost())\n throw new Error(error);\n }\n return program;\n };\n Shader.prototype.restore = function () {\n this.compile();\n };\n Shader.prototype.bind = function () {\n this.context.gl.useProgram(this.program);\n };\n Shader.prototype.unbind = function () {\n this.context.gl.useProgram(null);\n };\n Shader.prototype.setUniformi = function (uniform, value) {\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\n };\n Shader.prototype.setUniformf = function (uniform, value) {\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\n };\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\n };\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\n };\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\n };\n Shader.prototype.setUniform2x2f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp2x2.set(value);\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\n };\n Shader.prototype.setUniform3x3f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp3x3.set(value);\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\n };\n Shader.prototype.setUniform4x4f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp4x4.set(value);\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\n };\n Shader.prototype.getUniformLocation = function (uniform) {\n var gl = this.context.gl;\n var location = gl.getUniformLocation(this.program, uniform);\n if (!location && !gl.isContextLost())\n throw new Error(\"Couldn't find location for uniform \" + uniform);\n return location;\n };\n Shader.prototype.getAttributeLocation = function (attribute) {\n var gl = this.context.gl;\n var location = gl.getAttribLocation(this.program, attribute);\n if (location == -1 && !gl.isContextLost())\n throw new Error(\"Couldn't find location for attribute \" + attribute);\n return location;\n };\n Shader.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n if (this.vs) {\n gl.deleteShader(this.vs);\n this.vs = null;\n }\n if (this.fs) {\n gl.deleteShader(this.fs);\n this.fs = null;\n }\n if (this.program) {\n gl.deleteProgram(this.program);\n this.program = null;\n }\n };\n Shader.newColoredTextured = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.newTwoColoredTextured = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_dark = \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.newColored = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.MVP_MATRIX = \"u_projTrans\";\n Shader.POSITION = \"a_position\";\n Shader.COLOR = \"a_color\";\n Shader.COLOR2 = \"a_color2\";\n Shader.TEXCOORDS = \"a_texCoords\";\n Shader.SAMPLER = \"u_texture\";\n return Shader;\n }());\n webgl.Shader = Shader;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var ShapeRenderer = (function () {\n function ShapeRenderer(context, maxVertices) {\n if (maxVertices === void 0) { maxVertices = 10920; }\n this.isDrawing = false;\n this.shapeType = ShapeType.Filled;\n this.color = new spine.Color(1, 1, 1, 1);\n this.vertexIndex = 0;\n this.tmp = new spine.Vector2();\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\n this.srcBlend = this.context.gl.SRC_ALPHA;\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\n }\n ShapeRenderer.prototype.begin = function (shader) {\n if (this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has already been called\");\n this.shader = shader;\n this.vertexIndex = 0;\n this.isDrawing = true;\n var gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFunc(this.srcBlend, this.dstBlend);\n };\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\n var gl = this.context.gl;\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n };\n ShapeRenderer.prototype.setColor = function (color) {\n this.color.setFromColor(color);\n };\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\n this.color.set(r, g, b, a);\n };\n ShapeRenderer.prototype.point = function (x, y, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Point, 1);\n if (color === null)\n color = this.color;\n this.vertex(x, y, color);\n };\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Line, 2);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n this.vertex(x, y, color);\n this.vertex(x2, y2, color);\n };\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n if (color2 === null)\n color2 = this.color;\n if (color3 === null)\n color3 = this.color;\n if (filled) {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n }\n else {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x2, y2, color);\n this.vertex(x3, y3, color2);\n this.vertex(x3, y3, color);\n this.vertex(x, y, color2);\n }\n };\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n if (color4 === void 0) { color4 = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n if (color2 === null)\n color2 = this.color;\n if (color3 === null)\n color3 = this.color;\n if (color4 === null)\n color4 = this.color;\n if (filled) {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n this.vertex(x3, y3, color3);\n this.vertex(x4, y4, color4);\n this.vertex(x, y, color);\n }\n else {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n this.vertex(x3, y3, color3);\n this.vertex(x4, y4, color4);\n this.vertex(x4, y4, color4);\n this.vertex(x, y, color);\n }\n };\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\n };\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\n if (color === void 0) { color = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\n if (color === null)\n color = this.color;\n var t = this.tmp.set(y2 - y1, x1 - x2);\n t.normalize();\n width *= 0.5;\n var tx = t.x * width;\n var ty = t.y * width;\n if (!filled) {\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n }\n else {\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n }\n };\n ShapeRenderer.prototype.x = function (x, y, size) {\n this.line(x - size, y - size, x + size, y + size);\n this.line(x - size, y + size, x + size, y - size);\n };\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\n if (color === void 0) { color = null; }\n if (count < 3)\n throw new Error(\"Polygon must contain at least 3 vertices\");\n this.check(ShapeType.Line, count * 2);\n if (color === null)\n color = this.color;\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n offset <<= 1;\n count <<= 1;\n var firstX = polygonVertices[offset];\n var firstY = polygonVertices[offset + 1];\n var last = offset + count;\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\n var x1 = polygonVertices[i];\n var y1 = polygonVertices[i + 1];\n var x2 = 0;\n var y2 = 0;\n if (i + 2 >= last) {\n x2 = firstX;\n y2 = firstY;\n }\n else {\n x2 = polygonVertices[i + 2];\n y2 = polygonVertices[i + 3];\n }\n this.vertex(x1, y1, color);\n this.vertex(x2, y2, color);\n }\n };\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\n if (color === void 0) { color = null; }\n if (segments === void 0) { segments = 0; }\n if (segments === 0)\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\n if (segments <= 0)\n throw new Error(\"segments must be > 0.\");\n if (color === null)\n color = this.color;\n var angle = 2 * spine.MathUtils.PI / segments;\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n var cx = radius, cy = 0;\n if (!filled) {\n this.check(ShapeType.Line, segments * 2 + 2);\n for (var i = 0; i < segments; i++) {\n this.vertex(x + cx, y + cy, color);\n var temp_1 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp_1 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x + cx, y + cy, color);\n }\n else {\n this.check(ShapeType.Filled, segments * 3 + 3);\n segments--;\n for (var i = 0; i < segments; i++) {\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n var temp_2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp_2 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n }\n var temp = cx;\n cx = radius;\n cy = 0;\n this.vertex(x + cx, y + cy, color);\n };\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Line, segments * 2 + 2);\n if (color === null)\n color = this.color;\n var subdiv_step = 1 / segments;\n var subdiv_step2 = subdiv_step * subdiv_step;\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\n var pre1 = 3 * subdiv_step;\n var pre2 = 3 * subdiv_step2;\n var pre4 = 6 * subdiv_step2;\n var pre5 = 6 * subdiv_step3;\n var tmp1x = x1 - cx1 * 2 + cx2;\n var tmp1y = y1 - cy1 * 2 + cy2;\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\n var fx = x1;\n var fy = y1;\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\n var dddfx = tmp2x * pre5;\n var dddfy = tmp2y * pre5;\n while (segments-- > 0) {\n this.vertex(fx, fy, color);\n fx += dfx;\n fy += dfy;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n this.vertex(fx, fy, color);\n }\n this.vertex(fx, fy, color);\n this.vertex(x2, y2, color);\n };\n ShapeRenderer.prototype.vertex = function (x, y, color) {\n var idx = this.vertexIndex;\n var vertices = this.mesh.getVertices();\n vertices[idx++] = x;\n vertices[idx++] = y;\n vertices[idx++] = color.r;\n vertices[idx++] = color.g;\n vertices[idx++] = color.b;\n vertices[idx++] = color.a;\n this.vertexIndex = idx;\n };\n ShapeRenderer.prototype.end = function () {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n this.flush();\n this.context.gl.disable(this.context.gl.BLEND);\n this.isDrawing = false;\n };\n ShapeRenderer.prototype.flush = function () {\n if (this.vertexIndex == 0)\n return;\n this.mesh.setVerticesLength(this.vertexIndex);\n this.mesh.draw(this.shader, this.shapeType);\n this.vertexIndex = 0;\n };\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n if (this.shapeType == shapeType) {\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\n this.flush();\n else\n return;\n }\n else {\n this.flush();\n this.shapeType = shapeType;\n }\n };\n ShapeRenderer.prototype.dispose = function () {\n this.mesh.dispose();\n };\n return ShapeRenderer;\n }());\n webgl.ShapeRenderer = ShapeRenderer;\n var ShapeType;\n (function (ShapeType) {\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var SkeletonDebugRenderer = (function () {\n function SkeletonDebugRenderer(context) {\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\n this.drawBones = true;\n this.drawRegionAttachments = true;\n this.drawBoundingBoxes = true;\n this.drawMeshHull = true;\n this.drawMeshTriangles = true;\n this.drawPaths = true;\n this.drawSkeletonXY = false;\n this.drawClipping = true;\n this.premultipliedAlpha = false;\n this.scale = 1;\n this.boneWidth = 2;\n this.bounds = new spine.SkeletonBounds();\n this.temp = new Array();\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n }\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\n if (ignoredBones === void 0) { ignoredBones = null; }\n var skeletonX = skeleton.x;\n var skeletonY = skeleton.y;\n var gl = this.context.gl;\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\n var bones = skeleton.bones;\n if (this.drawBones) {\n shapes.setColor(this.boneLineColor);\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n if (bone.parent == null)\n continue;\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\n }\n if (this.drawSkeletonXY)\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\n }\n if (this.drawRegionAttachments) {\n shapes.setColor(this.attachmentLineColor);\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.RegionAttachment) {\n var regionAttachment = attachment;\n var vertices = this.vertices;\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\n }\n }\n }\n if (this.drawMeshHull || this.drawMeshTriangles) {\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.MeshAttachment))\n continue;\n var mesh = attachment;\n var vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\n var triangles = mesh.triangles;\n var hullLength = mesh.hullLength;\n if (this.drawMeshTriangles) {\n shapes.setColor(this.triangleLineColor);\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\n }\n }\n if (this.drawMeshHull && hullLength > 0) {\n shapes.setColor(this.attachmentLineColor);\n hullLength = (hullLength >> 1) * 2;\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\n var x = vertices[ii], y = vertices[ii + 1];\n shapes.line(x, y, lastX, lastY);\n lastX = x;\n lastY = y;\n }\n }\n }\n }\n if (this.drawBoundingBoxes) {\n var bounds = this.bounds;\n bounds.update(skeleton, true);\n shapes.setColor(this.aabbColor);\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\n var polygons = bounds.polygons;\n var boxes = bounds.boundingBoxes;\n for (var i = 0, n = polygons.length; i < n; i++) {\n var polygon = polygons[i];\n shapes.setColor(boxes[i].color);\n shapes.polygon(polygon, 0, polygon.length);\n }\n }\n if (this.drawPaths) {\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.PathAttachment))\n continue;\n var path = attachment;\n var nn = path.worldVerticesLength;\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\n var color = this.pathColor;\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\n if (path.closed) {\n shapes.setColor(color);\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\n x2 = world[nn - 4];\n y2 = world[nn - 3];\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\n shapes.line(x1, y1, cx1, cy1);\n shapes.line(x2, y2, cx2, cy2);\n }\n nn -= 4;\n for (var ii = 4; ii < nn; ii += 6) {\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\n x2 = world[ii + 4];\n y2 = world[ii + 5];\n shapes.setColor(color);\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\n shapes.line(x1, y1, cx1, cy1);\n shapes.line(x2, y2, cx2, cy2);\n x1 = x2;\n y1 = y2;\n }\n }\n }\n if (this.drawBones) {\n shapes.setColor(this.boneOriginColor);\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\n }\n }\n if (this.drawClipping) {\n var slots = skeleton.slots;\n shapes.setColor(this.clipColor);\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.ClippingAttachment))\n continue;\n var clip = attachment;\n var nn = clip.worldVerticesLength;\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\n var x = world[i_17];\n var y = world[i_17 + 1];\n var x2 = world[(i_17 + 2) % world.length];\n var y2 = world[(i_17 + 3) % world.length];\n shapes.line(x, y, x2, y2);\n }\n }\n }\n };\n SkeletonDebugRenderer.prototype.dispose = function () {\n };\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\n return SkeletonDebugRenderer;\n }());\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Renderable = (function () {\n function Renderable(vertices, numVertices, numFloats) {\n this.vertices = vertices;\n this.numVertices = numVertices;\n this.numFloats = numFloats;\n }\n return Renderable;\n }());\n ;\n var SkeletonRenderer = (function () {\n function SkeletonRenderer(context, twoColorTint) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n this.premultipliedAlpha = false;\n this.vertexEffect = null;\n this.tempColor = new spine.Color();\n this.tempColor2 = new spine.Color();\n this.vertexSize = 2 + 2 + 4;\n this.twoColorTint = false;\n this.renderable = new Renderable(null, 0, 0);\n this.clipper = new spine.SkeletonClipping();\n this.temp = new spine.Vector2();\n this.temp2 = new spine.Vector2();\n this.temp3 = new spine.Color();\n this.temp4 = new spine.Color();\n this.twoColorTint = twoColorTint;\n if (twoColorTint)\n this.vertexSize += 4;\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\n }\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\n var clipper = this.clipper;\n var premultipliedAlpha = this.premultipliedAlpha;\n var twoColorTint = this.twoColorTint;\n var blendMode = null;\n var tempPos = this.temp;\n var tempUv = this.temp2;\n var tempLight = this.temp3;\n var tempDark = this.temp4;\n var renderable = this.renderable;\n var uvs = null;\n var triangles = null;\n var drawOrder = skeleton.drawOrder;\n var attachmentColor = null;\n var skeletonColor = skeleton.color;\n var vertexSize = twoColorTint ? 12 : 8;\n var inRange = false;\n if (slotRangeStart == -1)\n inRange = true;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\n var slot = drawOrder[i];\n if (!slot.bone.active) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\n inRange = true;\n }\n if (!inRange) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\n inRange = false;\n }\n var attachment = slot.getAttachment();\n var texture = null;\n if (attachment instanceof spine.RegionAttachment) {\n var region = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = 4;\n renderable.numFloats = clippedVertexSize << 2;\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\n uvs = region.uvs;\n texture = region.region.renderObject.texture;\n attachmentColor = region.color;\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\n if (renderable.numFloats > renderable.vertices.length) {\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\n }\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\n triangles = mesh.triangles;\n texture = mesh.region.renderObject.texture;\n uvs = mesh.uvs;\n attachmentColor = mesh.color;\n }\n else if (attachment instanceof spine.ClippingAttachment) {\n var clip = (attachment);\n clipper.clipStart(slot, clip);\n continue;\n }\n else {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (texture != null) {\n var slotColor = slot.color;\n var finalColor = this.tempColor;\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\n if (premultipliedAlpha) {\n finalColor.r *= finalColor.a;\n finalColor.g *= finalColor.a;\n finalColor.b *= finalColor.a;\n }\n var darkColor = this.tempColor2;\n if (slot.darkColor == null)\n darkColor.set(0, 0, 0, 1.0);\n else {\n if (premultipliedAlpha) {\n darkColor.r = slot.darkColor.r * finalColor.a;\n darkColor.g = slot.darkColor.g * finalColor.a;\n darkColor.b = slot.darkColor.b * finalColor.a;\n }\n else {\n darkColor.setFromColor(slot.darkColor);\n }\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\n }\n var slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\n }\n if (clipper.isClipping()) {\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\n var clippedVertices = new Float32Array(clipper.clippedVertices);\n var clippedTriangles = clipper.clippedTriangles;\n if (this.vertexEffect != null) {\n var vertexEffect = this.vertexEffect;\n var verts = clippedVertices;\n if (!twoColorTint) {\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\n tempUv.x = verts[v + 6];\n tempUv.y = verts[v + 7];\n tempDark.set(0, 0, 0, 0);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n }\n }\n else {\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\n tempUv.x = verts[v + 6];\n tempUv.y = verts[v + 7];\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n verts[v + 8] = tempDark.r;\n verts[v + 9] = tempDark.g;\n verts[v + 10] = tempDark.b;\n verts[v + 11] = tempDark.a;\n }\n }\n }\n batcher.draw(texture, clippedVertices, clippedTriangles);\n }\n else {\n var verts = renderable.vertices;\n if (this.vertexEffect != null) {\n var vertexEffect = this.vertexEffect;\n if (!twoColorTint) {\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempUv.x = uvs[u];\n tempUv.y = uvs[u + 1];\n tempLight.setFromColor(finalColor);\n tempDark.set(0, 0, 0, 0);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n }\n }\n else {\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempUv.x = uvs[u];\n tempUv.y = uvs[u + 1];\n tempLight.setFromColor(finalColor);\n tempDark.setFromColor(darkColor);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n verts[v + 8] = tempDark.r;\n verts[v + 9] = tempDark.g;\n verts[v + 10] = tempDark.b;\n verts[v + 11] = tempDark.a;\n }\n }\n }\n else {\n if (!twoColorTint) {\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\n verts[v] = finalColor.r;\n verts[v + 1] = finalColor.g;\n verts[v + 2] = finalColor.b;\n verts[v + 3] = finalColor.a;\n verts[v + 4] = uvs[u];\n verts[v + 5] = uvs[u + 1];\n }\n }\n else {\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\n verts[v] = finalColor.r;\n verts[v + 1] = finalColor.g;\n verts[v + 2] = finalColor.b;\n verts[v + 3] = finalColor.a;\n verts[v + 4] = uvs[u];\n verts[v + 5] = uvs[u + 1];\n verts[v + 6] = darkColor.r;\n verts[v + 7] = darkColor.g;\n verts[v + 8] = darkColor.b;\n verts[v + 9] = darkColor.a;\n }\n }\n }\n var view = renderable.vertices.subarray(0, renderable.numFloats);\n batcher.draw(texture, view, triangles);\n }\n }\n clipper.clipEndWithSlot(slot);\n }\n clipper.clipEnd();\n };\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n return SkeletonRenderer;\n }());\n webgl.SkeletonRenderer = SkeletonRenderer;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Vector3 = (function () {\n function Vector3(x, y, z) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n if (z === void 0) { z = 0; }\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.x = x;\n this.y = y;\n this.z = z;\n }\n Vector3.prototype.setFrom = function (v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n };\n Vector3.prototype.set = function (x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n };\n Vector3.prototype.add = function (v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n return this;\n };\n Vector3.prototype.sub = function (v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n return this;\n };\n Vector3.prototype.scale = function (s) {\n this.x *= s;\n this.y *= s;\n this.z *= s;\n return this;\n };\n Vector3.prototype.normalize = function () {\n var len = this.length();\n if (len == 0)\n return this;\n len = 1 / len;\n this.x *= len;\n this.y *= len;\n this.z *= len;\n return this;\n };\n Vector3.prototype.cross = function (v) {\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\n };\n Vector3.prototype.multiply = function (matrix) {\n var l_mat = matrix.values;\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\n };\n Vector3.prototype.project = function (matrix) {\n var l_mat = matrix.values;\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\n };\n Vector3.prototype.dot = function (v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n };\n Vector3.prototype.length = function () {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n };\n Vector3.prototype.distance = function (v) {\n var a = v.x - this.x;\n var b = v.y - this.y;\n var c = v.z - this.z;\n return Math.sqrt(a * a + b * b + c * c);\n };\n return Vector3;\n }());\n webgl.Vector3 = Vector3;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var ManagedWebGLRenderingContext = (function () {\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\n var _this = this;\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\n this.restorables = new Array();\n if (canvasOrContext instanceof HTMLCanvasElement) {\n var canvas_1 = canvasOrContext;\n this.gl = (canvas_1.getContext(\"webgl2\", contextConfig) || canvas_1.getContext(\"webgl\", contextConfig));\n this.canvas = canvas_1;\n canvas_1.addEventListener(\"webglcontextlost\", function (e) {\n var event = e;\n if (e) {\n e.preventDefault();\n }\n });\n canvas_1.addEventListener(\"webglcontextrestored\", function (e) {\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\n _this.restorables[i].restore();\n }\n });\n }\n else {\n this.gl = canvasOrContext;\n this.canvas = this.gl.canvas;\n }\n }\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\n this.restorables.push(restorable);\n };\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\n var index = this.restorables.indexOf(restorable);\n if (index > -1)\n this.restorables.splice(index, 1);\n };\n return ManagedWebGLRenderingContext;\n }());\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\n var WebGLBlendModeConverter = (function () {\n function WebGLBlendModeConverter() {\n }\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\n switch (blendMode) {\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n };\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n switch (blendMode) {\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n };\n WebGLBlendModeConverter.ZERO = 0;\n WebGLBlendModeConverter.ONE = 1;\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\n return WebGLBlendModeConverter;\n }());\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\n//# sourceMappingURL=spine-both.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///D:/wamp/www/phaser/node_modules/eventemitter3/index.js","webpack:///D:/wamp/www/phaser/src/core/events/BLUR_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/BOOT_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/CONTEXT_LOST_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/FOCUS_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/HIDDEN_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/PAUSE_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/POST_RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/POST_STEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/PRE_RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/PRE_STEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/READY_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/RESUME_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/STEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/VISIBLE_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/index.js","webpack:///D:/wamp/www/phaser/src/data/DataManager.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/SET_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/index.js","webpack:///D:/wamp/www/phaser/src/display/color/GetColorFromValue.js","webpack:///D:/wamp/www/phaser/src/display/mask/BitmapMask.js","webpack:///D:/wamp/www/phaser/src/display/mask/GeometryMask.js","webpack:///D:/wamp/www/phaser/src/gameobjects/BuildGameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/GameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Alpha.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/AlphaSingle.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/BlendMode.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ComputedSize.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Crop.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Depth.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Flip.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/GetBounds.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Mask.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Origin.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/PathFollower.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Pipeline.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ScrollFactor.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Size.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Texture.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/TextureCrop.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Tint.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ToJSON.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Transform.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/TransformMatrix.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Visible.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/index.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/Container.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/ContainerRender.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/index.js","webpack:///D:/wamp/www/phaser/src/geom/const.js","webpack:///D:/wamp/www/phaser/src/geom/line/GetPoint.js","webpack:///D:/wamp/www/phaser/src/geom/line/GetPoints.js","webpack:///D:/wamp/www/phaser/src/geom/line/Length.js","webpack:///D:/wamp/www/phaser/src/geom/line/Line.js","webpack:///D:/wamp/www/phaser/src/geom/line/Random.js","webpack:///D:/wamp/www/phaser/src/geom/point/Point.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Contains.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/GetPoint.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/GetPoints.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Perimeter.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Random.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Rectangle.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Union.js","webpack:///D:/wamp/www/phaser/src/loader/File.js","webpack:///D:/wamp/www/phaser/src/loader/FileTypesManager.js","webpack:///D:/wamp/www/phaser/src/loader/GetURL.js","webpack:///D:/wamp/www/phaser/src/loader/MergeXHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/MultiFile.js","webpack:///D:/wamp/www/phaser/src/loader/XHRLoader.js","webpack:///D:/wamp/www/phaser/src/loader/XHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/const.js","webpack:///D:/wamp/www/phaser/src/loader/events/ADD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/index.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/ImageFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/JSONFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/TextFile.js","webpack:///D:/wamp/www/phaser/src/math/Average.js","webpack:///D:/wamp/www/phaser/src/math/Bernstein.js","webpack:///D:/wamp/www/phaser/src/math/Between.js","webpack:///D:/wamp/www/phaser/src/math/CatmullRom.js","webpack:///D:/wamp/www/phaser/src/math/CeilTo.js","webpack:///D:/wamp/www/phaser/src/math/Clamp.js","webpack:///D:/wamp/www/phaser/src/math/DegToRad.js","webpack:///D:/wamp/www/phaser/src/math/Difference.js","webpack:///D:/wamp/www/phaser/src/math/Factorial.js","webpack:///D:/wamp/www/phaser/src/math/FloatBetween.js","webpack:///D:/wamp/www/phaser/src/math/FloorTo.js","webpack:///D:/wamp/www/phaser/src/math/FromPercent.js","webpack:///D:/wamp/www/phaser/src/math/GetSpeed.js","webpack:///D:/wamp/www/phaser/src/math/IsEven.js","webpack:///D:/wamp/www/phaser/src/math/IsEvenStrict.js","webpack:///D:/wamp/www/phaser/src/math/Linear.js","webpack:///D:/wamp/www/phaser/src/math/Matrix3.js","webpack:///D:/wamp/www/phaser/src/math/Matrix4.js","webpack:///D:/wamp/www/phaser/src/math/MaxAdd.js","webpack:///D:/wamp/www/phaser/src/math/MinSub.js","webpack:///D:/wamp/www/phaser/src/math/Percent.js","webpack:///D:/wamp/www/phaser/src/math/Quaternion.js","webpack:///D:/wamp/www/phaser/src/math/RadToDeg.js","webpack:///D:/wamp/www/phaser/src/math/RandomXY.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZ.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZW.js","webpack:///D:/wamp/www/phaser/src/math/Rotate.js","webpack:///D:/wamp/www/phaser/src/math/RotateAround.js","webpack:///D:/wamp/www/phaser/src/math/RotateAroundDistance.js","webpack:///D:/wamp/www/phaser/src/math/RotateTo.js","webpack:///D:/wamp/www/phaser/src/math/RotateVec3.js","webpack:///D:/wamp/www/phaser/src/math/RoundAwayFromZero.js","webpack:///D:/wamp/www/phaser/src/math/RoundTo.js","webpack:///D:/wamp/www/phaser/src/math/SinCosTableGenerator.js","webpack:///D:/wamp/www/phaser/src/math/SmoothStep.js","webpack:///D:/wamp/www/phaser/src/math/SmootherStep.js","webpack:///D:/wamp/www/phaser/src/math/ToXY.js","webpack:///D:/wamp/www/phaser/src/math/TransformXY.js","webpack:///D:/wamp/www/phaser/src/math/Vector2.js","webpack:///D:/wamp/www/phaser/src/math/Vector3.js","webpack:///D:/wamp/www/phaser/src/math/Vector4.js","webpack:///D:/wamp/www/phaser/src/math/Within.js","webpack:///D:/wamp/www/phaser/src/math/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/Between.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPoints.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPointsY.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenY.js","webpack:///D:/wamp/www/phaser/src/math/angle/CounterClockwise.js","webpack:///D:/wamp/www/phaser/src/math/angle/Normalize.js","webpack:///D:/wamp/www/phaser/src/math/angle/Random.js","webpack:///D:/wamp/www/phaser/src/math/angle/RandomDegrees.js","webpack:///D:/wamp/www/phaser/src/math/angle/Reverse.js","webpack:///D:/wamp/www/phaser/src/math/angle/RotateTo.js","webpack:///D:/wamp/www/phaser/src/math/angle/ShortestBetween.js","webpack:///D:/wamp/www/phaser/src/math/angle/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/WrapDegrees.js","webpack:///D:/wamp/www/phaser/src/math/angle/index.js","webpack:///D:/wamp/www/phaser/src/math/const.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetween.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceChebyshev.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistancePower.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceSnake.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceSquared.js","webpack:///D:/wamp/www/phaser/src/math/distance/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/Linear.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/Stepped.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/index.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Ceil.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Equal.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Floor.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/GreaterThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/LessThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/index.js","webpack:///D:/wamp/www/phaser/src/math/index.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/BezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/LinearInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/index.js","webpack:///D:/wamp/www/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/index.js","webpack:///D:/wamp/www/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapCeil.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapFloor.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapTo.js","webpack:///D:/wamp/www/phaser/src/math/snap/index.js","webpack:///D:/wamp/www/phaser/src/plugins/BasePlugin.js","webpack:///D:/wamp/www/phaser/src/plugins/ScenePlugin.js","webpack:///D:/wamp/www/phaser/src/renderer/BlendModes.js","webpack:///D:/wamp/www/phaser/src/renderer/webgl/pipelines/const.js","webpack:///D:/wamp/www/phaser/src/scale/events/RESIZE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/BOOT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/CREATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PAUSE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/READY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RESUME_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SLEEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/index.js","webpack:///D:/wamp/www/phaser/src/tweens/builders/GetBoolean.js","webpack:///D:/wamp/www/phaser/src/tweens/tween/const.js","webpack:///D:/wamp/www/phaser/src/utils/Class.js","webpack:///D:/wamp/www/phaser/src/utils/NOOP.js","webpack:///D:/wamp/www/phaser/src/utils/array/Add.js","webpack:///D:/wamp/www/phaser/src/utils/array/AddAt.js","webpack:///D:/wamp/www/phaser/src/utils/array/BringToTop.js","webpack:///D:/wamp/www/phaser/src/utils/array/CountAllMatching.js","webpack:///D:/wamp/www/phaser/src/utils/array/Each.js","webpack:///D:/wamp/www/phaser/src/utils/array/EachInRange.js","webpack:///D:/wamp/www/phaser/src/utils/array/FindClosestInSorted.js","webpack:///D:/wamp/www/phaser/src/utils/array/GetAll.js","webpack:///D:/wamp/www/phaser/src/utils/array/GetFirst.js","webpack:///D:/wamp/www/phaser/src/utils/array/GetRandom.js","webpack:///D:/wamp/www/phaser/src/utils/array/MoveDown.js","webpack:///D:/wamp/www/phaser/src/utils/array/MoveTo.js","webpack:///D:/wamp/www/phaser/src/utils/array/MoveUp.js","webpack:///D:/wamp/www/phaser/src/utils/array/NumberArray.js","webpack:///D:/wamp/www/phaser/src/utils/array/NumberArrayStep.js","webpack:///D:/wamp/www/phaser/src/utils/array/QuickSelect.js","webpack:///D:/wamp/www/phaser/src/utils/array/Range.js","webpack:///D:/wamp/www/phaser/src/utils/array/Remove.js","webpack:///D:/wamp/www/phaser/src/utils/array/RemoveAt.js","webpack:///D:/wamp/www/phaser/src/utils/array/RemoveBetween.js","webpack:///D:/wamp/www/phaser/src/utils/array/RemoveRandomElement.js","webpack:///D:/wamp/www/phaser/src/utils/array/Replace.js","webpack:///D:/wamp/www/phaser/src/utils/array/RotateLeft.js","webpack:///D:/wamp/www/phaser/src/utils/array/RotateRight.js","webpack:///D:/wamp/www/phaser/src/utils/array/SafeRange.js","webpack:///D:/wamp/www/phaser/src/utils/array/SendToBack.js","webpack:///D:/wamp/www/phaser/src/utils/array/SetAll.js","webpack:///D:/wamp/www/phaser/src/utils/array/Shuffle.js","webpack:///D:/wamp/www/phaser/src/utils/array/SortByDigits.js","webpack:///D:/wamp/www/phaser/src/utils/array/SpliceOne.js","webpack:///D:/wamp/www/phaser/src/utils/array/StableSort.js","webpack:///D:/wamp/www/phaser/src/utils/array/Swap.js","webpack:///D:/wamp/www/phaser/src/utils/array/index.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/MatrixToString.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/ReverseRows.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/Rotate180.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/RotateLeft.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/RotateRight.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/index.js","webpack:///D:/wamp/www/phaser/src/utils/object/Extend.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetAdvancedValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetFastValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/IsPlainObject.js","webpack:///D:/wamp/www/phaser/src/utils/string/Pad.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-both.js"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAyD,OAAO;AAChE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,YAAY;AAC3B;;AAEA;AACA,2DAA2D;AAC3D,+DAA+D;AAC/D,mEAAmE;AACnE,uEAAuE;AACvE;AACA,0DAA0D,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2DAA2D,YAAY;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;AC/UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,4DAAc;AAChC,UAAU,mBAAO,CAAC,4DAAc;AAChC,kBAAkB,mBAAO,CAAC,4EAAsB;AAChD,sBAAsB,mBAAO,CAAC,oFAA0B;AACxD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,WAAW,mBAAO,CAAC,8DAAe;AAClC,YAAY,mBAAO,CAAC,gEAAgB;AACpC,WAAW,mBAAO,CAAC,8DAAe;AAClC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,eAAe,mBAAO,CAAC,sEAAmB;AAC1C,gBAAgB,mBAAO,CAAC,wEAAoB;AAC5C,cAAc,mBAAO,CAAC,oEAAkB;AACxC,WAAW,mBAAO,CAAC,8DAAe;AAClC,YAAY,mBAAO,CAAC,gEAAgB;AACpC,UAAU,mBAAO,CAAC,4DAAc;AAChC,aAAa,mBAAO,CAAC,kEAAiB;;AAEtC;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;;AAE/B;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2DAA2D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,sCAAsC,kBAAkB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5rBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4DAAmB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC9RA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,4BAA4B;AACvC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC,6BAA6B;;AAE9D;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC,WAAW,0CAA0C;AACrD;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,iBAAiB,WAAW,KAAK,SAAS;;AAE1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB,KAAK,gBAAgB;;AAExD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,iBAAiB,cAAc,KAAK,UAAU;;AAE9C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2DAA2D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,mCAAmC;AAClD,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC;AACxD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3tBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sEAA2B;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,0CAA0C,uBAAuB;;AAEjE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AChWA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;;AAE5D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,qBAAqB;;AAE7D;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC5IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,SAAS;AACvC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,uDAAuD;AAClF;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,uGAAuG;AACtH;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uGAAuG,WAAW;AACjI,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,aAAa;AAChD,oCAAoC,aAAa;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,qBAAqB,mBAAO,CAAC,4FAAsC;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iCAAiC,sCAAsC;;AAEvE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,oBAAoB;;AAEtD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACzMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,8FAAuC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACrUA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,gDAAgD;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,oCAAoC;AACtE,mCAAmC,sCAAsC;;AAEzE;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,QAAQ,mDAAmD;AAC3D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;;AAE3E;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E,yCAAyC,sCAAsC;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,sBAAsB,sCAAsC;;AAE5D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACxkBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,qDAAqD;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,kCAAkC,UAAU,cAAc;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACr/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,eAAe,mBAAO,CAAC,qEAAa;AACpC,qBAAqB,mBAAO,CAAC,iFAAmB;AAChD,aAAa,mBAAO,CAAC,iEAAW;;AAEhC;;;;;;;;;;;;AClCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,uBAAuB,mBAAO,CAAC,2DAAW;AAC1C,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,gCAAgC;AAC3C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,2BAA2B,qBAAqB;AAChD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,2CAA2C,wBAAwB;;AAEnE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACj1CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,oDAAkB;AAC5C,mBAAmB,mBAAO,CAAC,oDAAkB;;AAE7C,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;;AAEpD;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,4BAA4B,UAAU;;AAEtC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,cAAc;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,sDAAY;AACnC,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,aAAa,mBAAO,CAAC,kDAAU;AAC/B,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,iBAAiB;AAC5B,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,4BAA4B,UAAU;;AAEtC;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,cAAc;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,sBAAsB;AACjC,WAAW,kBAAkB;AAC7B;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;;AAE/C;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,gBAAgB;;AAEnD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA,4BAA4B,uBAAuB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,+BAA+B;AAC1C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,4GAA4G;AAC5G;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACnOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,mEAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,sCAAsC;AACjD;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,8BAA8B,cAAc;AAC5C,6BAA6B,WAAW;AACxC,iCAAiC,eAAe;AAChD,gCAAgC,aAAa;AAC7C,wCAAwC,yBAAyB;;AAEjE;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO,CAAC,sEAAkB;AACxC,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,uBAAuB,mBAAO,CAAC,wFAA2B;AAC1D,qBAAqB,mBAAO,CAAC,oFAAyB;AACtD,eAAe,mBAAO,CAAC,wEAAmB;AAC1C,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,kBAAkB,mBAAO,CAAC,8EAAsB;AAChD,cAAc,mBAAO,CAAC,sEAAkB;AACxC,WAAW,mBAAO,CAAC,gEAAe;;AAElC;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,uDAAuD;AAClE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,+CAA+C;AAC1D;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uGAAuG;AAClH,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3QA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC/NA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;ACxKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,mDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;;;;;;;;;;;AC/6CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,eAAe;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC7vBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,+BAA+B,YAAY;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,8BAA8B;AACzC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,YAAY;AAC3C,kCAAkC,eAAe;;AAEjD;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,4BAA4B,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA,+BAA+B,wBAAwB;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;;AAEzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,6BAA6B,YAAY;;AAEzC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACjwBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACnyBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,sCAAsC;AACjF;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,gCAAgC;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4CAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,yDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0CAAS;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,0CAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;;AAExC;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;;AAErC;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;;AAExC;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;;AAEhC;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,2DAAU;;;;;;;;;;;;ACNnC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,8DAAW;;;;;;;;;;;;ACVpC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;;AAElC;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;;AAE3B;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;;AAE9E;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;;AAE1B;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;;AAEtC;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,oDAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,8CAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;;AAEvD;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;;AAE1C;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC,qDAAqD;;AAEvF;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;AAEA,kDAAkD;AAClD,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wCAAwC;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,UAAU;AAClC;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA,yBAAyB,OAAO;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;;AAE1B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,mCAAmC,wCAAwC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,qDAAqD;AACpH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,4EAA4E,sDAAsD;AAClI;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,YAAY,mBAAO,CAAC,iEAAgB;AACpC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,cAAc,mBAAO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;;AAEhC;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gCAAgC,QAAQ;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;;AAEA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA,eAAe,sBAAsB;AACrC;AACA;AACA;;AAEA,eAAe,kBAAkB;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,4BAA4B,cAAc;AAC1C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;;AAEA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,oEAAoE;AACpE;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,4EAA8B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,4BAA4B,YAAY;AACxC,6BAA6B,UAAU;;AAEvC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,6BAA6B,UAAU;AACvC,8BAA8B,wBAAwB;AACtD,gCAAgC,0BAA0B;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;;AAEjC;AACA;AACA;;AAEA,wBAAwB,mBAAmB;AAC3C;AACA,4BAA4B,mBAAmB;AAC/C;AACA,2BAA2B,SAAS;AACpC;AACA,0BAA0B,6BAA6B;AACvD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,aAAa;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,YAAY;AACvB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;AAC1D,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA,WAAW,IAAI;AACf;AACA,YAAY,IAAI;AAChB;AACA;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,WAAW;AAChC;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,mBAAmB;;AAEnD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,0DAAU;;AAE9B,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB,WAAW,gBAAgB;AAC3B;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,kCAAkC,gBAAgB;;AAElD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,mBAAmB,oBAAoB;AACvC;AACA;;AAEA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,mEAAiB;;AAE7C,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY,OAAO;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,8CAA8C,aAAa,qBAAqB;AAChF;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;AACrC,4BAA4B,WAAW;AACvC,4BAA4B,SAAS;;AAErC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;;AAElE;AACA,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB,cAAc,gBAAgB;AAC9B,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,iDAAiD;AAC5D,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,oBAAoB;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,qBAAqB;AACpD;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,uBAAuB;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sCAAsC,uFAAuF;;AAE7H;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,uCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qGAAqG;AACpH,eAAe,OAAO;AACtB,eAAe,gBAAgB;AAC/B,eAAe,QAAQ;AACvB,eAAe,sCAAsC;AACrD,eAAe,sCAAsC;AACrD;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,eAAe;AAC9B,eAAe,WAAW;AAC1B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;;;;;;;;;;;;ACvrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,iFAA+B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,YAAY,mBAAO,CAAC,8DAA4B;AAChD,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;;AAElC;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,kBAAkB;;AAEpD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,kCAAkC,6BAA6B;AAC/D,mCAAmC,+BAA+B;AAClE,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,2BAA2B;AAClD;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,4CAA4C,yBAAyB;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qCAAqC,cAAc;AACnD,qCAAqC,gBAAgB;;AAErD;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACjjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxKA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD;AACxD;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,OAAO;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,OAAO;AACxE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,yBAAyB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2DAA2D,0BAA0B;AACrF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D,mCAAmC,WAAW;AAC9C,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mCAAmC,cAAc;AACjD,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,gCAAgC,0BAA0B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0BAA0B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,OAAO;AAChG;AACA;AACA;AACA,uDAAuD,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,kEAAkE;AAClE,qDAAqD;AACrD;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qEAAqE;AAC1E,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D,2DAA2D,8CAA8C,EAAE;AAC3G;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF,wEAAwE;AACxE,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,OAAO;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,wBAAwB;AAChF,sDAAsD,sDAAsD;AAC5G,sDAAsD,qDAAqD;AAC3G;AACA;AACA;AACA;AACA,sDAAsD,sBAAsB;AAC5E,qDAAqD,4BAA4B;AACjF,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA,qDAAqD,qBAAqB;AAC1E;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS,oFAAoF;AAC7F,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,yDAAyD;AAClE,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E,4DAA4D,0BAA0B;AACtF,8DAA8D,4BAA4B;AAC1F,kEAAkE,sBAAsB;AACxF,8DAA8D,sBAAsB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8CAA8C,kDAAkD,iDAAiD,+BAA+B,mCAAmC,0BAA0B,2CAA2C,mDAAmD,8EAA8E,WAAW;AAC/e,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,2EAA2E,8CAA8C,+CAA+C,kDAAkD,iDAAiD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,2CAA2C,2CAA2C,mDAAmD,8EAA8E,WAAW;AACvmB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,2EAA2E,8CAA8C,iDAAiD,+BAA+B,0BAA0B,2CAA2C,8EAA8E,WAAW;AACvW,iHAAiH,2FAA2F,0BAA0B,mCAAmC,WAAW;AACpR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qEAAqE,OAAO;AAC5E;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;;AAEA,CAAC","file":"SpinePluginDebug.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./SpinePlugin.js\");\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Blur Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps\r\n * tab, or if they simply remove focus from the browser to another app.\r\n *\r\n * @event Phaser.Core.Events#BLUR\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'blur';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Boot Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.\r\n * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.\r\n *\r\n * @event Phaser.Core.Events#BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Lost Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.\r\n * \r\n * The partner event is `CONTEXT_RESTORED`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_LOST\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextlost';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Restored Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser.\r\n * \r\n * The partner event is `CONTEXT_LOST`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_RESTORED\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextrestored';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Destroy Event.\r\n * \r\n * This event is dispatched when the game instance has been told to destroy itself.\r\n * Lots of internal systems listen to this event in order to clear themselves out.\r\n * Custom plugins and game code should also do the same.\r\n *\r\n * @event Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Focus Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.\r\n *\r\n * @event Phaser.Core.Events#FOCUS\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'focus';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Hidden Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.\r\n * \r\n * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which\r\n * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something\r\n * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)\r\n *\r\n * @event Phaser.Core.Events#HIDDEN\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'hidden';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pause Event.\r\n * \r\n * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.\r\n *\r\n * @event Phaser.Core.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Render Event.\r\n * \r\n * This event is dispatched right at the end of the render process.\r\n * \r\n * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.\r\n * Use it for any last minute post-processing before the next game step begins.\r\n *\r\n * @event Phaser.Core.Events#POST_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'postrender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Step Event.\r\n * \r\n * This event is dispatched after the Scene Manager has updated.\r\n * Hook into it from plugins or systems that need to do things before the render starts.\r\n *\r\n * @event Phaser.Core.Events#POST_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'poststep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Render Event.\r\n * \r\n * This event is dispatched immediately before any of the Scenes have started to render.\r\n * \r\n * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.\r\n *\r\n * @event Phaser.Core.Events#PRE_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'prerender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Step Event.\r\n * \r\n * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does.\r\n *\r\n * @event Phaser.Core.Events#PRE_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'prestep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Ready Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,\r\n * and all local systems are now able to start.\r\n *\r\n * @event Phaser.Core.Events#READY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Resume Event.\r\n * \r\n * This event is dispatched when the game loop leaves a paused state and resumes running.\r\n *\r\n * @event Phaser.Core.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Step Event.\r\n * \r\n * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.\r\n *\r\n * @event Phaser.Core.Events#STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'step';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Visible Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a visible state, previously having been hidden.\r\n * \r\n * Only browsers that support the Visibility API will cause this event to be emitted.\r\n *\r\n * @event Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'visible';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Core.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BLUR: require('./BLUR_EVENT'),\r\n BOOT: require('./BOOT_EVENT'),\r\n CONTEXT_LOST: require('./CONTEXT_LOST_EVENT'),\r\n CONTEXT_RESTORED: require('./CONTEXT_RESTORED_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n FOCUS: require('./FOCUS_EVENT'),\r\n HIDDEN: require('./HIDDEN_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_RENDER: require('./POST_RENDER_EVENT'),\r\n POST_STEP: require('./POST_STEP_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_STEP: require('./PRE_STEP_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n STEP: require('./STEP_EVENT'),\r\n VISIBLE: require('./VISIBLE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n *\r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once(Events.DESTROY, this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n *\r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n\r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n *\r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n *\r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n *\r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\r\n * \r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.data.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.16.1\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @since 3.50.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Given a hex color value, such as 0xff00ff (for purple), it will return a\n * numeric representation of it (i.e. 16711935) for use in WebGL tinting.\n *\n * @function Phaser.Display.Color.GetColorFromValue\n * @since 3.50.0\n *\n * @param {number} red - The hex color value, such as 0xff0000.\n *\n * @return {number} The combined color value.\n */\nvar GetColorFromValue = function (value)\n{\n return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n};\n\nmodule.exports = GetColorFromValue;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GameEvents = require('../../core/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in.\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, renderable)\r\n {\r\n var renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Mask is using.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.11.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = renderable;\r\n\r\n /**\r\n * The texture used for the mask's framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.maskTexture = null;\r\n\r\n /**\r\n * The texture used for the main framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.mainTexture = null;\r\n\r\n /**\r\n * Whether the Bitmap Mask is dirty and needs to be updated.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#dirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.dirty = true;\r\n\r\n /**\r\n * The framebuffer to which a masked Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.mainFramebuffer = null;\r\n\r\n /**\r\n * The framebuffer to which the Bitmap Mask's masking Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.maskFramebuffer = null;\r\n\r\n /**\r\n * The previous framebuffer set in the renderer before this one was enabled.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.17.0\r\n */\r\n this.prevFramebuffer = null;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n }, this);\r\n }\r\n },\r\n\r\n /**\r\n * Sets a new masking Game Object for the Bitmap Mask.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\n setBitmap: function (renderable)\r\n {\r\n this.bitmapMask = renderable;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n */\r\n postRenderWebGL: function (renderer, camera)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n\r\n var renderer = this.renderer;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n renderer.deleteTexture(this.mainTexture);\r\n renderer.deleteTexture(this.maskTexture);\r\n renderer.deleteFramebuffer(this.mainFramebuffer);\r\n renderer.deleteFramebuffer(this.maskFramebuffer);\r\n }\r\n\r\n this.mainTexture = null;\r\n this.maskTexture = null;\r\n this.mainFramebuffer = null;\r\n this.maskFramebuffer = null;\r\n this.prevFramebuffer = null;\r\n this.renderer = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, 0, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (inc)\r\n {\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n }\r\n }\r\n else if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n renderer.flush();\r\n\r\n renderer.currentMask.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n renderer.currentMask.mask = prev.mask;\r\n renderer.currentMask.camera = prev.camera;\r\n }\r\n else\r\n {\r\n renderer.currentMask.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar ComponentsToJSON = require('./components/ToJSON');\nvar DataManager = require('../data/DataManager');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\n\n/**\n * @classdesc\n * The base class that all Game Objects extend.\n * You don't create GameObjects directly and they cannot be added to the display list.\n * Instead, use them as the base for your own custom classes.\n *\n * @class GameObject\n * @memberof Phaser.GameObjects\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\n */\nvar GameObject = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function GameObject (scene, type)\n {\n EventEmitter.call(this);\n\n /**\n * The Scene to which this Game Object belongs.\n * Game Objects can only belong to one Scene.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A textual representation of this Game Object, i.e. `sprite`.\n * Used internally by Phaser but is available for your own custom classes to populate.\n *\n * @name Phaser.GameObjects.GameObject#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = type;\n\n /**\n * The current state of this Game Object.\n *\n * Phaser itself will never modify this value, although plugins may do so.\n *\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @name Phaser.GameObjects.GameObject#state\n * @type {(integer|string)}\n * @since 3.16.0\n */\n this.state = 0;\n\n /**\n * The parent Container of this Game Object, if it has one.\n *\n * @name Phaser.GameObjects.GameObject#parentContainer\n * @type {Phaser.GameObjects.Container}\n * @since 3.4.0\n */\n this.parentContainer = null;\n\n /**\n * The name of this Game Object.\n * Empty by default and never populated by Phaser, this is left for developers to use.\n *\n * @name Phaser.GameObjects.GameObject#name\n * @type {string}\n * @default ''\n * @since 3.0.0\n */\n this.name = '';\n\n /**\n * The active state of this Game Object.\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\n * An active object is one which is having its logic and internal systems updated.\n *\n * @name Phaser.GameObjects.GameObject#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * The Tab Index of the Game Object.\n * Reserved for future use by plugins and the Input Manager.\n *\n * @name Phaser.GameObjects.GameObject#tabIndex\n * @type {integer}\n * @default -1\n * @since 3.0.0\n */\n this.tabIndex = -1;\n\n /**\n * A Data Manager.\n * It allows you to store, query and get key/value paired information specific to this Game Object.\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\n *\n * @name Phaser.GameObjects.GameObject#data\n * @type {Phaser.Data.DataManager}\n * @default null\n * @since 3.0.0\n */\n this.data = null;\n\n /**\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\n * If those components are not used by your custom class then you can use this bitmask as you wish.\n *\n * @name Phaser.GameObjects.GameObject#renderFlags\n * @type {integer}\n * @default 15\n * @since 3.0.0\n */\n this.renderFlags = 15;\n\n /**\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\n * Not usually set directly, instead call `Camera.ignore`, however you can\n * set this property directly using the Camera.id property:\n *\n * @example\n * this.cameraFilter |= camera.id\n *\n * @name Phaser.GameObjects.GameObject#cameraFilter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.cameraFilter = 0;\n\n /**\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\n *\n * @name Phaser.GameObjects.GameObject#input\n * @type {?Phaser.Types.Input.InteractiveObject}\n * @default null\n * @since 3.0.0\n */\n this.input = null;\n\n /**\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\n *\n * @name Phaser.GameObjects.GameObject#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n\n /**\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\n * This includes calls that may come from a Group, Container or the Scene itself.\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\n * responsible for managing references to and from this Game Object.\n *\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\n * @type {boolean}\n * @default false\n * @since 3.5.0\n */\n this.ignoreDestroy = false;\n\n // Tell the Scene to re-sort the children\n scene.sys.queueDepthSort();\n },\n\n /**\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\n *\n * @method Phaser.GameObjects.GameObject#setActive\n * @since 3.0.0\n *\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\n *\n * @return {this} This GameObject.\n */\n setActive: function (value)\n {\n this.active = value;\n\n return this;\n },\n\n /**\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\n * The `name` property is not populated by Phaser and is presented for your own use.\n *\n * @method Phaser.GameObjects.GameObject#setName\n * @since 3.0.0\n *\n * @param {string} value - The name to be given to this Game Object.\n *\n * @return {this} This GameObject.\n */\n setName: function (value)\n {\n this.name = value;\n\n return this;\n },\n\n /**\n * Sets the current state of this Game Object.\n *\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\n *\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\n * The state value should typically be an integer (ideally mapped to a constant\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @method Phaser.GameObjects.GameObject#setState\n * @since 3.16.0\n *\n * @param {(integer|string)} value - The state of the Game Object.\n *\n * @return {this} This GameObject.\n */\n setState: function (value)\n {\n this.state = value;\n\n return this;\n },\n\n /**\n * Adds a Data Manager component to this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#setDataEnabled\n * @since 3.0.0\n * @see Phaser.Data.DataManager\n *\n * @return {this} This GameObject.\n */\n setDataEnabled: function ()\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this;\n },\n\n /**\n * Allows you to store a key value pair within this Game Objects Data Manager.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * ```javascript\n * sprite.setData('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `getData`:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or you can access the value directly via the `values` property, where it works like any other variable:\n *\n * ```javascript\n * sprite.data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.GameObjects.GameObject#setData\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This GameObject.\n */\n setData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.set(key, value);\n\n return this;\n },\n\n /**\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#incData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {this} This GameObject.\n */\n incData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.inc(key, value);\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toggleData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {this} This GameObject.\n */\n toggleData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.toggle(key);\n\n return this;\n },\n\n /**\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or access the value directly:\n *\n * ```javascript\n * sprite.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n *\n * ```javascript\n * sprite.getData([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.GameObjects.GameObject#getData\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n getData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this.data.get(key);\n },\n\n /**\n * Pass this Game Object to the Input Manager to enable it for Input.\n *\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\n * input detection.\n *\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\n * shape for it to use.\n *\n * You can also provide an Input Configuration Object as the only argument to this method.\n *\n * @example\n * sprite.setInteractive();\n *\n * @example\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\n *\n * @example\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\n *\n * @method Phaser.GameObjects.GameObject#setInteractive\n * @since 3.0.0\n *\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\n *\n * @return {this} This GameObject.\n */\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\n {\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will disable it.\n *\n * An object that is disabled for input stops processing or being considered for\n * input events, but can be turned back on again at any time by simply calling\n * `setInteractive()` with no arguments provided.\n *\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\n *\n * @method Phaser.GameObjects.GameObject#disableInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n disableInteractive: function ()\n {\n if (this.input)\n {\n this.input.enabled = false;\n }\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will queue it\n * for removal, causing it to no longer be interactive. The removal happens on\n * the next game step, it is not immediate.\n *\n * The Interactive Object that was assigned to this Game Object will be destroyed,\n * removed from the Input Manager and cleared from this Game Object.\n *\n * If you wish to re-enable this Game Object at a later date you will need to\n * re-create its InteractiveObject by calling `setInteractive` again.\n *\n * If you wish to only temporarily stop an object from receiving input then use\n * `disableInteractive` instead, as that toggles the interactive state, where-as\n * this erases it completely.\n *\n * If you wish to resize a hit area, don't remove and then set it as being\n * interactive. Instead, access the hitarea object directly and resize the shape\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\n * shape is a Rectangle, which it is by default.)\n *\n * @method Phaser.GameObjects.GameObject#removeInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n removeInteractive: function ()\n {\n this.scene.sys.input.clear(this);\n\n this.input = undefined;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is added to a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to add themselves into the Update List.\n *\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#addedToScene\n * @since 3.50.0\n */\n addedToScene: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is removed from a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to removed themselves from the Update List.\n *\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#removedFromScene\n * @since 3.50.0\n */\n removedFromScene: function ()\n {\n },\n\n /**\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\n *\n * @method Phaser.GameObjects.GameObject#update\n * @since 3.0.0\n *\n * @param {...*} [args] - args\n */\n update: function ()\n {\n },\n\n /**\n * Returns a JSON representation of the Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\n toJSON: function ()\n {\n return ComponentsToJSON(this);\n },\n\n /**\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\n * Also checks the Game Object against the given Cameras exclusion list.\n *\n * @method Phaser.GameObjects.GameObject#willRender\n * @since 3.0.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\n *\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\n */\n willRender: function (camera)\n {\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\n },\n\n /**\n * Returns an array containing the display list index of either this Game Object, or if it has one,\n * its parent Container. It then iterates up through all of the parent containers until it hits the\n * root of the display list (which is index 0 in the returned array).\n *\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\n * this Game Object and all of its ancestors.\n *\n * @method Phaser.GameObjects.GameObject#getIndexList\n * @since 3.4.0\n *\n * @return {integer[]} An array of display list position indexes.\n */\n getIndexList: function ()\n {\n // eslint-disable-next-line consistent-this\n var child = this;\n var parent = this.parentContainer;\n\n var indexes = [];\n\n while (parent)\n {\n // indexes.unshift([parent.getIndex(child), parent.name]);\n indexes.unshift(parent.getIndex(child));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n\n return indexes;\n },\n\n /**\n * Destroys this Game Object removing it from the Display List and Update List and\n * severing all ties to parent resources.\n *\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\n *\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\n * As long as no reference to it exists within your own code it should become free for\n * garbage collection by the browser.\n *\n * If you just want to temporarily disable an object then look at using the\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\n *\n * @method Phaser.GameObjects.GameObject#destroy\n * @fires Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n *\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\n */\n destroy: function (fromScene)\n {\n if (fromScene === undefined) { fromScene = false; }\n\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this);\n\n var sys = this.scene.sys;\n\n if (!fromScene)\n {\n sys.displayList.remove(this);\n }\n\n if (this.input)\n {\n sys.input.clear(this);\n this.input = undefined;\n }\n\n if (this.data)\n {\n this.data.destroy();\n\n this.data = undefined;\n }\n\n if (this.body)\n {\n this.body.destroy();\n this.body = undefined;\n }\n\n // Tell the Scene to re-sort the children\n if (!fromScene)\n {\n sys.queueDepthSort();\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n\n this.parentContainer = undefined;\n\n this.removeAllListeners();\n }\n\n});\n\n/**\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\n *\n * @constant {integer} RENDER_MASK\n * @memberof Phaser.GameObjects.GameObject\n * @default\n */\nGameObject.RENDER_MASK = 15;\n\nmodule.exports = GameObject;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha property of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.AlphaSingle\r\n * @since 3.22.0\r\n */\r\n\r\nvar AlphaSingle = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = AlphaSingle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../../renderer/BlendModes');\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n * \r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scene.sys.queueDepthSort();\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {integer} value - The depth of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar RotateAround = require('../../math/RotateAround');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getCenter: function (output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is \r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = require('../../display/mask/BitmapMask');\r\nvar GeometryMask = require('../../display/mask/GeometryMask');\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n * \r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n * \r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (renderable)\r\n {\r\n if (renderable === undefined && (this.texture || this.shader))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n renderable = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, renderable);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n * \r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && this.type === 'Graphics')\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = require('../../math/DegToRad');\r\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar TWEEN_CONST = require('../../tweens/tween/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The distance the follower has traveled from the previous point to the current one, at the last update.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathDelta\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.23.0\r\n */\r\n pathDelta: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n if (!this.pathDelta)\r\n {\r\n this.pathDelta = new Vector2();\r\n }\r\n\r\n this.pathDelta.reset();\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n var pathDelta = this.pathDelta;\r\n var pathVector = this.pathVector;\r\n\r\n pathDelta.copy(pathVector).negate();\r\n\r\n if (tweenData.state === TWEEN_CONST.COMPLETE)\r\n {\r\n this.path.getPoint(1, pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n return;\r\n }\r\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PIPELINE_CONST = require('../../renderer/webgl/pipelines/const');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {string} [name=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (name)\r\n {\r\n if (name === undefined) { name = PIPELINE_CONST.MULTI_PIPELINE; }\r\n\r\n var renderer = this.scene.sys.game.renderer;\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines && pipelines.has(name))\r\n {\r\n this.defaultPipeline = pipelines.get(name);\r\n this.pipeline = this.defaultPipeline;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the active WebGL Pipeline of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the pipeline to set on this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (name)\r\n {\r\n var renderer = this.scene.sys.game.renderer;\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines && pipelines.has(name))\r\n {\r\n this.pipeline = pipelines.get(name);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n resetPipeline: function ()\r\n {\r\n this.pipeline = this.defaultPipeline;\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleX * this.frame.realWidth);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleY * this.frame.realHeight);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (frame === undefined) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetColorFromValue = require('../../display/color/GetColorFromValue');\n\n/**\n * Provides methods used for setting the tint of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Tint\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Tint = {\n\n /**\n * Private internal value. Holds the top-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTL: 16777215,\n\n /**\n * Private internal value. Holds the top-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTR: 16777215,\n\n /**\n * Private internal value. Holds the bottom-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBL: 16777215,\n\n /**\n * Private internal value. Holds the bottom-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBR: 16777215,\n\n /**\n * Private internal value. Holds if the Game Object is tinted or not.\n *\n * @name Phaser.GameObjects.Components.Tint#_isTinted\n * @type {boolean}\n * @private\n * @default false\n * @since 3.11.0\n */\n _isTinted: false,\n\n /**\n * Fill or additive?\n *\n * @name Phaser.GameObjects.Components.Tint#tintFill\n * @type {boolean}\n * @default false\n * @since 3.11.0\n */\n tintFill: false,\n\n /**\n * Clears all tint values associated with this Game Object.\n *\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\n * which results in no visible change to the texture.\n *\n * @method Phaser.GameObjects.Components.Tint#clearTint\n * @webglOnly\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearTint: function ()\n {\n this.setTint(0xffffff);\n\n this._isTinted = false;\n\n return this;\n },\n\n /**\n * Sets an additive tint on this Game Object.\n *\n * The tint works by taking the pixel color values from the Game Objects texture, and then\n * multiplying it by the color value of the tint. You can provide either one color value,\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\n * per corner. The colors are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTint\n * @webglOnly\n * @since 3.0.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n if (topLeft === undefined) { topLeft = 0xffffff; }\n\n if (topRight === undefined)\n {\n topRight = topLeft;\n bottomLeft = topLeft;\n bottomRight = topLeft;\n }\n\n this._tintTL = GetColorFromValue(topLeft);\n this._tintTR = GetColorFromValue(topRight);\n this._tintBL = GetColorFromValue(bottomLeft);\n this._tintBR = GetColorFromValue(bottomRight);\n\n this._isTinted = true;\n\n this.tintFill = false;\n\n return this;\n },\n\n /**\n * Sets a fill-based tint on this Game Object.\n *\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\n * with those in the tint. You can use this for effects such as making a player flash 'white'\n * if hit by something. You can provide either one color value, in which case the whole\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\n * are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTintFill\n * @webglOnly\n * @since 3.11.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\n\n this.tintFill = true;\n\n return this;\n },\n\n /**\n * The tint value being applied to the top-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopLeft: {\n\n get: function ()\n {\n return this._tintTL;\n },\n\n set: function (value)\n {\n this._tintTL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the top-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopRight: {\n\n get: function ()\n {\n return this._tintTR;\n },\n\n set: function (value)\n {\n this._tintTR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomLeft: {\n\n get: function ()\n {\n return this._tintBL;\n },\n\n set: function (value)\n {\n this._tintBL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomRight: {\n\n get: function ()\n {\n return this._tintBR;\n },\n\n set: function (value)\n {\n this._tintBR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the whole of the Game Object.\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#tint\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tint: {\n\n set: function (value)\n {\n this.setTint(value, value, value, value);\n }\n },\n\n /**\n * Does this Game Object have a tint applied to it or not?\n *\n * @name Phaser.GameObjects.Components.Tint#isTinted\n * @type {boolean}\n * @webglOnly\n * @readonly\n * @since 3.11.0\n */\n isTinted: {\n\n get: function ()\n {\n return this._isTinted;\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../../math/const');\nvar TransformMatrix = require('./TransformMatrix');\nvar TransformXY = require('../../math/TransformXY');\nvar WrapAngle = require('../../math/angle/Wrap');\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\nvar Vector2 = require('../../math/Vector2');\n\n// global bitmask flag for GameObject.renderMask (used by Scale)\nvar _FLAG = 4; // 0100\n\n/**\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Transform\n * @since 3.0.0\n */\n\nvar Transform = {\n\n /**\n * Private internal value. Holds the horizontal scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleX\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleX: 1,\n\n /**\n * Private internal value. Holds the vertical scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleY\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleY: 1,\n\n /**\n * Private internal value. Holds the rotation value in radians.\n *\n * @name Phaser.GameObjects.Components.Transform#_rotation\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _rotation: 0,\n\n /**\n * The x position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n x: 0,\n\n /**\n * The y position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n y: 0,\n\n /**\n * The z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\n *\n * @name Phaser.GameObjects.Components.Transform#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n z: 0,\n\n /**\n * The w position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n w: 0,\n\n /**\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\n *\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\n *\n * @name Phaser.GameObjects.Components.Transform#scale\n * @type {number}\n * @default 1\n * @since 3.18.0\n */\n scale: {\n\n get: function ()\n {\n return (this._scaleX + this._scaleY) / 2;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The horizontal scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The vertical scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The angle of this Game Object as expressed in degrees.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\n * and -90 is up.\n *\n * If you prefer to work in radians, see the `rotation` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#angle\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n angle: {\n\n get: function ()\n {\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\n },\n\n set: function (value)\n {\n // value is in degrees\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\n }\n },\n\n /**\n * The angle of this Game Object in radians.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\n * and -PI/2 is up.\n *\n * If you prefer to work in degrees, see the `angle` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#rotation\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n rotation: {\n\n get: function ()\n {\n return this._rotation;\n },\n\n set: function (value)\n {\n // value is in radians\n this._rotation = WrapAngle(value);\n }\n },\n\n /**\n * Sets the position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setPosition\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x position of this Game Object.\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\n * @param {number} [z=0] - The z position of this Game Object.\n * @param {number} [w=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPosition: function (x, y, z, w)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n if (z === undefined) { z = 0; }\n if (w === undefined) { w = 0; }\n\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n\n return this;\n },\n\n /**\n * Sets the position of this Game Object to be a random position within the confines of\n * the given area.\n *\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\n *\n * The position does not factor in the size of this Game Object, meaning that only the origin is\n * guaranteed to be within the area.\n *\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\n * @since 3.8.0\n *\n * @param {number} [x=0] - The x position of the top-left of the random area.\n * @param {number} [y=0] - The y position of the top-left of the random area.\n * @param {number} [width] - The width of the random area.\n * @param {number} [height] - The height of the random area.\n *\n * @return {this} This Game Object instance.\n */\n setRandomPosition: function (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = this.scene.sys.scale.width; }\n if (height === undefined) { height = this.scene.sys.scale.height; }\n\n this.x = x + (Math.random() * width);\n this.y = y + (Math.random() * height);\n\n return this;\n },\n\n /**\n * Sets the rotation of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setRotation\n * @since 3.0.0\n *\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\n *\n * @return {this} This Game Object instance.\n */\n setRotation: function (radians)\n {\n if (radians === undefined) { radians = 0; }\n\n this.rotation = radians;\n\n return this;\n },\n\n /**\n * Sets the angle of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setAngle\n * @since 3.0.0\n *\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\n *\n * @return {this} This Game Object instance.\n */\n setAngle: function (degrees)\n {\n if (degrees === undefined) { degrees = 0; }\n\n this.angle = degrees;\n\n return this;\n },\n\n /**\n * Sets the scale of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setScale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale of this Game Object.\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScale: function (x, y)\n {\n if (x === undefined) { x = 1; }\n if (y === undefined) { y = x; }\n\n this.scaleX = x;\n this.scaleY = y;\n\n return this;\n },\n\n /**\n * Sets the x position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setX\n * @since 3.0.0\n *\n * @param {number} [value=0] - The x position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setX: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.x = value;\n\n return this;\n },\n\n /**\n * Sets the y position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setY\n * @since 3.0.0\n *\n * @param {number} [value=0] - The y position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setY: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.y = value;\n\n return this;\n },\n\n /**\n * Sets the z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\n *\n * @method Phaser.GameObjects.Components.Transform#setZ\n * @since 3.0.0\n *\n * @param {number} [value=0] - The z position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setZ: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.z = value;\n\n return this;\n },\n\n /**\n * Sets the w position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setW\n * @since 3.0.0\n *\n * @param {number} [value=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setW: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.w = value;\n\n return this;\n },\n\n /**\n * Gets the local transform matrix for this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getLocalTransformMatrix: function (tempMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n },\n\n /**\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\n *\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\n\n var parent = this.parentContainer;\n\n if (!parent)\n {\n return this.getLocalTransformMatrix(tempMatrix);\n }\n\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n\n while (parent)\n {\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\n\n parentMatrix.multiply(tempMatrix, tempMatrix);\n\n parent = parent.parentContainer;\n }\n\n return tempMatrix;\n },\n\n /**\n * Takes the given `x` and `y` coordinates and converts them into local space for this\n * Game Object, taking into account parent and local transforms, and the Display Origin.\n *\n * The returned Vector2 contains the translated point in its properties.\n *\n * A Camera needs to be provided in order to handle modified scroll factors. If no\n * camera is specified, it will use the `main` camera from the Scene to which this\n * Game Object belongs.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\n * @since 3.50.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\n *\n * @return {Phaser.Math.Vector2} The translated point.\n */\n getLocalPoint: function (x, y, point, camera)\n {\n if (!point) { point = new Vector2(); }\n if (!camera) { camera = this.scene.sys.cameras.main; }\n\n var csx = camera.scrollX;\n var csy = camera.scrollY;\n\n var px = x + (csx * this.scrollFactorX) - csx;\n var py = y + (csy * this.scrollFactorY) - csy;\n\n if (this.parentContainer)\n {\n this.getWorldTransformMatrix().applyInverse(px, py, point);\n }\n else\n {\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\n }\n\n // Normalize origin\n if (this._originComponent)\n {\n point.x += this._displayOriginX;\n point.y += this._displayOriginY;\n }\n\n return point;\n },\n\n /**\n * Gets the sum total rotation of all of this Game Objects parent Containers.\n *\n * The returned value is in radians and will be zero if this Game Object has no parent container.\n *\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\n * @since 3.18.0\n *\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\n */\n getParentRotation: function ()\n {\n var rotation = 0;\n\n var parent = this.parentContainer;\n\n while (parent)\n {\n rotation += parent.rotation;\n\n parent = parent.parentContainer;\n }\n\n return rotation;\n }\n\n};\n\nmodule.exports = Transform;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n \r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n \r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n * \r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? this : out;\r\n\r\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n * \r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point using this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n * \r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n * \r\n * The result must be applied in the following order to reproduce the current matrix:\r\n * \r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {object} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n * \r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * \r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * \r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Components\n */\n\nmodule.exports = {\n\n Alpha: require('./Alpha'),\n AlphaSingle: require('./AlphaSingle'),\n BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n GetBounds: require('./GetBounds'),\n Mask: require('./Mask'),\n Origin: require('./Origin'),\n PathFollower: require('./PathFollower'),\n Pipeline: require('./Pipeline'),\n ScrollFactor: require('./ScrollFactor'),\n Size: require('./Size'),\n Texture: require('./Texture'),\n TextureCrop: require('./TextureCrop'),\n Tint: require('./Tint'),\n ToJSON: require('./ToJSON'),\n Transform: require('./Transform'),\n TransformMatrix: require('./TransformMatrix'),\n Visible: require('./Visible')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar GameObjectEvents = require('../events');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n * \r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {integer}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.Container#_displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._displayList = scene.sys.displayList;\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.setPosition(x, y);\r\n\r\n this.clearAlpha();\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n this._displayList.remove(gameObject);\r\n\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n }\r\n\r\n // Is only on the Display List via this Container\r\n if (!this.scene.sys.displayList.exists(gameObject))\r\n {\r\n gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene);\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n }\r\n\r\n // Is only on the Display List via this Container\r\n if (!this.scene.sys.displayList.exists(gameObject))\r\n {\r\n gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene);\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\r\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output = new Vector2(source.x, source.y);\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {integer} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @param {integer} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {integer} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [startIndex=0] - An optional start index.\r\n * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {integer} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {integer} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {integer} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = ContainerCanvasRenderer;\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = require('../../utils/NOOP');\r\nvar renderCanvas = require('../../utils/NOOP');\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./ContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./ContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n \r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container.alpha;\r\n\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n var list = children;\r\n var childCount = children.length;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlphaTopLeft;\r\n var childAlphaTopRight;\r\n var childAlphaBottomLeft;\r\n var childAlphaBottomRight;\r\n\r\n if (child.alphaTopLeft !== undefined)\r\n {\r\n childAlphaTopLeft = child.alphaTopLeft;\r\n childAlphaTopRight = child.alphaTopRight;\r\n childAlphaBottomLeft = child.alphaBottomLeft;\r\n childAlphaBottomRight = child.alphaBottomRight;\r\n }\r\n else\r\n {\r\n var childAlpha = child.alpha;\r\n\r\n childAlphaTopLeft = childAlpha;\r\n childAlphaTopRight = childAlpha;\r\n childAlphaBottomLeft = childAlpha;\r\n childAlphaBottomRight = childAlpha;\r\n }\r\n\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== renderer.currentType)\r\n {\r\n renderer.newType = true;\r\n renderer.currentType = type;\r\n }\r\n\r\n renderer.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === renderer.currentType) : false;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n\r\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix);\r\n\r\n // Restore original values\r\n\r\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\r\n\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (mask)\r\n {\r\n mask.postRenderWebGL(renderer, camera);\r\n }\r\n\r\n renderer.newType = false;\r\n }\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n * \r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n * \r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n * \r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n * \r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n * \r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n * \r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {integer} width - The width of the video.\r\n * @param {integer} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n * \r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n * \r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n * \r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n * \r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n * \r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n * \r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n * \r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Timeout Event.\r\n * \r\n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\r\n * source to start playback.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\r\n */\r\nmodule.exports = 'timeout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n * \r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n * \r\n * @name Phaser.Geom.CIRCLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n * \r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n * \r\n * @name Phaser.Geom.LINE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n * \r\n * @name Phaser.Geom.POINT\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n * \r\n * @name Phaser.Geom.POLYGON\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = require('./Length');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Random = require('./Random');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GEOM_CONST = require('../const');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {this} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = require('./Perimeter');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n * \r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n * \r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = require('./GetPoint');\r\nvar Perimeter = require('./Perimeter');\r\n\r\n// Return an array of points from the perimeter of the rectangle\r\n// each spaced out based on the quantity or step required\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\r\n * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Contains = require('./Contains');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Line = require('../line/Line');\r\nvar Random = require('./Random');\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n * \r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n * \r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('./Rectangle');\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar CONST = require('./const');\nvar Events = require('./events');\nvar GetFastValue = require('../utils/object/GetFastValue');\nvar GetURL = require('./GetURL');\nvar MergeXHRSettings = require('./MergeXHRSettings');\nvar XHRLoader = require('./XHRLoader');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * @classdesc\n * The base File class used by all File Types that the Loader can support.\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class File\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\n */\nvar File = new Class({\n\n initialize:\n\n function File (loader, fileConfig)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.File#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.0.0\n */\n this.loader = loader;\n\n /**\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\n *\n * @name Phaser.Loader.File#cache\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\n * @since 3.7.0\n */\n this.cache = GetFastValue(fileConfig, 'cache', false);\n\n /**\n * The file type string (image, json, etc) for sorting within the Loader.\n *\n * @name Phaser.Loader.File#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = GetFastValue(fileConfig, 'type', false);\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.File#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = GetFastValue(fileConfig, 'key', false);\n\n var loadKey = this.key;\n\n if (loader.prefix && loader.prefix !== '')\n {\n this.key = loader.prefix + loadKey;\n }\n\n if (!this.type || !this.key)\n {\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\n }\n\n /**\n * The URL of the file, not including baseURL.\n *\n * Automatically has Loader.path prepended to it if a string.\n *\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\n *\n * @name Phaser.Loader.File#url\n * @type {object|string}\n * @since 3.0.0\n */\n this.url = GetFastValue(fileConfig, 'url');\n\n if (this.url === undefined)\n {\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0)\n {\n this.url = loader.path + this.url;\n }\n\n /**\n * The final URL this file will load from, including baseURL and path.\n * Set automatically when the Loader calls 'load' on this file.\n *\n * @name Phaser.Loader.File#src\n * @type {string}\n * @since 3.0.0\n */\n this.src = '';\n\n /**\n * The merged XHRSettings for this file.\n *\n * @name Phaser.Loader.File#xhrSettings\n * @type {Phaser.Types.Loader.XHRSettingsObject}\n * @since 3.0.0\n */\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\n\n if (GetFastValue(fileConfig, 'xhrSettings', false))\n {\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\n }\n\n /**\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\n *\n * @name Phaser.Loader.File#xhrLoader\n * @type {?XMLHttpRequest}\n * @since 3.0.0\n */\n this.xhrLoader = null;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.File#state\n * @type {integer}\n * @since 3.0.0\n */\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\n\n /**\n * The total size of this file.\n * Set by onProgress and only if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesTotal\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.bytesTotal = 0;\n\n /**\n * Updated as the file loads.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesLoaded\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.bytesLoaded = -1;\n\n /**\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#percentComplete\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.percentComplete = -1;\n\n /**\n * For CORs based loading.\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\n *\n * @name Phaser.Loader.File#crossOrigin\n * @type {(string|undefined)}\n * @since 3.0.0\n */\n this.crossOrigin = undefined;\n\n /**\n * The processed file data, stored here after the file has loaded.\n *\n * @name Phaser.Loader.File#data\n * @type {*}\n * @since 3.0.0\n */\n this.data = undefined;\n\n /**\n * A config object that can be used by file types to store transitional data.\n *\n * @name Phaser.Loader.File#config\n * @type {*}\n * @since 3.0.0\n */\n this.config = GetFastValue(fileConfig, 'config', {});\n\n /**\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\n *\n * @name Phaser.Loader.File#multiFile\n * @type {?Phaser.Loader.MultiFile}\n * @since 3.7.0\n */\n this.multiFile;\n\n /**\n * Does this file have an associated linked file? Such as an image and a normal map.\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\n * actually bound by data, where-as a linkFile is.\n *\n * @name Phaser.Loader.File#linkFile\n * @type {?Phaser.Loader.File}\n * @since 3.7.0\n */\n this.linkFile;\n },\n\n /**\n * Links this File with another, so they depend upon each other for loading and processing.\n *\n * @method Phaser.Loader.File#setLink\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\n */\n setLink: function (fileB)\n {\n this.linkFile = fileB;\n\n fileB.linkFile = this;\n },\n\n /**\n * Resets the XHRLoader instance this file is using.\n *\n * @method Phaser.Loader.File#resetXHR\n * @since 3.0.0\n */\n resetXHR: function ()\n {\n if (this.xhrLoader)\n {\n this.xhrLoader.onload = undefined;\n this.xhrLoader.onerror = undefined;\n this.xhrLoader.onprogress = undefined;\n }\n },\n\n /**\n * Called by the Loader, starts the actual file downloading.\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\n *\n * @method Phaser.Loader.File#load\n * @since 3.0.0\n */\n load: function ()\n {\n if (this.state === CONST.FILE_POPULATED)\n {\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\n this.loader.nextFile(this, true);\n }\n else\n {\n this.state = CONST.FILE_LOADING;\n\n this.src = GetURL(this, this.loader.baseURL);\n\n if (this.src.indexOf('data:') === 0)\n {\n console.warn('Local data URIs are not supported: ' + this.key);\n }\n else\n {\n // The creation of this XHRLoader starts the load process going.\n // It will automatically call the following, based on the load outcome:\n //\n // xhr.onload = this.onLoad\n // xhr.onerror = this.onError\n // xhr.onprogress = this.onProgress\n\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\n }\n }\n },\n\n /**\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onLoad\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\n */\n onLoad: function (xhr, event)\n {\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\n\n var success = !(event.target && event.target.status !== 200) || localFileOk;\n\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\n {\n success = false;\n }\n\n this.state = CONST.FILE_LOADED;\n\n this.resetXHR();\n\n this.loader.nextFile(this, success);\n },\n\n /**\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onError\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\n */\n onError: function ()\n {\n this.resetXHR();\n\n this.loader.nextFile(this, false);\n },\n\n /**\n * Called during the file load progress. Is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onProgress\n * @fires Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n *\n * @param {ProgressEvent} event - The DOM ProgressEvent.\n */\n onProgress: function (event)\n {\n if (event.lengthComputable)\n {\n this.bytesLoaded = event.loaded;\n this.bytesTotal = event.total;\n\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\n\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\n }\n },\n\n /**\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\n *\n * @method Phaser.Loader.File#onProcess\n * @since 3.0.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.onProcessComplete();\n },\n\n /**\n * Called when the File has completed processing.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessComplete\n * @since 3.7.0\n */\n onProcessComplete: function ()\n {\n this.state = CONST.FILE_COMPLETE;\n\n if (this.multiFile)\n {\n this.multiFile.onFileComplete(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Called when the File has completed processing but it generated an error.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessError\n * @since 3.7.0\n */\n onProcessError: function ()\n {\n this.state = CONST.FILE_ERRORED;\n\n if (this.multiFile)\n {\n this.multiFile.onFileFailed(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Checks if a key matching the one used by this file exists in the target Cache or not.\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\n * loaded or will conflict.\n *\n * @method Phaser.Loader.File#hasCacheConflict\n * @since 3.7.0\n *\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\n */\n hasCacheConflict: function ()\n {\n return (this.cache && this.cache.exists(this.key));\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n * This method is often overridden by specific file types.\n *\n * @method Phaser.Loader.File#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n if (this.cache)\n {\n this.cache.add(this.key, this.data);\n }\n\n this.pendingDestroy();\n },\n\n /**\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.File#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.7.0\n */\n pendingDestroy: function (data)\n {\n if (data === undefined) { data = this.data; }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\n\n this.loader.flagForRemoval(this);\n },\n\n /**\n * Destroy this File and any references it holds.\n *\n * @method Phaser.Loader.File#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.cache = null;\n this.xhrSettings = null;\n this.multiFile = null;\n this.linkFile = null;\n this.data = null;\n }\n\n});\n\n/**\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\n *\n * @method Phaser.Loader.File.createObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\n * @param {Blob} blob - A Blob object to create an object URL for.\n * @param {string} defaultType - Default mime type used if blob type is not available.\n */\nFile.createObjectURL = function (image, blob, defaultType)\n{\n if (typeof URL === 'function')\n {\n image.src = URL.createObjectURL(blob);\n }\n else\n {\n var reader = new FileReader();\n\n reader.onload = function ()\n {\n image.removeAttribute('crossOrigin');\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\n };\n\n reader.onerror = image.onerror;\n\n reader.readAsDataURL(blob);\n }\n};\n\n/**\n * Static method for releasing an existing object URL which was previously created\n * by calling {@link File#createObjectURL} method.\n *\n * @method Phaser.Loader.File.revokeObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\n */\nFile.revokeObjectURL = function (image)\n{\n if (typeof URL === 'function')\n {\n URL.revokeObjectURL(image.src);\n }\n};\n\nmodule.exports = File;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n * \r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n * \r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n * \r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {integer}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = files;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = files.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n files[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {integer} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n * \r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n * \r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n * \r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n * \r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n * \r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n * \r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started\r\n * \r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n * \r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing \r\n * \r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load\r\n * \r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n * \r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n * \r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n * \r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed\r\n * \r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request\r\n * \r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n * \r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n * \r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n * \r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {integer} totalComplete - The total number of files that successfully loaded.\r\n * @param {integer} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n * \r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n * \r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n * \r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n * \r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n * \r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n * \r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n * \r\n * This event is dispatched even if there aren't any files in the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture;\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\r\n {\r\n if (this.type === 'image')\r\n {\r\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n else\r\n {\r\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\r\n }\r\n\r\n this.pendingDestroy(texture);\r\n\r\n linkFile.pendingDestroy(texture);\r\n }\r\n else if (!linkFile)\r\n {\r\n texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar GetValue = require('../../utils/object/GetValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single JSON File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\n *\n * @class JSONFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n */\nvar JSONFile = new Class({\n\n Extends: File,\n\n initialize:\n\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\n\n function JSONFile (loader, key, url, xhrSettings, dataKey)\n {\n var extension = 'json';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n dataKey = GetFastValue(config, 'dataKey', dataKey);\n }\n\n var fileConfig = {\n type: 'json',\n cache: loader.cacheManager.json,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: dataKey\n };\n\n File.call(this, loader, fileConfig);\n\n if (IsPlainObject(url))\n {\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\n if (dataKey)\n {\n this.data = GetValue(url, dataKey);\n }\n else\n {\n this.data = url;\n }\n\n this.state = CONST.FILE_POPULATED;\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n if (this.state !== CONST.FILE_POPULATED)\n {\n this.state = CONST.FILE_PROCESSING;\n\n var json = JSON.parse(this.xhrLoader.responseText);\n\n var key = this.config;\n\n if (typeof key === 'string')\n {\n this.data = GetValue(json, key, json);\n }\n else\n {\n this.data = json;\n }\n }\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a JSON file, or array of JSON files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the JSON Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.json({\n * key: 'wavedata',\n * url: 'files/AlienWaveData.json'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * // and later in your game ...\n * var data = this.cache.json.get('wavedata');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\n * this is what you would use to retrieve the text from the JSON Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\n * rather than the whole file. For example, if your JSON data had a structure like this:\n *\n * ```json\n * {\n * \"level1\": {\n * \"baddies\": {\n * \"aliens\": {},\n * \"boss\": {}\n * }\n * },\n * \"level2\": {},\n * \"level3\": {}\n * }\n * ```\n *\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\n *\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#json\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new JSONFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\n }\n\n return this;\n});\n\nmodule.exports = JSONFile;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'txt';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {integer} min - The minimum value.\r\n * @param {integer} max - The maximum value.\r\n *\r\n * @return {integer} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {integer} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n // TODO - Should work with basic values\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 0;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 0;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 1;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 1;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\r\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\r\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\r\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\r\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\r\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\r\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\r\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\r\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\r\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\r\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\r\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\r\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\r\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\r\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\r\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\r\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\r\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\r\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\r\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\r\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\r\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = [];\r\n var m1 = this.val;\r\n var m2 = src.val;\r\n\r\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\r\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\r\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\r\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\r\n\r\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\r\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\r\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\r\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\r\n\r\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\r\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\r\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\r\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\r\n\r\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\r\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\r\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\r\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\r\n\r\n return this.fromArray(a);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n this.fromArray([\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return null;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\r\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\r\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\r\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\r\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\r\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\r\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\r\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\r\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\r\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\r\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\r\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = v.x;\r\n out[13] = v.y;\r\n out[14] = v.z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = (near * 2) * rl;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (near * 2) * tb;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = (right + left) * rl;\r\n out[9] = (top + bottom) * tb;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (far * near * 2) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var out = this.val;\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = f / aspect;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = f;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (2 * far * near) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = (2 * near) / width;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (2 * near) / height;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = -far / (near - far);\r\n out[11] = 1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (near * far) / (near - far);\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n out[0] = -2 * lr;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = -2 * bt;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 2 * nf;\r\n out[11] = 0;\r\n\r\n out[12] = (left + right) * lr;\r\n out[13] = (top + bottom) * bt;\r\n out[14] = (far + near) * nf;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var out = this.val;\r\n\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n out[0] = x0;\r\n out[1] = y0;\r\n out[2] = z0;\r\n out[3] = 0;\r\n\r\n out[4] = x1;\r\n out[5] = y1;\r\n out[6] = z1;\r\n out[7] = 0;\r\n\r\n out[8] = x2;\r\n out[9] = y2;\r\n out[10] = z2;\r\n out[11] = 0;\r\n\r\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\r\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\r\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix !== undefined)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix !== undefined)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nvar _tempMat1 = new Matrix4();\r\nvar _tempMat2 = new Matrix4();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\nvar Matrix3 = require('./Matrix3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z;\r\n this.w = src.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n this.w += v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n this.w -= v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this.x = tmpvec.x;\r\n this.y = tmpvec.y;\r\n this.z = tmpvec.z;\r\n this.w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n this.x = s * axis.x;\r\n this.y = s * axis.y;\r\n this.z = s * axis.z;\r\n this.w = Math.cos(rad);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n this.x = ax * bw + aw * bx + ay * bz - az * by;\r\n this.y = ay * bw + aw * by + az * bx - ax * bz;\r\n this.z = az * bw + aw * bz + ax * by - ay * bx;\r\n this.w = aw * bw - ax * bx - ay * by - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n this.x = scale0 * ax + scale1 * bx;\r\n this.y = scale0 * ay + scale1 * by;\r\n this.z = scale0 * az + scale1 * bz;\r\n this.w = scale0 * aw + scale1 * bw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\r\n\r\n this.x = -a0 * invDot;\r\n this.y = -a1 * invDot;\r\n this.z = -a2 * invDot;\r\n this.w = a3 * invDot;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + aw * bx;\r\n this.y = ay * bw + az * bx;\r\n this.z = az * bw - ay * bx;\r\n this.w = aw * bw - ax * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw - az * by;\r\n this.y = ay * bw + aw * by;\r\n this.z = az * bw + ax * by;\r\n this.w = aw * bw - ay * by;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + ay * bz;\r\n this.y = ay * bw - ax * bz;\r\n this.z = az * bw + aw * bz;\r\n this.w = aw * bw - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this.x = (m[7] - m[5]) * fRoot;\r\n this.y = (m[2] - m[6]) * fRoot;\r\n this.z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this.x = tmp[0];\r\n this.y = tmp[1];\r\n this.z = tmp[2];\r\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {integer} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n // TODO: Not spherical; should fix this for more uniform distribution\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n * \r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n * \r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n * \r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {integer} index - The position within the grid to get the x/y value for.\r\n * @param {integer} width - The width of the grid.\r\n * @param {integer} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n\r\n out.set(x, y);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // TODO: is this really the same as Vector3?\r\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n// TODO: Check if these are required internally, if not, remove.\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * TODO: Wrap the angles in this function?\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n * \r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n * \r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n * \r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n * \r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n * \r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n * \r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n * \r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n * \r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n MaxAdd: require('./MaxAdd'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {integer} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n * \r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n * \r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n * \r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2020 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2020 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * \r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n * \r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n * \r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.ADD\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n * \r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n * \r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n * \r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n * \r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n * \r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n * \r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n * \r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n * \r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n * \r\n * @name Phaser.BlendModes.HUE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n * \r\n * @name Phaser.BlendModes.ERASE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n * \r\n * @name Phaser.BlendModes.COPY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n * \r\n * @name Phaser.BlendModes.XOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PIPELINE_CONST = {\r\n\r\n /**\r\n * The Bitmap Mask Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n BITMAPMASK_PIPELINE: 'BitmapMaskPipeline',\r\n\r\n /**\r\n * The Light 2D Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n LIGHT_PIPELINE: 'Light2D',\r\n\r\n /**\r\n * The Single Texture Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n SINGLE_PIPELINE: 'SinglePipeline',\r\n\r\n /**\r\n * The Multi Texture Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n MULTI_PIPELINE: 'MultiPipeline',\r\n\r\n /**\r\n * The Rope Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE\r\n * @type {string}\r\n * @const\r\n * @since 3.50.0\r\n */\r\n ROPE_PIPELINE: 'RopePipeline'\r\n\r\n};\r\n\r\nmodule.exports = PIPELINE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n * \r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n * \r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n * \r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n * \r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#CREATE\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\r\n * \r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n * \r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n * \r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\r\n * \r\n * A Scene will only render if it is visible and active.\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n * \r\n * @event Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n * \r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\r\n * \r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n * \r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n * \r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n * \r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n * \r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n * \r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n * \r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Scenes.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CREATE: require('./CREATE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\n READY: require('./READY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n RENDER: require('./RENDER_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\n SLEEP: require('./SLEEP_EVENT'),\n START: require('./START_EVENT'),\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\n UPDATE: require('./UPDATE_EVENT'),\n WAKE: require('./WAKE_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {*} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.CREATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.INIT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INIT: 1,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.OFFSET_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n OFFSET_DELAY: 3,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PENDING_RENDER\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_FORWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_BACKWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.HOLD_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.REPEAT_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_ADD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_ADD: 20,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PAUSED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSED: 21,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.LOOP_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.ACTIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 23,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 24,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_REMOVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.REMOVED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n * \r\n * Each item must be unique within the array.\r\n * \r\n * Existing elements in the array are shifted up.\r\n * \r\n * The array is modified in-place and returned.\r\n * \r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {integer} [index=0] - The index in the array where the item will be inserted.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {integer} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {integer} startIndex - The start index to search from.\r\n * @param {integer} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {integer} [startIndex=0] - An optional start index.\r\n * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {integer} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\r\n\r\n/**\r\n * Create an array of numbers (positive and/or negative) progressing from `start`\r\n * up to but not including `end` by advancing by `step`.\r\n *\r\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\n *\r\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\r\n * for forward compatibility make sure to pass in actual numbers.\r\n * \r\n * @example\r\n * NumberArrayStep(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * NumberArrayStep(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * NumberArrayStep(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * NumberArrayStep(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * NumberArrayStep(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * NumberArrayStep(0);\r\n * // => []\r\n *\r\n * @function Phaser.Utils.Array.NumberArrayStep\r\n * @since 3.0.0\r\n *\r\n * @param {number} [start=0] - The start of the range.\r\n * @param {number} [end=null] - The end of the range.\r\n * @param {number} [step=1] - The value to increment or decrement by.\r\n *\r\n * @return {number[]} The array of number values.\r\n */\r\nvar NumberArrayStep = function (start, end, step)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (end === undefined) { end = null; }\r\n if (step === undefined) { step = 1; }\r\n\r\n if (end === null)\r\n {\r\n end = start;\r\n start = 0;\r\n }\r\n\r\n var result = [];\r\n\r\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n result.push(start);\r\n start += step;\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArrayStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {integer} k - The k-th element index.\r\n * @param {integer} [left=0] - The index of the left part of the range.\r\n * @param {integer} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = require('../object/GetValue');\r\nvar Shuffle = require('./Shuffle');\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n * \r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n * \r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n * \r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n * \r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n * \r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n * \r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n else\r\n {\r\n // Item wasn't found in the array, so remove it from our return results\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Remove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} startIndex - The start index to remove from.\r\n * @param {integer} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {integer} [start=0] - The array index to start the search from.\r\n * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search within.\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The \"rotation\" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The \"rotation\" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n * \r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {integer} startIndex - The start index.\r\n * @param {integer} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len ||\r\n startIndex + endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {integer} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n","/**\r\n * @author Richard Davey \r\n * @author Angry Bytes (and contributors)\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl)\r\n {\r\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0)\r\n {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Utils.Array\n */\n\nmodule.exports = {\n\n Matrix: require('./matrix'),\n\n Add: require('./Add'),\n AddAt: require('./AddAt'),\n BringToTop: require('./BringToTop'),\n CountAllMatching: require('./CountAllMatching'),\n Each: require('./Each'),\n EachInRange: require('./EachInRange'),\n FindClosestInSorted: require('./FindClosestInSorted'),\n GetAll: require('./GetAll'),\n GetFirst: require('./GetFirst'),\n GetRandom: require('./GetRandom'),\n MoveDown: require('./MoveDown'),\n MoveTo: require('./MoveTo'),\n MoveUp: require('./MoveUp'),\n NumberArray: require('./NumberArray'),\n NumberArrayStep: require('./NumberArrayStep'),\n QuickSelect: require('./QuickSelect'),\n Range: require('./Range'),\n Remove: require('./Remove'),\n RemoveAt: require('./RemoveAt'),\n RemoveBetween: require('./RemoveBetween'),\n RemoveRandomElement: require('./RemoveRandomElement'),\n Replace: require('./Replace'),\n RotateLeft: require('./RotateLeft'),\n RotateRight: require('./RotateRight'),\n SafeRange: require('./SafeRange'),\n SendToBack: require('./SendToBack'),\n SetAll: require('./SetAll'),\n Shuffle: require('./Shuffle'),\n SortByDigits: require('./SortByDigits'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = require('../../string/Pad');\r\nvar CheckMatrix = require('./CheckMatrix');\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = require('./CheckMatrix');\r\nvar TransposeMatrix = require('./TransposeMatrix');\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n * \r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: require('./CheckMatrix'),\r\n MatrixToString: require('./MatrixToString'),\r\n ReverseColumns: require('./ReverseColumns'),\r\n ReverseRows: require('./ReverseRows'),\r\n Rotate180: require('./Rotate180'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateMatrix: require('./RotateMatrix'),\r\n RotateRight: require('./RotateRight'),\r\n TransposeMatrix: require('./TransposeMatrix')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n * \r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n * \r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Source object\r\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\r\n// The default value to use if the key doesn't exist\r\n\r\n/**\r\n * Retrieves a value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var value = defaultValue;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n value = parent[keys[i]];\r\n\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n // Can't go any further, so reset to default\r\n value = defaultValue;\r\n break;\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and pads it out, to the length required, using the character\r\n * specified. For example if you need a string to be 6 characters long, you can call:\r\n *\r\n * `pad('bob', 6, '-', 2)`\r\n *\r\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\n *\r\n * You can also use it to pad numbers (they are always returned as strings):\r\n * \r\n * `pad(512, 6, '0', 1)`\r\n *\r\n * Would return: `000512` with the string padded to the left.\r\n *\r\n * If you don't specify a direction it'll pad to both sides:\r\n * \r\n * `pad('c64', 7, '*')`\r\n *\r\n * Would return: `**c64**`\r\n *\r\n * @function Phaser.Utils.String.Pad\r\n * @since 3.0.0\r\n *\r\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\r\n * @param {integer} [len=0] - The number of characters to be added.\r\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\r\n * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\r\n * \r\n * @return {string} The padded string.\r\n */\r\nvar Pad = function (str, len, pad, dir)\r\n{\r\n if (len === undefined) { len = 0; }\r\n if (pad === undefined) { pad = ' '; }\r\n if (dir === undefined) { dir = 3; }\r\n\r\n str = str.toString();\r\n\r\n var padlen = 0;\r\n\r\n if (len + 1 >= str.length)\r\n {\r\n switch (dir)\r\n {\r\n case 1:\r\n str = new Array(len + 1 - str.length).join(pad) + str;\r\n break;\r\n\r\n case 3:\r\n var right = Math.ceil((padlen = len - str.length) / 2);\r\n var left = padlen - right;\r\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\r\n break;\r\n\r\n default:\r\n str = str + new Array(len + 1 - str.length).join(pad);\r\n break;\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = Pad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\r\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\r\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\r\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\r\nvar MultiFile = require('../../../src/loader/MultiFile.js');\r\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\r\n\r\n/**\r\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\r\n *\r\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Spine File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\r\n *\r\n * @class SpineFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar SpineFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var i;\r\n var json;\r\n var atlas;\r\n var files = [];\r\n var cache = loader.cacheManager.custom.spine;\r\n\r\n // atlas can be an array of atlas files, not just a single one\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n json = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'jsonURL'),\r\n extension: GetFastValue(config, 'jsonExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\r\n });\r\n\r\n atlasURL = GetFastValue(config, 'atlasURL');\r\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, {\r\n key: key + '_' + i,\r\n url: atlasURL[i],\r\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n else\r\n {\r\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n\r\n files.unshift(json);\r\n\r\n MultiFile.call(this, loader, 'spine', key, files);\r\n\r\n this.config.preMultipliedAlpha = preMultipliedAlpha;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'text')\r\n {\r\n // Inspect the data for the files to now load\r\n var content = file.data.split('\\n');\r\n\r\n // Extract the textures\r\n var textures = [];\r\n\r\n for (var t = 0; t < content.length; t++)\r\n {\r\n var line = content[t];\r\n\r\n if (line.trim() === '' && t < content.length - 1)\r\n {\r\n line = content[t + 1];\r\n\r\n textures.push(line);\r\n }\r\n }\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\r\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\r\n var prefix = GetFastValue(config, 'prefix', this.prefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n var textureURL = textures[i];\r\n\r\n var key = this.prefix + textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\r\n * @since 3.19.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var atlasCache;\r\n var atlasKey = '';\r\n var combinedAtlasData = '';\r\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\r\n var textureManager = this.loader.textureManager;\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'text')\r\n {\r\n atlasKey = file.key.replace(/_[\\d]$/, '');\r\n\r\n atlasCache = file.cache;\r\n\r\n combinedAtlasData = combinedAtlasData.concat(file.data);\r\n }\r\n else\r\n {\r\n var src = file.key.trim();\r\n var pos = src.indexOf('_');\r\n var key = src.substr(pos + 1);\r\n\r\n if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetValue = require('../../../src/utils/object/GetValue');\r\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\r\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\r\nvar Spine = require('Spine');\r\nvar SpineFile = require('./SpineFile');\r\nvar SpineGameObject = require('./gameobject/SpineGameObject');\r\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\r\n\r\n/**\r\n * @classdesc\r\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\r\n *\r\n * Find more details about Spine itself at http://esotericsoftware.com/.\r\n *\r\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\r\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\r\n *\r\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\r\n *\r\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\r\n *\r\n * ```javascript\r\n * import * as SpinePlugin from './SpinePlugin.js';\r\n * ```\r\n *\r\n * and then adding it to your Phaser Game configuration:\r\n *\r\n * ```javascript\r\n * plugins: {\r\n * scene: [\r\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\r\n * ]\r\n * }\r\n * ```\r\n *\r\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\r\n * Game Configuration object, like this:\r\n *\r\n * ```javascript\r\n * scene: {\r\n * preload: preload,\r\n * create: create,\r\n * pack: {\r\n * files: [\r\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\r\n * ]\r\n * }\r\n * }\r\n * ```\r\n *\r\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\r\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\r\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\r\n * subsequent Scenes.\r\n *\r\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\r\n *\r\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\r\n * Spine files directly, i.e.:\r\n *\r\n * ```javascript\r\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\r\n * ```\r\n *\r\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\r\n * ```\r\n *\r\n * The first argument is the key which you used when importing the Spine data. There are lots of\r\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\r\n * see the respective documentation and examples for further details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\r\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\r\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\r\n * load arguments, or you may see black outlines around skeleton textures.\r\n *\r\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\r\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\r\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\r\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\r\n * game, regardless if the Scene loaded the Spine data or not.\r\n *\r\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\r\n *\r\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\r\n *\r\n * @class SpinePlugin\r\n * @extends Phaser.Plugins.ScenePlugin\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\r\n */\r\nvar SpinePlugin = new Class({\r\n\r\n Extends: ScenePlugin,\r\n\r\n initialize:\r\n\r\n function SpinePlugin (scene, pluginManager)\r\n {\r\n ScenePlugin.call(this, scene, pluginManager);\r\n\r\n var game = pluginManager.game;\r\n\r\n /**\r\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\r\n *\r\n * @name SpinePlugin#isWebGL\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isWebGL = (game.config.renderType === 2);\r\n\r\n /**\r\n * A custom cache that stores the Spine atlas data.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.cache = game.cache.addCustom('spine');\r\n\r\n /**\r\n * A custom cache that stores the Spine Textures.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#spineTextures\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.spineTextures = game.cache.addCustom('spineTextures');\r\n\r\n /**\r\n * A reference to the global JSON Cache.\r\n *\r\n * @name SpinePlugin#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.json = game.cache.json;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name SpinePlugin#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.19.0\r\n */\r\n this.textures = game.textures;\r\n\r\n /**\r\n * A flag that sets if the Skeleton Renderers will render debug information over the top\r\n * of the skeleton or not.\r\n *\r\n * @name SpinePlugin#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The underlying WebGL context of the Phaser renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.19.0\r\n */\r\n this.gl;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name SpinePlugin#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.renderer;\r\n\r\n /**\r\n * An instance of the Spine WebGL Scene Renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#sceneRenderer\r\n * @type {spine.webgl.SceneRenderer}\r\n * @since 3.19.0\r\n */\r\n this.sceneRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Renderer.\r\n *\r\n * @name SpinePlugin#skeletonRenderer\r\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.skeletonRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Debug Renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#skeletonDebugRenderer\r\n * @type {spine.webgl.skeletonDebugRenderer}\r\n * @since 3.19.0\r\n */\r\n this.skeletonDebugRenderer;\r\n\r\n /**\r\n * A reference to the Spine runtime.\r\n * This is the runtime created by Esoteric Software\r\n *\r\n * @name SpinePlugin#plugin\r\n * @type {spine}\r\n * @since 3.19.0\r\n */\r\n this.plugin = Spine;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp1\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp1;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp2\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp2;\r\n\r\n if (this.isWebGL)\r\n {\r\n this.runtime = Spine.webgl;\r\n\r\n this.renderer = game.renderer;\r\n this.gl = game.renderer.gl;\r\n\r\n this.getAtlas = this.getAtlasWebGL;\r\n }\r\n else\r\n {\r\n this.runtime = Spine.canvas;\r\n\r\n this.renderer = game.renderer;\r\n\r\n this.getAtlas = this.getAtlasCanvas;\r\n }\r\n\r\n // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\r\n }\r\n\r\n var _this = this;\r\n\r\n var add = function (x, y, key, animationName, loop)\r\n {\r\n var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop);\r\n\r\n this.displayList.add(spineGO);\r\n this.updateList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var make = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetValue(config, 'key', null);\r\n var animationName = GetValue(config, 'animationName', null);\r\n var loop = GetValue(config, 'loop', false);\r\n\r\n var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, spineGO, config);\r\n\r\n // Spine specific\r\n var skinName = GetValue(config, 'skinName', false);\r\n\r\n if (skinName)\r\n {\r\n spineGO.setSkinByName(skinName);\r\n }\r\n\r\n var slotName = GetValue(config, 'slotName', false);\r\n var attachmentName = GetValue(config, 'attachmentName', null);\r\n\r\n if (slotName)\r\n {\r\n spineGO.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return spineGO.refresh();\r\n };\r\n\r\n var addContainer = function (x, y, children)\r\n {\r\n var spineGO = new SpineContainer(this.scene, _this, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var container = new SpineContainer(this.scene, _this, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\r\n },\r\n\r\n /**\r\n * Internal boot handler.\r\n *\r\n * @method SpinePlugin#boot\r\n * @private\r\n * @since 3.19.0\r\n */\r\n boot: function ()\r\n {\r\n if (this.isWebGL)\r\n {\r\n this.bootWebGL();\r\n this.onResize();\r\n this.game.scale.on(ResizeEvent, this.onResize, this);\r\n }\r\n else\r\n {\r\n this.bootCanvas();\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n eventEmitter.once('destroy', this.destroy, this);\r\n\r\n this.game.events.once('destroy', this.gameDestroy, this);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the Canvas Renderer.\r\n *\r\n * @method SpinePlugin#bootCanvas\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootCanvas: function ()\r\n {\r\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the WebGL Renderer.\r\n *\r\n * @method SpinePlugin#bootWebGL\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootWebGL: function ()\r\n {\r\n this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n\r\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\r\n\r\n var setBlendMode = function (srcBlend, dstBlend)\r\n {\r\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\r\n {\r\n var gl = this.context.gl;\r\n\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n\r\n if (this.isDrawing)\r\n {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n }\r\n };\r\n\r\n this.sceneRenderer.batcher.setBlendMode = setBlendMode;\r\n this.sceneRenderer.shapes.setBlendMode = setBlendMode;\r\n\r\n this.skeletonRenderer = this.sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = this.sceneRenderer.skeletonDebugRenderer;\r\n\r\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\r\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasCanvas: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasWebGL\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasWebGL: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n var gl = this.sceneRenderer.context.gl;\r\n\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\r\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\r\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\r\n * outlines around skeleton textures.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\r\n * Loading a file using a key that is already taken will result in a warning.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.spine({\r\n * key: 'mainmenu',\r\n * jsonURL: 'boy.json',\r\n * atlasURL: 'boy.atlas',\r\n * preMultipliedAlpha: true\r\n * });\r\n * ```\r\n *\r\n * If you need to load multiple Spine atlas files, provide them as an array:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\r\n * }\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the data from the Spine plugin.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spine\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var multifile;\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new SpineFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#worldToLocal\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The screen space x coordinate to convert.\r\n * @param {number} y - The screen space y coordinate to convert.\r\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\r\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\r\n *\r\n * @return {spine.Vector2} A Vector2 containing the translated point.\r\n */\r\n worldToLocal: function (x, y, skeleton, bone)\r\n {\r\n var temp1 = this.temp1;\r\n var temp2 = this.temp2;\r\n var camera = this.sceneRenderer.camera;\r\n\r\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\r\n\r\n var width = camera.viewportWidth;\r\n var height = camera.viewportHeight;\r\n\r\n camera.screenToWorld(temp1, width, height);\r\n\r\n if (bone && bone.parent !== null)\r\n {\r\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\r\n\r\n return new Spine.Vector2(temp2.x, temp2.y);\r\n }\r\n else if (bone)\r\n {\r\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\r\n }\r\n else\r\n {\r\n return new Spine.Vector2(temp1.x, temp1.y);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x and y values.\r\n *\r\n * @method SpinePlugin#getVector2\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector2: function (x, y)\r\n {\r\n return new Spine.Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x, y and z values.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#getVector3\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n * @param {number} z - The Vector z value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector3: function (x, y, z)\r\n {\r\n return new Spine.webgl.Vector3(x, y, z);\r\n },\r\n\r\n /**\r\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBones\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBones: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBones = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugRegionAttachments\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugRegionAttachments: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawRegionAttachments = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBoundingBoxes\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBoundingBoxes: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshHull\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshHull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshHull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshTriangles\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshTriangles: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshTriangles = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugPaths\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugPaths: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawPaths = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugSkeletonXY\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugSkeletonXY: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawSkeletonXY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugClipping\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugClipping: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawClipping = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the given vertex effect on the Spine Skeleton Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setEffect\r\n * @since 3.19.0\r\n *\r\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setEffect: function (effect)\r\n {\r\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\r\n *\r\n * The Skeleton data should have already been loaded before calling this method.\r\n *\r\n * @method SpinePlugin#createSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\r\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\r\n *\r\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\r\n */\r\n createSkeleton: function (key, skeletonJSON)\r\n {\r\n var atlasKey = key;\r\n var jsonKey = key;\r\n var split = (key.indexOf('.') !== -1);\r\n\r\n if (split)\r\n {\r\n var parts = key.split('.');\r\n\r\n atlasKey = parts.shift();\r\n jsonKey = parts.join('.');\r\n }\r\n\r\n var atlasData = this.cache.get(atlasKey);\r\n var atlas = this.getAtlas(atlasKey);\r\n\r\n if (!atlas)\r\n {\r\n return null;\r\n }\r\n\r\n if (!this.spineTextures.has(atlasKey))\r\n {\r\n this.spineTextures.add(atlasKey, atlas);\r\n }\r\n\r\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\r\n\r\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\r\n\r\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\r\n\r\n var data;\r\n\r\n if (skeletonJSON)\r\n {\r\n data = skeletonJSON;\r\n }\r\n else\r\n {\r\n var json = this.json.get(atlasKey);\r\n\r\n data = (split) ? GetValue(json, jsonKey) : json;\r\n }\r\n\r\n if (data)\r\n {\r\n var skeletonData = skeletonJson.readSkeletonData(data);\r\n\r\n var skeleton = new Spine.Skeleton(skeletonData);\r\n\r\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Animation State and Animation State Data for the given skeleton.\r\n *\r\n * The returned object contains two properties: `state` and `stateData` respectively.\r\n *\r\n * @method SpinePlugin#createAnimationState\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\r\n *\r\n * @return {any} An object containing the Animation State and Animation State Data instances.\r\n */\r\n createAnimationState: function (skeleton)\r\n {\r\n var stateData = new Spine.AnimationStateData(skeleton.data);\r\n\r\n var state = new Spine.AnimationState(stateData);\r\n\r\n return { stateData: stateData, state: state };\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpinePlugin#getBounds\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function (skeleton)\r\n {\r\n var offset = new Spine.Vector2();\r\n var size = new Spine.Vector2();\r\n\r\n skeleton.getBounds(offset, size, []);\r\n\r\n return { offset: offset, size: size };\r\n },\r\n\r\n /**\r\n * Internal handler for when the renderer resizes.\r\n *\r\n * Only called if running in WebGL.\r\n *\r\n * @method SpinePlugin#onResize\r\n * @since 3.19.0\r\n */\r\n onResize: function ()\r\n {\r\n var renderer = this.renderer;\r\n var sceneRenderer = this.sceneRenderer;\r\n\r\n var viewportWidth = renderer.width;\r\n var viewportHeight = renderer.height;\r\n\r\n sceneRenderer.camera.position.x = viewportWidth / 2;\r\n sceneRenderer.camera.position.y = viewportHeight / 2;\r\n\r\n sceneRenderer.camera.viewportWidth = viewportWidth;\r\n sceneRenderer.camera.viewportHeight = viewportHeight;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n *\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method SpinePlugin#shutdown\r\n * @private\r\n * @since 3.19.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n *\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method SpinePlugin#destroy\r\n * @private\r\n * @since 3.19.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.cache = null;\r\n this.spineTextures = null;\r\n this.json = null;\r\n this.textures = null;\r\n this.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.destroy();\r\n\r\n if (this.sceneRenderer)\r\n {\r\n this.sceneRenderer.dispose();\r\n }\r\n\r\n this.sceneRenderer = null;\r\n this.pluginManager = null;\r\n\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\r\n\r\n/**\r\n * Creates a new Spine Game Object and adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\r\n *\r\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\r\n *\r\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\r\n * name, then use `SpinePlugin.make` instead.\r\n *\r\n * @method SpinePlugin#add\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\n/**\r\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 500, y: 500, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-idle', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * @method SpinePlugin#make\r\n * @since 3.19.0\r\n *\r\n * @param {any} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\nmodule.exports = SpinePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../../src/utils/Class');\r\nvar Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects to this type of Container. Although Phaser will\r\n * not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spinecontainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spinecontainer();\r\n * ```\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = SpineContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineContainerWebGLRenderer#renderWebGL\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var plugin = container.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n }\r\n\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var alpha = container.alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n var GameObjectRenderMask = 15;\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var src = children[i];\r\n\r\n var skeleton = src.skeleton;\r\n var childAlpha = skeleton.color.a;\r\n\r\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\r\n\r\n if (!skeleton || !willRender)\r\n {\r\n continue;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(transformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n // Add autoUpdate option\r\n skeleton.updateWorldTransform();\r\n\r\n skeleton.color.a = Clamp(childAlpha * alpha, 0, 1);\r\n\r\n // Draw the current skeleton\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n // Restore alpha\r\n skeleton.color.a = childAlpha;\r\n }\r\n\r\n if (!renderer.nextTypeMatch)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineContainerWebGLRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n *\r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n *\r\n * The quickest way is the Game Object Factory:\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n *\r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n *\r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n *\r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n *\r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but\r\n * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created.\r\n * If it's not suitable, provide your own shape to the `setInteractive` method.\r\n *\r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n *\r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = -1;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Overrides the default Game Object method and always returns true.\r\n * Rendering is decided in the renderer functions.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @return {boolean} Always returns `true`.\r\n */\r\n willRender: function ()\r\n {\r\n return true;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n *\r\n * The alpha controls the opacity of the Game Object as it renders.\r\n *\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n *\r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n *\r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n *\r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n *\r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n *\r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n *\r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n *\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n *\r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n *\r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(trackIndex);\r\n\r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n *\r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n *\r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n *\r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n *\r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n *\r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderCanvas\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var context = renderer.currentContext;\n\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var skeletonRenderer = plugin.skeletonRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\n\n if (!skeleton || !willRender)\n {\n return;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n\n // Inverse or we get upside-down skeletons\n skeleton.scaleY = calcMatrix.scaleY * -1;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeletonRenderer.ctx = context;\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\n\n context.save();\n\n skeletonRenderer.draw(skeleton);\n\n context.restore();\n};\n\nmodule.exports = SpineGameObjectCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderWebGL\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var childAlpha = skeleton.color.a;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n var GameObjectRenderMask = 15;\r\n\r\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\r\n\r\n if (!skeleton || !willRender)\r\n {\r\n // If there is already a batch running, and the next type isn't a Spine object, or this is the end, we need to close it\r\n\r\n if (sceneRenderer.batcher.isDrawing && (!renderer.nextTypeMatch || renderer.finalType))\r\n {\r\n // The next object in the display list is not a Spine object, so we end the batch\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n }\r\n\r\n if (!renderer.finalType)\r\n {\r\n // Reset the current type\r\n renderer.currentType = '';\r\n }\r\n\r\n return;\r\n }\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n // Add autoUpdate option\r\n skeleton.updateWorldTransform();\r\n\r\n if (renderer.newType)\r\n {\r\n sceneRenderer.begin();\r\n }\r\n\r\n // Draw the current skeleton\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n }\r\n\r\n if (!renderer.nextTypeMatch)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLRenderer;\r\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\r\n var current = tracks[i_16];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline_1 = timelines[ii];\r\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline_1 instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\r\n direction = spine.MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = timeline.frames;\r\n if (time < frames[0]) {\r\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n };\r\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = spine.MixBlend.replace;\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD_SUBSEQUENT = 2;\r\n AnimationState.HOLD_FIRST = 3;\r\n AnimationState.HOLD_MIX = 4;\r\n AnimationState.SETUP = 1;\r\n AnimationState.CURRENT = 2;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.rawDataUris = {};\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.prototype.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.setRawDataURI = function (path, data) {\r\n this.rawDataUris[this.pathPrefix + path] = data;\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n var storagePath = path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[storagePath] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \" + path);\r\n };\r\n if (this.rawDataUris[path])\r\n path = this.rawDataUris[path];\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case spine.TransformMode.NoRotationOrReflection:\r\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n var sa = pa / bone.skeleton.scaleX;\r\n var sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\r\n default:\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n _this.rawAssets[path] = img;\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n };\r\n img.src = path;\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.hasOwnProperty(\"curve\"))\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \" + str);\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \" + str);\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \" + str);\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \" + text);\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \" + text);\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n canvas.AssetManager = AssetManager;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var CanvasTexture = (function (_super) {\r\n __extends(CanvasTexture, _super);\r\n function CanvasTexture(image) {\r\n return _super.call(this, image) || this;\r\n }\r\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n CanvasTexture.prototype.dispose = function () { };\r\n return CanvasTexture;\r\n }(spine.Texture));\r\n canvas.CanvasTexture = CanvasTexture;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new spine.Color();\r\n this.ctx = context;\r\n }\r\n SkeletonRenderer.prototype.draw = function (skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n };\r\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\r\n var ctx = this.ctx;\r\n var drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n ctx.save();\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n var regionAttachment = null;\r\n var region = null;\r\n var image = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n regionAttachment = attachment;\r\n region = regionAttachment.region;\r\n image = region.texture.getImage();\r\n }\r\n else\r\n continue;\r\n var skeleton_1 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_1.color;\r\n var slotColor = slot.color;\r\n var regionColor = regionAttachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\r\n var att = attachment;\r\n var bone = slot.bone;\r\n var w = region.width;\r\n var h = region.height;\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n var atlasScale = att.width / w;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.rotate) {\r\n var t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\r\n var blendMode = null;\r\n var vertices = this.vertices;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n var region = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.texture.getImage();\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture.getImage();\r\n }\r\n else\r\n continue;\r\n if (texture != null) {\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n }\r\n var skeleton_2 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_2.color;\r\n var slotColor = slot.color;\r\n var attachmentColor = attachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\r\n var ctx = this.ctx;\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n };\r\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n var ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = region.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var vertices = this.vertices;\r\n var uvs = region.uvs;\r\n vertices[spine.RegionAttachment.C1R] = color.r;\r\n vertices[spine.RegionAttachment.C1G] = color.g;\r\n vertices[spine.RegionAttachment.C1B] = color.b;\r\n vertices[spine.RegionAttachment.C1A] = color.a;\r\n vertices[spine.RegionAttachment.U1] = uvs[0];\r\n vertices[spine.RegionAttachment.V1] = uvs[1];\r\n vertices[spine.RegionAttachment.C2R] = color.r;\r\n vertices[spine.RegionAttachment.C2G] = color.g;\r\n vertices[spine.RegionAttachment.C2B] = color.b;\r\n vertices[spine.RegionAttachment.C2A] = color.a;\r\n vertices[spine.RegionAttachment.U2] = uvs[2];\r\n vertices[spine.RegionAttachment.V2] = uvs[3];\r\n vertices[spine.RegionAttachment.C3R] = color.r;\r\n vertices[spine.RegionAttachment.C3G] = color.g;\r\n vertices[spine.RegionAttachment.C3B] = color.b;\r\n vertices[spine.RegionAttachment.C3A] = color.a;\r\n vertices[spine.RegionAttachment.U3] = uvs[4];\r\n vertices[spine.RegionAttachment.V3] = uvs[5];\r\n vertices[spine.RegionAttachment.C4R] = color.r;\r\n vertices[spine.RegionAttachment.C4G] = color.g;\r\n vertices[spine.RegionAttachment.C4B] = color.b;\r\n vertices[spine.RegionAttachment.C4A] = color.a;\r\n vertices[spine.RegionAttachment.U4] = uvs[6];\r\n vertices[spine.RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n };\r\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = mesh.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n var numVertices = mesh.worldVerticesLength / 2;\r\n if (this.vertices.length < mesh.worldVerticesLength) {\r\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\r\n }\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var uvs = mesh.uvs;\r\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return SkeletonRenderer;\r\n }());\r\n canvas.SkeletonRenderer = SkeletonRenderer;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(context, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) {\r\n return new spine.webgl.GLTexture(context, image);\r\n }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n webgl.AssetManager = AssetManager;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var OrthoCamera = (function () {\r\n function OrthoCamera(viewportWidth, viewportHeight) {\r\n this.position = new webgl.Vector3(0, 0, 0);\r\n this.direction = new webgl.Vector3(0, 0, -1);\r\n this.up = new webgl.Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new webgl.Matrix4();\r\n this.inverseProjectionView = new webgl.Matrix4();\r\n this.projection = new webgl.Matrix4();\r\n this.view = new webgl.Matrix4();\r\n this.tmp = new webgl.Vector3();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n OrthoCamera.prototype.update = function () {\r\n var projection = this.projection;\r\n var view = this.view;\r\n var projectionView = this.projectionView;\r\n var inverseProjectionView = this.inverseProjectionView;\r\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n };\r\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\r\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n var tmp = this.tmp;\r\n tmp.x = (2 * x) / screenWidth - 1;\r\n tmp.y = (2 * y) / screenHeight - 1;\r\n tmp.z = (2 * screenCoords.z) - 1;\r\n tmp.project(this.inverseProjectionView);\r\n screenCoords.set(tmp.x, tmp.y, tmp.z);\r\n return screenCoords;\r\n };\r\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n };\r\n return OrthoCamera;\r\n }());\r\n webgl.OrthoCamera = OrthoCamera;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var GLTexture = (function (_super) {\r\n __extends(GLTexture, _super);\r\n function GLTexture(context, image, useMipMaps) {\r\n if (useMipMaps === void 0) { useMipMaps = false; }\r\n var _this = _super.call(this, image) || this;\r\n _this.texture = null;\r\n _this.boundUnit = 0;\r\n _this.useMipMaps = false;\r\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n _this.useMipMaps = useMipMaps;\r\n _this.restore();\r\n _this.context.addRestorable(_this);\r\n return _this;\r\n }\r\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\r\n };\r\n GLTexture.validateMagFilter = function (magFilter) {\r\n switch (magFilter) {\r\n case spine.TextureFilter.MipMap:\r\n case spine.TextureFilter.MipMapLinearLinear:\r\n case spine.TextureFilter.MipMapLinearNearest:\r\n case spine.TextureFilter.MipMapNearestLinear:\r\n case spine.TextureFilter.MipMapNearestNearest:\r\n return spine.TextureFilter.Linear;\r\n default:\r\n return magFilter;\r\n }\r\n };\r\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n };\r\n GLTexture.prototype.update = function (useMipMaps) {\r\n var gl = this.context.gl;\r\n if (!this.texture) {\r\n this.texture = this.context.gl.createTexture();\r\n }\r\n this.bind();\r\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n };\r\n GLTexture.prototype.restore = function () {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n };\r\n GLTexture.prototype.bind = function (unit) {\r\n if (unit === void 0) { unit = 0; }\r\n var gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n };\r\n GLTexture.prototype.unbind = function () {\r\n var gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n };\r\n GLTexture.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n };\r\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\r\n return GLTexture;\r\n }(spine.Texture));\r\n webgl.GLTexture = GLTexture;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n webgl.M00 = 0;\r\n webgl.M01 = 4;\r\n webgl.M02 = 8;\r\n webgl.M03 = 12;\r\n webgl.M10 = 1;\r\n webgl.M11 = 5;\r\n webgl.M12 = 9;\r\n webgl.M13 = 13;\r\n webgl.M20 = 2;\r\n webgl.M21 = 6;\r\n webgl.M22 = 10;\r\n webgl.M23 = 14;\r\n webgl.M30 = 3;\r\n webgl.M31 = 7;\r\n webgl.M32 = 11;\r\n webgl.M33 = 15;\r\n var Matrix4 = (function () {\r\n function Matrix4() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M11] = 1;\r\n v[webgl.M22] = 1;\r\n v[webgl.M33] = 1;\r\n }\r\n Matrix4.prototype.set = function (values) {\r\n this.values.set(values);\r\n return this;\r\n };\r\n Matrix4.prototype.transpose = function () {\r\n var t = this.temp;\r\n var v = this.values;\r\n t[webgl.M00] = v[webgl.M00];\r\n t[webgl.M01] = v[webgl.M10];\r\n t[webgl.M02] = v[webgl.M20];\r\n t[webgl.M03] = v[webgl.M30];\r\n t[webgl.M10] = v[webgl.M01];\r\n t[webgl.M11] = v[webgl.M11];\r\n t[webgl.M12] = v[webgl.M21];\r\n t[webgl.M13] = v[webgl.M31];\r\n t[webgl.M20] = v[webgl.M02];\r\n t[webgl.M21] = v[webgl.M12];\r\n t[webgl.M22] = v[webgl.M22];\r\n t[webgl.M23] = v[webgl.M32];\r\n t[webgl.M30] = v[webgl.M03];\r\n t[webgl.M31] = v[webgl.M13];\r\n t[webgl.M32] = v[webgl.M23];\r\n t[webgl.M33] = v[webgl.M33];\r\n return this.set(t);\r\n };\r\n Matrix4.prototype.identity = function () {\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M01] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M03] = 0;\r\n v[webgl.M10] = 0;\r\n v[webgl.M11] = 1;\r\n v[webgl.M12] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M21] = 0;\r\n v[webgl.M22] = 1;\r\n v[webgl.M23] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M32] = 0;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.invert = function () {\r\n var v = this.values;\r\n var t = this.temp;\r\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n var inv_det = 1.0 / l_det;\r\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\r\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\r\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\r\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\r\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\r\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\r\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\r\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\r\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\r\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\r\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\r\n v[webgl.M00] = t[webgl.M00] * inv_det;\r\n v[webgl.M01] = t[webgl.M01] * inv_det;\r\n v[webgl.M02] = t[webgl.M02] * inv_det;\r\n v[webgl.M03] = t[webgl.M03] * inv_det;\r\n v[webgl.M10] = t[webgl.M10] * inv_det;\r\n v[webgl.M11] = t[webgl.M11] * inv_det;\r\n v[webgl.M12] = t[webgl.M12] * inv_det;\r\n v[webgl.M13] = t[webgl.M13] * inv_det;\r\n v[webgl.M20] = t[webgl.M20] * inv_det;\r\n v[webgl.M21] = t[webgl.M21] * inv_det;\r\n v[webgl.M22] = t[webgl.M22] * inv_det;\r\n v[webgl.M23] = t[webgl.M23] * inv_det;\r\n v[webgl.M30] = t[webgl.M30] * inv_det;\r\n v[webgl.M31] = t[webgl.M31] * inv_det;\r\n v[webgl.M32] = t[webgl.M32] * inv_det;\r\n v[webgl.M33] = t[webgl.M33] * inv_det;\r\n return this;\r\n };\r\n Matrix4.prototype.determinant = function () {\r\n var v = this.values;\r\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n };\r\n Matrix4.prototype.translate = function (x, y, z) {\r\n var v = this.values;\r\n v[webgl.M03] += x;\r\n v[webgl.M13] += y;\r\n v[webgl.M23] += z;\r\n return this;\r\n };\r\n Matrix4.prototype.copy = function () {\r\n return new Matrix4().set(this.values);\r\n };\r\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\r\n this.identity();\r\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\r\n var l_a1 = (far + near) / (near - far);\r\n var l_a2 = (2 * far * near) / (near - far);\r\n var v = this.values;\r\n v[webgl.M00] = l_fd / aspectRatio;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = l_fd;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = l_a1;\r\n v[webgl.M32] = -1;\r\n v[webgl.M03] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M23] = l_a2;\r\n v[webgl.M33] = 0;\r\n return this;\r\n };\r\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n };\r\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\r\n this.identity();\r\n var x_orth = 2 / (right - left);\r\n var y_orth = 2 / (top - bottom);\r\n var z_orth = -2 / (far - near);\r\n var tx = -(right + left) / (right - left);\r\n var ty = -(top + bottom) / (top - bottom);\r\n var tz = -(far + near) / (far - near);\r\n var v = this.values;\r\n v[webgl.M00] = x_orth;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = y_orth;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = z_orth;\r\n v[webgl.M32] = 0;\r\n v[webgl.M03] = tx;\r\n v[webgl.M13] = ty;\r\n v[webgl.M23] = tz;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.multiply = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\r\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\r\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\r\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\r\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\r\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\r\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\r\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\r\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\r\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\r\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\r\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\r\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\r\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\r\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\r\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.multiplyLeft = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\r\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\r\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\r\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\r\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\r\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\r\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\r\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\r\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\r\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\r\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\r\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\r\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\r\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\r\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\r\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.lookAt = function (position, direction, up) {\r\n Matrix4.initTemps();\r\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n var val = this.values;\r\n val[webgl.M00] = xAxis.x;\r\n val[webgl.M01] = xAxis.y;\r\n val[webgl.M02] = xAxis.z;\r\n val[webgl.M10] = yAxis.x;\r\n val[webgl.M11] = yAxis.y;\r\n val[webgl.M12] = yAxis.z;\r\n val[webgl.M20] = -zAxis.x;\r\n val[webgl.M21] = -zAxis.y;\r\n val[webgl.M22] = -zAxis.z;\r\n Matrix4.tmpMatrix.identity();\r\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\r\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\r\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\r\n this.multiply(Matrix4.tmpMatrix);\r\n return this;\r\n };\r\n Matrix4.initTemps = function () {\r\n if (Matrix4.xAxis === null)\r\n Matrix4.xAxis = new webgl.Vector3();\r\n if (Matrix4.yAxis === null)\r\n Matrix4.yAxis = new webgl.Vector3();\r\n if (Matrix4.zAxis === null)\r\n Matrix4.zAxis = new webgl.Vector3();\r\n };\r\n Matrix4.xAxis = null;\r\n Matrix4.yAxis = null;\r\n Matrix4.zAxis = null;\r\n Matrix4.tmpMatrix = new Matrix4();\r\n return Matrix4;\r\n }());\r\n webgl.Matrix4 = Matrix4;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Mesh = (function () {\r\n function Mesh(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (var i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n Mesh.prototype.getAttributes = function () { return this.attributes; };\r\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\r\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\r\n Mesh.prototype.setVerticesLength = function (length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n };\r\n Mesh.prototype.getVertices = function () { return this.vertices; };\r\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\r\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\r\n Mesh.prototype.setIndicesLength = function (length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n };\r\n Mesh.prototype.getIndices = function () { return this.indices; };\r\n ;\r\n Mesh.prototype.getVertexSizeInFloats = function () {\r\n var size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n };\r\n Mesh.prototype.setVertices = function (vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n };\r\n Mesh.prototype.setIndices = function (indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n };\r\n Mesh.prototype.draw = function (shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n };\r\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n }\r\n else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n };\r\n Mesh.prototype.bind = function (shader) {\r\n var gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n var offset = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_1 = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location_1);\r\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n };\r\n Mesh.prototype.unbind = function (shader) {\r\n var gl = this.context.gl;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_2 = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location_2);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n };\r\n Mesh.prototype.update = function () {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n };\r\n Mesh.prototype.restore = function () {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n };\r\n Mesh.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n };\r\n return Mesh;\r\n }());\r\n webgl.Mesh = Mesh;\r\n var VertexAttribute = (function () {\r\n function VertexAttribute(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n return VertexAttribute;\r\n }());\r\n webgl.VertexAttribute = VertexAttribute;\r\n var Position2Attribute = (function (_super) {\r\n __extends(Position2Attribute, _super);\r\n function Position2Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\r\n }\r\n return Position2Attribute;\r\n }(VertexAttribute));\r\n webgl.Position2Attribute = Position2Attribute;\r\n var Position3Attribute = (function (_super) {\r\n __extends(Position3Attribute, _super);\r\n function Position3Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\r\n }\r\n return Position3Attribute;\r\n }(VertexAttribute));\r\n webgl.Position3Attribute = Position3Attribute;\r\n var TexCoordAttribute = (function (_super) {\r\n __extends(TexCoordAttribute, _super);\r\n function TexCoordAttribute(unit) {\r\n if (unit === void 0) { unit = 0; }\r\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\r\n }\r\n return TexCoordAttribute;\r\n }(VertexAttribute));\r\n webgl.TexCoordAttribute = TexCoordAttribute;\r\n var ColorAttribute = (function (_super) {\r\n __extends(ColorAttribute, _super);\r\n function ColorAttribute() {\r\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\r\n }\r\n return ColorAttribute;\r\n }(VertexAttribute));\r\n webgl.ColorAttribute = ColorAttribute;\r\n var Color2Attribute = (function (_super) {\r\n __extends(Color2Attribute, _super);\r\n function Color2Attribute() {\r\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\r\n }\r\n return Color2Attribute;\r\n }(VertexAttribute));\r\n webgl.Color2Attribute = Color2Attribute;\r\n var VertexAttributeType;\r\n (function (VertexAttributeType) {\r\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\r\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var PolygonBatcher = (function () {\r\n function PolygonBatcher(context, twoColorTint, maxVertices) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n var attributes = twoColorTint ?\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\r\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n PolygonBatcher.prototype.begin = function (shader) {\r\n var gl = this.context.gl;\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n }\r\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\r\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n var indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n var indicesArray = this.mesh.getIndices();\r\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n };\r\n PolygonBatcher.prototype.flush = function () {\r\n var gl = this.context.gl;\r\n if (this.verticesLength == 0)\r\n return;\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n };\r\n PolygonBatcher.prototype.end = function () {\r\n var gl = this.context.gl;\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n gl.disable(gl.BLEND);\r\n };\r\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\r\n PolygonBatcher.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return PolygonBatcher;\r\n }());\r\n webgl.PolygonBatcher = PolygonBatcher;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SceneRenderer = (function () {\r\n function SceneRenderer(canvas, context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.QUAD = [\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n ];\r\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n this.WHITE = new spine.Color(1, 1, 1, 1);\r\n this.canvas = canvas;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\r\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = webgl.Shader.newColored(this.context);\r\n this.shapes = new webgl.ShapeRenderer(this.context);\r\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\r\n }\r\n SceneRenderer.prototype.begin = function () {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n };\r\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\r\n };\r\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n };\r\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var worldOriginX = x + pivotX;\r\n var worldOriginY = y + pivotY;\r\n var fx = -pivotX;\r\n var fy = -pivotY;\r\n var fx2 = width - pivotX;\r\n var fy2 = height - pivotY;\r\n var p1x = fx;\r\n var p1y = fy;\r\n var p2x = fx;\r\n var p2y = fy2;\r\n var p3x = fx2;\r\n var p3y = fy2;\r\n var p4x = fx2;\r\n var p4y = fy;\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 0;\r\n var y2 = 0;\r\n var x3 = 0;\r\n var y3 = 0;\r\n var x4 = 0;\r\n var y4 = 0;\r\n if (angle != 0) {\r\n var cos = spine.MathUtils.cosDeg(angle);\r\n var sin = spine.MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n }\r\n else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n };\r\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n };\r\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n };\r\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n };\r\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n };\r\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n };\r\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n };\r\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n };\r\n SceneRenderer.prototype.end = function () {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n };\r\n SceneRenderer.prototype.resize = function (resizeMode) {\r\n var canvas = this.canvas;\r\n var w = canvas.clientWidth;\r\n var h = canvas.clientHeight;\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Stretch) {\r\n }\r\n else if (resizeMode === ResizeMode.Expand) {\r\n this.camera.setViewport(w, h);\r\n }\r\n else if (resizeMode === ResizeMode.Fit) {\r\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n var targetRatio = targetHeight / targetWidth;\r\n var sourceRatio = sourceHeight / sourceWidth;\r\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.viewportWidth = sourceWidth * scale;\r\n this.camera.viewportHeight = sourceHeight * scale;\r\n }\r\n this.camera.update();\r\n };\r\n SceneRenderer.prototype.enableRenderer = function (renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof webgl.PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n }\r\n else if (renderer instanceof webgl.ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n }\r\n else {\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n SceneRenderer.prototype.dispose = function () {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n };\r\n return SceneRenderer;\r\n }());\r\n webgl.SceneRenderer = SceneRenderer;\r\n var ResizeMode;\r\n (function (ResizeMode) {\r\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\r\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Shader = (function () {\r\n function Shader(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n Shader.prototype.getProgram = function () { return this.program; };\r\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\r\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\r\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\r\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\r\n Shader.prototype.compile = function () {\r\n var gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n }\r\n catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n };\r\n Shader.prototype.compileShader = function (type, source) {\r\n var gl = this.context.gl;\r\n var shader = gl.createShader(type);\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n };\r\n Shader.prototype.compileProgram = function (vs, fs) {\r\n var gl = this.context.gl;\r\n var program = gl.createProgram();\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n };\r\n Shader.prototype.restore = function () {\r\n this.compile();\r\n };\r\n Shader.prototype.bind = function () {\r\n this.context.gl.useProgram(this.program);\r\n };\r\n Shader.prototype.unbind = function () {\r\n this.context.gl.useProgram(null);\r\n };\r\n Shader.prototype.setUniformi = function (uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniformf = function (uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n };\r\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n };\r\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n };\r\n Shader.prototype.setUniform2x2f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n };\r\n Shader.prototype.setUniform3x3f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n };\r\n Shader.prototype.setUniform4x4f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n };\r\n Shader.prototype.getUniformLocation = function (uniform) {\r\n var gl = this.context.gl;\r\n var location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for uniform \" + uniform);\r\n return location;\r\n };\r\n Shader.prototype.getAttributeLocation = function (attribute) {\r\n var gl = this.context.gl;\r\n var location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for attribute \" + attribute);\r\n return location;\r\n };\r\n Shader.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n };\r\n Shader.newColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newTwoColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_dark = \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newColored = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n return Shader;\r\n }());\r\n webgl.Shader = Shader;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ShapeRenderer = (function () {\r\n function ShapeRenderer(context, maxVertices) {\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.vertexIndex = 0;\r\n this.tmp = new spine.Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n ShapeRenderer.prototype.begin = function (shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n var gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n ShapeRenderer.prototype.setColor = function (color) {\r\n this.color.setFromColor(color);\r\n };\r\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n };\r\n ShapeRenderer.prototype.point = function (x, y, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Point, 1);\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n };\r\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, 2);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n };\r\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (color4 === null)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n };\r\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (color === null)\r\n color = this.color;\r\n var t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n var tx = t.x * width;\r\n var ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.x = function (x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n };\r\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (color === null)\r\n color = this.color;\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n var firstX = polygonVertices[offset];\r\n var firstY = polygonVertices[offset + 1];\r\n var last = offset + count;\r\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\r\n var x1 = polygonVertices[i];\r\n var y1 = polygonVertices[i + 1];\r\n var x2 = 0;\r\n var y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n }\r\n else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n if (segments === 0)\r\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (color === null)\r\n color = this.color;\r\n var angle = 2 * spine.MathUtils.PI / segments;\r\n var cos = Math.cos(angle);\r\n var sin = Math.sin(angle);\r\n var cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_1 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_1 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n var temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n };\r\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (color === null)\r\n color = this.color;\r\n var subdiv_step = 1 / segments;\r\n var subdiv_step2 = subdiv_step * subdiv_step;\r\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n var pre1 = 3 * subdiv_step;\r\n var pre2 = 3 * subdiv_step2;\r\n var pre4 = 6 * subdiv_step2;\r\n var pre5 = 6 * subdiv_step3;\r\n var tmp1x = x1 - cx1 * 2 + cx2;\r\n var tmp1y = y1 - cy1 * 2 + cy2;\r\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n var fx = x1;\r\n var fy = y1;\r\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n var dddfx = tmp2x * pre5;\r\n var dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.vertex = function (x, y, color) {\r\n var idx = this.vertexIndex;\r\n var vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n };\r\n ShapeRenderer.prototype.end = function () {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n this.context.gl.disable(this.context.gl.BLEND);\r\n this.isDrawing = false;\r\n };\r\n ShapeRenderer.prototype.flush = function () {\r\n if (this.vertexIndex == 0)\r\n return;\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n };\r\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n }\r\n else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n };\r\n ShapeRenderer.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return ShapeRenderer;\r\n }());\r\n webgl.ShapeRenderer = ShapeRenderer;\r\n var ShapeType;\r\n (function (ShapeType) {\r\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\r\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\r\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\r\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SkeletonDebugRenderer = (function () {\r\n function SkeletonDebugRenderer(context) {\r\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\r\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\r\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\r\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new spine.SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n }\r\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n var skeletonX = skeleton.x;\r\n var skeletonY = skeleton.y;\r\n var gl = this.context.gl;\r\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\r\n var bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (bone.parent == null)\r\n continue;\r\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\r\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n var vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.MeshAttachment))\r\n continue;\r\n var mesh = attachment;\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n var triangles = mesh.triangles;\r\n var hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n var bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n var polygons = bounds.polygons;\r\n var boxes = bounds.boundingBoxes;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n continue;\r\n var path = attachment;\r\n var nn = path.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n var color = this.pathColor;\r\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (var ii = 4; ii < nn; ii += 6) {\r\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n var slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.ClippingAttachment))\r\n continue;\r\n var clip = attachment;\r\n var nn = clip.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\r\n var x = world[i_17];\r\n var y = world[i_17 + 1];\r\n var x2 = world[(i_17 + 2) % world.length];\r\n var y2 = world[(i_17 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n };\r\n SkeletonDebugRenderer.prototype.dispose = function () {\r\n };\r\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\r\n return SkeletonDebugRenderer;\r\n }());\r\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Renderable = (function () {\r\n function Renderable(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n return Renderable;\r\n }());\r\n ;\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.premultipliedAlpha = false;\r\n this.vertexEffect = null;\r\n this.tempColor = new spine.Color();\r\n this.tempColor2 = new spine.Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable(null, 0, 0);\r\n this.clipper = new spine.SkeletonClipping();\r\n this.temp = new spine.Vector2();\r\n this.temp2 = new spine.Vector2();\r\n this.temp3 = new spine.Color();\r\n this.temp4 = new spine.Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n var clipper = this.clipper;\r\n var premultipliedAlpha = this.premultipliedAlpha;\r\n var twoColorTint = this.twoColorTint;\r\n var blendMode = null;\r\n var tempPos = this.temp;\r\n var tempUv = this.temp2;\r\n var tempLight = this.temp3;\r\n var tempDark = this.temp4;\r\n var renderable = this.renderable;\r\n var uvs = null;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n var attachmentColor = null;\r\n var skeletonColor = skeleton.color;\r\n var vertexSize = twoColorTint ? 12 : 8;\r\n var inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.texture;\r\n attachmentColor = region.color;\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n }\r\n else if (attachment instanceof spine.ClippingAttachment) {\r\n var clip = (attachment);\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n }\r\n else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture != null) {\r\n var slotColor = slot.color;\r\n var finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n var darkColor = this.tempColor2;\r\n if (slot.darkColor == null)\r\n darkColor.set(0, 0, 0, 1.0);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n }\r\n else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\r\n }\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n var clippedVertices = new Float32Array(clipper.clippedVertices);\r\n var clippedTriangles = clipper.clippedTriangles;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n var verts = clippedVertices;\r\n if (!twoColorTint) {\r\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n }\r\n else {\r\n var verts = renderable.vertices;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n if (!twoColorTint) {\r\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.setFromColor(darkColor);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n else {\r\n if (!twoColorTint) {\r\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n }\r\n else {\r\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n }\r\n var view = renderable.vertices.subarray(0, renderable.numFloats);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n return SkeletonRenderer;\r\n }());\r\n webgl.SkeletonRenderer = SkeletonRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Vector3 = (function () {\r\n function Vector3(x, y, z) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (z === void 0) { z = 0; }\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n Vector3.prototype.setFrom = function (v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n };\r\n Vector3.prototype.set = function (x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n };\r\n Vector3.prototype.add = function (v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n };\r\n Vector3.prototype.sub = function (v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n };\r\n Vector3.prototype.scale = function (s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n };\r\n Vector3.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n };\r\n Vector3.prototype.cross = function (v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n };\r\n Vector3.prototype.multiply = function (matrix) {\r\n var l_mat = matrix.values;\r\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\r\n };\r\n Vector3.prototype.project = function (matrix) {\r\n var l_mat = matrix.values;\r\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\r\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\r\n };\r\n Vector3.prototype.dot = function (v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n };\r\n Vector3.prototype.length = function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n };\r\n Vector3.prototype.distance = function (v) {\r\n var a = v.x - this.x;\r\n var b = v.y - this.y;\r\n var c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n };\r\n return Vector3;\r\n }());\r\n webgl.Vector3 = Vector3;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ManagedWebGLRenderingContext = (function () {\r\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\r\n var _this = this;\r\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (canvasOrContext instanceof HTMLCanvasElement) {\r\n var canvas_1 = canvasOrContext;\r\n this.gl = (canvas_1.getContext(\"webgl2\", contextConfig) || canvas_1.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas_1;\r\n canvas_1.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas_1.addEventListener(\"webglcontextrestored\", function (e) {\r\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\r\n _this.restorables[i].restore();\r\n }\r\n });\r\n }\r\n else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\r\n this.restorables.push(restorable);\r\n };\r\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\r\n var index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n };\r\n return ManagedWebGLRenderingContext;\r\n }());\r\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\r\n var WebGLBlendModeConverter = (function () {\r\n function WebGLBlendModeConverter() {\r\n }\r\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.ZERO = 0;\r\n WebGLBlendModeConverter.ONE = 1;\r\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\r\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\r\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\r\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\r\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\r\n return WebGLBlendModeConverter;\r\n }());\r\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-both.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine/src/container/SpineContainerWebGLRenderer.js b/plugins/spine/src/container/SpineContainerWebGLRenderer.js index 47408c87c..d251eaf78 100644 --- a/plugins/spine/src/container/SpineContainerWebGLRenderer.js +++ b/plugins/spine/src/container/SpineContainerWebGLRenderer.js @@ -36,7 +36,7 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe { sceneRenderer.end(); - renderer.rebindPipeline(); + renderer.pipelines.rebind(); } return; @@ -66,7 +66,7 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe if (renderer.newType) { // flush + clear if this is a new type - renderer.clearPipeline(); + renderer.pipelines.clear(); sceneRenderer.begin(); } @@ -161,7 +161,7 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe sceneRenderer.end(); // And rebind the previous pipeline - renderer.rebindPipeline(); + renderer.pipelines.rebind(); } }; diff --git a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js index a7a85d22d..b603b35e3 100644 --- a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js +++ b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js @@ -43,7 +43,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - renderer.rebindPipeline(); + renderer.pipelines.rebind(); } if (!renderer.finalType) @@ -58,7 +58,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent if (renderer.newType) { // flush + clear previous pipeline if this is a new type - renderer.clearPipeline(); + renderer.pipelines.clear(); } var camMatrix = renderer._tempMatrix1; @@ -162,7 +162,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent sceneRenderer.end(); // And rebind the previous pipeline - renderer.rebindPipeline(); + renderer.pipelines.rebind(); } }; From e1106a0112e78376ea3e34ebd040411f3ae351e7 Mon Sep 17 00:00:00 2001 From: Emil Schnedler Vad Date: Fri, 11 Sep 2020 18:44:11 +0200 Subject: [PATCH 055/153] Says webglRender but it is in PipelineManager --- src/renderer/webgl/PipelineManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/webgl/PipelineManager.js b/src/renderer/webgl/PipelineManager.js index 2af7acd7f..31e6d14d1 100644 --- a/src/renderer/webgl/PipelineManager.js +++ b/src/renderer/webgl/PipelineManager.js @@ -55,7 +55,7 @@ var PipelineManager = new Class({ * * This is populated with the default pipelines in the `boot` method. * - * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines + * @name Phaser.Renderer.WebGL.PipelineManager#pipelines * @type {Phaser.Structs.Map.} * @since 3.50.0 */ From f05129f30ceb0d8b320d672e22ce7b91e63ccf52 Mon Sep 17 00:00:00 2001 From: samme Date: Wed, 4 Mar 2020 13:19:22 -0800 Subject: [PATCH 056/153] Add Transform#copyPosition Needs JSDoc types for Vector3Like, Vector4Like --- src/gameobjects/components/Transform.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/gameobjects/components/Transform.js b/src/gameobjects/components/Transform.js index 5fcef6b67..b909f64b6 100644 --- a/src/gameobjects/components/Transform.js +++ b/src/gameobjects/components/Transform.js @@ -279,6 +279,26 @@ var Transform = { return this; }, + /** + * Copies an object's coordinates to this Game Object's position. + * + * @method Phaser.GameObjects.Components.Transform#copyPosition + * @since 3.23.0 + * + * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied. + * + * @return {this} This Game Object instance. + */ + copyPosition: function (source) + { + if (source.x !== undefined) { this.x = source.x; } + if (source.y !== undefined) { this.y = source.y; } + if (source.z !== undefined) { this.z = source.z; } + if (source.w !== undefined) { this.w = source.w; } + + return this; + }, + /** * Sets the position of this Game Object to be a random position within the confines of * the given area. From ad0c5ad5db26218a08a3e64c2ec98ea975a9e197 Mon Sep 17 00:00:00 2001 From: samme Date: Fri, 11 Sep 2020 10:01:43 -0700 Subject: [PATCH 057/153] Docs: since --- src/gameobjects/components/Transform.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameobjects/components/Transform.js b/src/gameobjects/components/Transform.js index b909f64b6..a463341e9 100644 --- a/src/gameobjects/components/Transform.js +++ b/src/gameobjects/components/Transform.js @@ -283,7 +283,7 @@ var Transform = { * Copies an object's coordinates to this Game Object's position. * * @method Phaser.GameObjects.Components.Transform#copyPosition - * @since 3.23.0 + * @since 3.50.0 * * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied. * From b90ecf8f6d56b9689424edf6dacbe301922864fe Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 10:28:18 +0100 Subject: [PATCH 058/153] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84b633cb7..14bc9b3ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -378,6 +378,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * `ArcadeWorldConfig.customUpdate` is a new boolean property you can set in the Arcade Physics config object, either in the Scene or in the Game Config. If `true` the World update will never be called, allowing you to call it yourself from your own component. Close #5190 (thanks @cfortuner) * `Utils.Array.SortByDigits` is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits. * `GroupCreateConfig`, which is used when calling `Group.createMultiple` or `Group.createFromConfig`, can now accept the following new properties: `setOrigin: { x, y, stepX, stepY }` which are applied to the items created by the Group. +* `Transform.copyPosition` is a new method that will copy the position from the given object to the Game Object (thanks @samme) ### Input / Mouse Updates and API Changes From 5d4fe0a4666e14e541fa66c2226c4178247b780e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 10:34:57 +0100 Subject: [PATCH 059/153] Fixed a few linting errors --- src/gameobjects/text/MeasureText.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/gameobjects/text/MeasureText.js b/src/gameobjects/text/MeasureText.js index 698492d8b..70dcde26e 100644 --- a/src/gameobjects/text/MeasureText.js +++ b/src/gameobjects/text/MeasureText.js @@ -18,30 +18,25 @@ var CanvasPool = require('../../display/canvas/CanvasPool'); */ var MeasureText = function (textStyle) { - // @property {HTMLCanvasElement} canvas - The canvas element that the text is rendered. var canvas = CanvasPool.create(this); - - // @property {HTMLCanvasElement} context - The context of the canvas element that the text is rendered to. var context = canvas.getContext('2d'); textStyle.syncFont(canvas, context); var metrics = context.measureText(textStyle.testString); - - if (metrics.hasOwnProperty('actualBoundingBoxAscent') && metrics.hasOwnProperty('actualBoundingBoxDescent')) + + if (metrics.hasOwnProperty('actualBoundingBoxAscent')) { var ascent = metrics.actualBoundingBoxAscent; var descent = metrics.actualBoundingBoxDescent; - - var output = { + + CanvasPool.remove(canvas); + + return { ascent: ascent, descent: descent, - fontSize: (ascent + descent) + fontSize: ascent + descent }; - - CanvasPool.remove(canvas); - - return output; } var width = Math.ceil(metrics.width * textStyle.baselineX); From 3e2aa36631395f37661b9bb7d9deee465b849aeb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 10:37:33 +0100 Subject: [PATCH 060/153] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14bc9b3ce..2a7f25cd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -379,6 +379,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * `Utils.Array.SortByDigits` is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits. * `GroupCreateConfig`, which is used when calling `Group.createMultiple` or `Group.createFromConfig`, can now accept the following new properties: `setOrigin: { x, y, stepX, stepY }` which are applied to the items created by the Group. * `Transform.copyPosition` is a new method that will copy the position from the given object to the Game Object (thanks @samme) +* The `Text.MeasureText` function, which is used to calculate the ascent and descent of Text Game Objects whenever the style, or font size, is changed, has been updated to use the new `actualBoundingBoxAscent` functions present in modern browsers. This allows for significantly faster ascent calculations than previously. Older browsers, such as IE, will still fall back (thanks @rexrainbow) ### Input / Mouse Updates and API Changes From 3eece8617931ea3ca32ed60113404cbcfa4bb512 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:41:22 +0100 Subject: [PATCH 061/153] Split v3.50 Change Log into its own file --- CHANGELOG-v3.50.md | 489 ++++++++++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 494 +-------------------------------------------- 2 files changed, 490 insertions(+), 493 deletions(-) create mode 100644 CHANGELOG-v3.50.md diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md new file mode 100644 index 000000000..4dd04bf78 --- /dev/null +++ b/CHANGELOG-v3.50.md @@ -0,0 +1,489 @@ +## Version 3.50.0 - Subaru - in development + +### WebGL Pipeline Updates + +If you use a custom WebGL Pipeline in your game, you must update your code in order to use Phaser 3.50. + +Due to the huge amount of work that has taken place in this area, all of the pipelines have been renamed. If you extend any of these pipelines or use them in your game code (referenced by name), then please update accordingly. The name changes are: + +* `TextureTintPipeline` is now called the `MultiPipeline`. +* `TextureTintStripPipeline` is now called the `RopePipeline`. +* `ForwardDiffuseLightPipeline` is now called the `LightPipeline`. + +To match the new pipeline names, the shader source code has also been renamed. + +* `ForwardDiffuse.frag` is now called `Light.frag`. +* `TextureTint.frag` is now called `Multi.frag`. +* `TextureTint.vert` is now called `Multi.vert`. + +Other pipeline changes are as follows: + +* `Types.Renderer.WebGL.WebGLPipelineConfig` is a new TypeDef that helps you easily configure your own Custom Pipeline when using TypeScript and also provides better JSDocs. +* `Types.Renderer.WebGL.WebGLPipelineAttributesConfig` is a new TypeDef that helps you easily configure the attributes for your own Custom Pipelines when using TypeScript and also provides better JSDocs. +* All pipelines will now work out the `renderer` property automatically, so it's no longer required in the config. +* All pipelines will now work out the `gl` property automatically, so it's no longer required in the config. +* All pipelines will now extract the `name` property from the config, allowing you to set it externally. +* All pipelines will now extract the `vertexCapacity` property from the config, allowing you to set it externally. +* All pipelines will now extract the `vertexSize` property from the config, allowing you to set it externally. +* All pipelines will now extract the `vertexData` property from the config, allowing you to set it externally. +* All pipelines will now extract the `attributes` property from the config, allowing you to set it externally. +* All pipelines will now extract the `topology` property from the config, allowing you to set it externally. + +### Pipeline Manager + +The `WebGL.PipelineManager` is a new class that is responsbile for managing all of the WebGL Pipelines in Phaser. An instance of the Pipeline Manager is created by the WebGL Renderer and is available under the `pipelines` property. This means that the WebGL Renderer no longer handles pipelines directly, causing the following API changes: + +* `WebGLRenderer.pipelines` is no longer a plain object containing pipeline instances. It's now an instance of the `PipelineManager` class. This instance is created during the init and boot phase of the renderer. +* The `WebGLRenderer.currentPipeline` property no longer exists, instead use `PipelineManager.current`. +* The `WebGLRenderer.previousPipeline` property no longer exists, instead use `PipelineManager.previous`. +* The `WebGLRenderer.hasPipeline` method no longer exists, instead use `PipelineManager.has`. +* The `WebGLRenderer.getPipeline` method no longer exists, instead use `PipelineManager.get`. +* The `WebGLRenderer.removePipeline` method no longer exists, instead use `PipelineManager.remove`. +* The `WebGLRenderer.addPipeline` method no longer exists, instead use `PipelineManager.add`. +* The `WebGLRenderer.setPipeline` method no longer exists, instead use `PipelineManager.set`. +* The `WebGLRenderer.rebindPipeline` method no longer exists, instead use `PipelineManager.rebind`. +* The `WebGLRenderer.clearPipeline` method no longer exists, instead use `PipelineManager.clear`. + +The Pipeline Manager also offers the following new features: + +* The `PipelineManager.resize` method automatically handles resize events across all pipelines. +* The `PipelineManager.preRender` method calls the pre-render method of all pipelines. +* The `PipelineManager.render` method calls the render method of all pipelines. +* The `PipelineManager.postRender` method calls the post-render method of all pipelines. +* The `PipelineManager.setMulti` method automatically binds the Multi Texture Pipeline, Phaser's default. +* The `PipelineManager.clear` method will clear the pipeline, store it in `previous` and free the renderer. +* The `PipelineManager.rebind` method will reset the rendering context and restore the `previous` pipeline, if set. + +New constants have been created to help you reference a pipeline without needing to use strings: + +* `Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE` for the Bitmap Mask Pipeline. +* `Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE` for the Light 2D Pipeline. +* `Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE` for the Single Pipeline. +* `Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE` for the Multi Pipeline. +* `Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE` for the Rope Pipeline. + +All Game Objects have been updated to use the new constants and Pipeline Manager. + +#### Single Pipeline + +There is also a new pipeline called `SinglePipeline`, created to emulate the old `TextureTintPipeline`. This special pipeline uses just a single texture and makes things a lot easier if you wish to create a custom pipeline, but not have to recode your shaders to work with multiple textures. Instead, just extend `SinglePipeline`, where-as before you extended the `TextureTintPipeline` and you won't have to change any of your shader code. However, if you can, you should update it to make it perform faster, but that choice is left up to you. + +### WebGL Multi-Texture Rendering + +The Multi Pipeline (previously called the Texture Tint Pipeline) has had its core flow rewritten to eliminate the need for constantly creating `batch` objects. Instead, it now supports the new multi-texture shader, vastly increasing rendering performance, especially on draw-call bound systems. + +All of the internal functions, such as `batchQuad` and `batchSprite` have been updated to use the new method of texture setting. The method signatures all remain the same unless indicated below. + +* `Config.render.maxTextures` is a new game config setting that allows you to control how many texture units will be used in WebGL. +* `WebGL.Utils.checkShaderMax` is a new function, used internally by the renderer, to determine the maximum number of texture units the GPU + browser supports. +* The property `WebGLRenderer.currentActiveTextureUnit` has been renamed to `currentActiveTexture`. +* `WebGLRenderer.startActiveTexture` is a new read-only property contains the current starting active texture unit. +* `WebGLRenderer.maxTextures` is a new read-only property that contains the maximum number of texture units WebGL can use. +* `WebGLRenderer.textureIndexes` is a new read-only array that contains all of the available WebGL texture units. +* `WebGLRenderer.tempTextures` is a new read-only array that contains temporary WebGL textures. +* The `WebGLRenderer.currentTextures` property has been removed, as it's no longer used. +* `TextureSource.glIndex` is a new property that holds the currently assigned texture unit for the Texture Source. +* `TextureSource.glIndexCounter` is a new property that holds the time the index was assigned to the Texture Source. +* `WebGLRenderer.currentTextures` has been removed, as it's no longer used internally. +* `WebGLRenderer.setBlankTexture` no longer has a `force` parameter, as it's set by default. +* The Mesh Game Object WebGL Renderer function has been updated to support multi-texture units. +* The Blitter Game Object WebGL Renderer function has been updated to support multi-texture units. +* The Bitmap Text Game Object WebGL Renderer function has been updated to support multi-texture units. +* The Dynamic Bitmap Text Game Object WebGL Renderer function has been updated to support multi-texture units. +* The Particle Emitter Game Object WebGL Renderer function has been updated to support multi-texture units. +* The Texture Tint vertex and fragment shaders have been updated to support the `inTexId` float attribute and dynamic generation. +* The Texture Tint Pipeline has a new attribute, `inTexId` which is a `gl.FLOAT`. +* `TextureTintPipeline.bind` is a new method that sets the `uMainSampler` uniform. +* The `TextureTintPipeline.requireTextureBatch` method has been removed, as it's no longer required. +* The `TextureTintPipeline.pushBatch` method has been removed, as it's no longer required. +* The `TextureTintPipeline.maxQuads` property has been removed, as it's no longer required. +* The `TextureTintPipeline.batches` property has been removed, as it's no longer required. +* `TextureTintPipeline.flush` has been rewritten to support multi-textures. +* `TextureTintPipeline.flush` no longer creates a sub-array if the batch is full, but instead uses `bufferData` for speed. +* `WebGLPipeline.currentUnit` is a new property that holds the most recently assigned texture unit. Treat as read-only. +* `WebGLRenderer.setTextureSource` is a new method, used by pipelines and Game Objects, that will assign a texture unit to the given Texture Source. +* The `WebGLRenderer.setTexture2D` method has been updated to use the new texture unit assignment. It no longer takes the `textureUnit` or `flush` parameters and these have been removed from its method signature. +* `WebGLRenderer.setTextureZero` is a new method that activates texture zero and binds the given texture to it. Useful for fbo backed game objects. +* `WebGLRenderer.clearTextureZero` is a new method that clears the texture that was bound to unit zero. +* `WebGLRenderer.textureZero` is a new property that holds the currently bound unit zero texture. +* `WebGLRenderer.normalTexture` is a new property that holds the currently bound normal map (texture unit one). +* `WebGLRenderer.setNormalMap` is a new method that sets the current normal map texture. +* `WebGLRenderer.clearNormalMap` is a new method that clears the current normal map texture. +* `WebGLRenderer.resetTextures` is a new method that flushes the pipeline, resets all textures back to the temporary ones, and resets the active texture counter. +* `WebGLPipeline.boot` will now check all of the attributes and store the pointer location within the attribute entry. +* `WebGLPipeline.bind` no longer looks-up and enables every attribute, every frame. Instead, it uses the cached pointer location stored in the attribute entry, cutting down on redundant WebGL operations. +* `WebGLRenderer.isNewNormalMap` is a new method that returns a boolean if the given parameters are not currently used. +* `WebGLPipeline.forceZero` is a new property that informs Game Objects if the pipeline requires a zero bound texture unit. +* `WebGLPipeline.setAttribPointers` is a new method that will set the vertex attribute pointers for the pipeline. +* `WebGLRenderer.unbindTextures` is a new method that will activate and then null bind all WebGL textures. +* `Renderer.WebGL.Utils.parseFragmentShaderMaxTextures` is a new function that will take fragment shader source and search it for `%count%` and `%forloop%` declarations, replacing them with the required GLSL for multi-texture support, returning the modified source. + +### Light Pipeline Changes + +The Light Pipeline (previously called the Forward Diffuse Light Pipeline), which is responsible for rendering lights under WebGL, has been rewritten to work with the new Multi Pipeline features. Lots of redundant code has been removed and the following changes and improvements took place: + +* The pipeline now works with Game Objects that do not have a normal map. They will be rendered using the new default normal map, which allows for a flat light effect to pass over them and merge with their diffuse map colors. +* Fixed a bug in the way lights were handled that caused Tilemaps to render one tile at a time, causing massive slow down. They're now batched properly, making a combination of lights and tilemaps possible again. +* The Bitmap Text (Static and Dynamic) Game Objects now support rendering with normal maps. +* The TileSprite Game Objects now support rendering with normal maps. +* Mesh and Quad Game Objects now support rendering with normal maps. +* The Graphics Game Objects now support rendering in Light2d. You can even use normal map textures for the texture fills. +* Particle Emitter Game Object now supports rendering in Light2d. +* All Shape Game Objects (Rectangle, IsoBox, Star, Polygon, etc) now support rendering in Light2d. +* The Text Game Object now supports rendering in Light2d, no matter which font, stroke or style it is using. +* Both Static and Dynamic Tilemap Layer Game Objects now support the Light2d pipeline, with or without normal maps. +* The pipeline will no longer look-up and set all of the light uniforms unless the `Light` is dirty. +* The pipeline will no longer reset all of the lights unless the quantity of lights has changed. +* The `ForwardDiffuseLightPipeline.defaultNormalMap` property has changed, it's now an object with a `glTexture` property that maps to the pipelines default normal map. +* The `ForwardDiffuseLightPipeline.boot` method has been changed to now generate a default normal map. +* The `ForwardDiffuseLightPipeline.onBind` method has been removed as it's no longer required. +* The `ForwardDiffuseLightPipeline.setNormalMap` method has been removed as it's no longer required. +* `ForwardDiffuseLightPipeline.bind` is a new method that handles setting-up the shader uniforms. +* The `ForwardDiffuseLightPipeline.batchTexture` method has been rewritten to use the Texture Tint Pipeline function instead. +* The `ForwardDiffuseLightPipeline.batchSprite` method has been rewritten to use the Texture Tint Pipeline function instead. +* `ForwardDiffuseLightPipeline.lightCount` is a new property that stores the previous number of lights rendered. +* `ForwardDiffuseLightPipeline.getNormalMap` is a new method that will look-up and return a normal map for the given object. + +### Lights + +* `Light.dirty` is a new property that controls if the light is dirty, or not, and needs its uniforms updating. +* `Light` has been recoded so that all of its properties are now setters that activate its `dirty` flag. +* `LightsManager.destroy` will now clear the `lightPool` array when destroyed, where-as previously it didn't. +* `LightsManager.cull` now takes the viewport height from the renderer instead of the game config (thanks zenwaichi) + +### WebGL ModelViewProjection API Changes + +The `ModelViewProjection` object contained a lot of functions that Phaser never used internally. These have now been +moved to external functions, which can be easily excluded from Custom builds to save space. + +If you used any of them in your code, please update to the new function names below: + +* `Phaser.Renderer.WebGL.MVP` is a new namespace under which the Model View Projection functions now live. +* `projIdentity` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ProjectIdentity` +* `projPersp` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ProjectPerspective` +* `modelRotateX` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.RotateX` +* `modelRotateY` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.RotateY` +* `modelRotateZ` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.RotateZ` +* `viewLoad` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewLoad` +* `viewRotateX` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewRotateX` +* `viewRotateY` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewRotateY` +* `viewRotateZ` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewRotateZ` +* `viewScale` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewScale` +* `viewTranslate` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewTranslate` +* `modelIdentity` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.Identity` +* `modelScale` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.Scale` +* `modelTranslate` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.Translate` +* `viewIdentity` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewIdentity` +* `viewLoad2D` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewLoad2D` +* `projOrtho` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ProjectOrtho` +* `Phaser.Renderer.WebGL.MVP.SetIdentity` is a new function the others use, to save on space. + +### BitmapText New Features, Updates and API Changes + +* `BitmapText.setCharacterTint` is a new method that allows you to set a tint color (either additive or fill) on a specific range of characters within a static Bitmap Text. You can specify the start and length offsets and per-corner tint colors. +* `BitmapText.setWordTint` is a new method that allows you to set a tint color (either additive or fill) on all matching words within a static Bitmap Text. You can specify the word by string, or numeric offset, and the number of replacements to tint. +* `BitmapText.setDropShadow` is a new method that allows you to apply a drop shadow effect to a Bitmap Text object. You can set the horizontal and vertical offset of the shadow, as well as the color and alpha levels. Call this method with no parameters to clear a shadow. +* `BitmapTextWebGLRenderer` has been rewritten from scratch to make use of the new pre-cached WebGL uv texture and character location data generated by `GetBitmapTextSize`. This has reduced the number of calculations made in the function dramatically, as it no longer has work out glyph advancing or offsets during render, but only when the text content updates. +* `BitmapText.getCharacterAt` is a new method that will return the character data from the BitmapText at the given `x` and `y` coordinates. The character data includes the code, position, dimensions, and glyph information. +* The `BitmapTextSize` object returned by `BitmapText.getTextBounds` has a new property called `characters` which is an array that contains the scaled position coordinates of each character in the BitmapText, which you could use for tasks such as determining which character in the BitmapText was clicked. +* `ParseXMLBitmapFont` will now calculate the WebGL uv data for the glyphs during parsing. This avoids it having to be done during rendering, saving CPU cycles on an operation that never changes. +* `ParseXMLBitmapFont` will now create a Frame object for each glyph. This means you could, for example, create a Sprite using the BitmapText texture and the glyph as the frame key, i.e.: `this.add.sprite(x, y, fontName, 'A')`. +* `BitmapTextWord`, `BitmapTextCharacter` and `BitmapTextLines` are three new type defs that are now part of the `BitmapTextSize` config object, as returned by `getTextBounds`. This improves the TypeScript defs and JS Docs for this object. +* The signature of the `ParseXMLBitmapFont` function has changed. The `frame` parameter is no longer optional, and is now the second parameter in the list, instead of being the 4th. If you call this function directly, please update your code. +* The `BitmapText.getTextBounds` method was being called every frame, even if the bounds didn't change, potentially costing a lot of CPU time depending on the text length and quantity of them. It now only updates the bounds if they change. +* The `GetBitmapTextSize` function used `Math.round` on the values, if the `round` parameter was `true`, which didn't create integers. It now uses `Math.ceil` instead to give integer results. +* The `GetBitmapTextSize` function has a new boolean parameter `updateOrigin`, which will adjust the origin of the parent BitmapText if set, based on the new bounds calculations. +* `BitmapText.preDestroy` is a new method that will tidy-up all of the BitmapText data during object destruction. +* `BitmapText.dropShadowX` is a new property that controls the horizontal offset of the drop shadow on the Bitmap Text. +* `BitmapText.dropShadowY` is a new property that controls the vertical offset of the drop shadow on the Bitmap Text. +* `BitmapText.dropShadowColor` is a new property that sets the color of the Bitmap Text drop shadow. +* `BitmapText.dropShadowAlpha` is a new property that sets the alpha of the Bitmap Text drop shadow. +* `BatchChar` is a new internal private function for batching a single character of a Bitmap Text to the pipeline. +* If you give an invalid Bitmap Font key, the Bitmap Text object will now issue a `console.warn`. +* Setting the `color` value in the `DynamicBitmapText.setDisplayCallback` would inverse the red and blue channels if the color was not properly encoded for WebGL. It is now encoded automatically, meaning you can pass normal hex values as the colors in the display callback. Fix #5225 (thanks @teebarjunk) +* If you apply `setSize` to the Dynamic BitmapText the scissor is now calculated based on the parent transforms, not just the local ones, meaning you can crop Bitmap Text objects that exist within Containers. Fix #4653 (thanks @lgibson02) +* `ParseXMLBitmapFont` has a new optional parameter `texture`. If defined, this Texture is populated with Frame data, one frame per glyph. This happens automatically when loading Bitmap Text data in Phaser. + +### Update List Changes + +The way in which Game Objects add themselves to the Scene Update List has changed. Instead of being added by the Factory methods, they will now add and remove themselves based on the new `ADDED_TO_SCENE` and `REMOVED_FROM_SCENE` events. This means, you can now add Sprites directly to a Container, or Group, and they'll animate properly without first having to be part of the Display List. The full set of changes and new features relating to this follow: + +* `GameObjects.Events.ADDED_TO_SCENE` is a new event, emitted by a Game Object, when it is added to a Scene, or a Container that is part of the Scene. +* `GameObjects.Events.REMOVED_FROM_SCENE` is a new event, emitted by a Game Object, when it is removed from a Scene, or a Container that is part of the Scene. +* `Scenes.Events.ADDED_TO_SCENE` is a new event, emitted by a Scene, when a new Game Object is added to the display list in the Scene, or a Container that is on the display list. +* `Scenes.Events.REMOVED_FROM_SCENE` is a new event, emitted by a Scene, when it a Game Object is removed from the display list in the Scene, or a Container that is on the display list. +* `GameObject.addedToScene` is a new method that custom Game Objects can use to perform additional set-up when a Game Object is added to a Scene. For example, Sprite uses this to add itself to the Update List. +* `GameObject.removedFromScene` is a new method that custom Game Objects can use to perform additional tear-down when a Game Object is removed from a Scene. For example, Sprite uses this to remove themselves from the Update List. +* Game Objects no longer automatically remove themselves from the Update List during `preDestroy`. This should be handled directly in the `removedFromScene` method now. +* The `Container` will now test to see if any Game Object added to it is already on the display list, or not, and emit its ADDED and REMOVED events accordingly. Fix #5267 #3876 (thanks @halgorithm @mbpictures) +* `DisplayList.events` is a new property that references the Scene's Event Emitter. This is now used internally. +* `DisplayList.addChildCallback` is a new method that overrides the List callback and fires the new ADDED events. +* `DisplayList.removeChildCallback` is a new method that overrides the List callback and fires the new REMOVED events. +* `GameObjectCreator.events` is a new property that references the Scene's Event Emitter. This is now used internally. +* `GameObjectFactory.events` is a new property that references the Scene's Event Emitter. This is now used internally. +* `ProcessQueue.checkQueue` is a new boolean property that will make sure only unique objects are added to the Process Queue. +* The `Update List` now uses the new `checkQueue` property to ensure no duplicate objects are on the active list. +* `DOMElementFactory`, `ExternFactory`, `ParticleManagerFactor`, `RopeFactory` and `SpriteFactory` all no longer add the objects to the Update List, this is now handled by the ADDED events instead. +* `Sprite`, `Rope`, `ParticleEmitterManager`, `Extern` and `DOMElement` now all override the `addedToScene` and `removedFromScene` callbacks to handle further set-up tasks. + +### Spine Plugin Updates + +* The Spine Runtimes have been updated to 3.8.95, which are the most recent non-beta versions. Please note, you will _need_ to re-export your animations if you're working in a version of Spine lower than 3.8.20. +* `SpineContainer` is a new Game Object available via `this.add.spineContainer` to which you can add Spine Game Objects only. It uses a special rendering function to retain batching, even across multiple container or Spine Game Object instances, resulting in dramatically improved performance over using regular Containers. +* A Spine Game Object with `setVisible(false)` will no longer still cause internal gl commands and is now properly skipped, retaining any current batch in the process. Fix #5174 (thanks @Kitsee) +* The Spine Game Object WebGL Renderer will no longer clear the type if invisible and will only end the batch if the next type doesn't match. +* The Spine Game Object WebGL Renderer will no longer rebind the pipeline if it was the final object on the display list, saving lots of gl commands. +* The Webpack build scripts have all been updated for Webpack 4.44.x. Fix #5243 (thanks @RollinSafary) +* There is a new npm script `npm run plugin.spine.runtimes` which will build all of the Spine runtimes, for ingestion by the plugin. Note: You will need to check-out the Esoteric Spine Runtimes repo into `plugins/spine/` in order for this to work. +* Spine Game Objects can now be rendered to Render Textures. Fix #5184 (thanks @Kitsee) +* Using > 128 Spine objects in a Container would cause a `WebGL: INVALID_OPERATION: vertexAttribPointer: no ARRAY_BUFFER is bound and offset is non-zero` error if you added any subsequent Spine objects to the Scene. There is now no limit. Fix #5246 (thanks @d7561985) +* The Spine Plugin will now work in HEADLESS mode without crashing. Fix #4988 (thanks @raimon-segura) +* Spine Game Objects now use -1 as their default blend mode, which means 'skip setting it'. +* The Spine TypeScript defs have been updated for the latest version of the plugin and to add SpineContainers. +* The `SpineGameObject.setAnimation` method will now use the `trackIndex` parameter if `ignoreIfPlaying` is set and run the check against this track index. Fix #4842 (thanks @vinerz) +* The `SpineFile` will no longer throw a warning if adding a texture into the Texture Manager that already exists. This allows you to have multiple Spine JSON use the same texture file, however, it also means you now get no warning if you accidentally load a texture that exists, so be careful with your keys! Fix #4947 (thanks @Nomy1) +* The Spine Plugin `destroy` method will now no longer remove the Game Objects from the Game Object Factory, or dispose of the Scene Renderer. This means when a Scene is destroyed, it will keep the Game Objects in the factory for other Scene's to use. Fix #5279 (thanks @Racoonacoon) +* `SpinePlugin.gameDestroy` is a new method that is called if the Game instance emits a `destroy` event. It removes the Spine Game Objects from the factory and disposes of the Spine scene renderer. + +### Animation API New Features and Updates + +If you use Animations in your game, please read the following important API changes in 3.50: + +The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations just to change properties such as `duration`, and can now set them dynamically at run-time as well. + +* The `Animation` class no longer extends `EventEmitter`, as it no longer emits any events directly. This means you cannot now listen for events directly from an Animation instance. All of the events are now dispatched by the Game Objects instead. +* All of the `SPRITE_ANIMATION_KEY` events have been removed. Instead, please use the new events which all carry the `frameKey` parameter, which can be used to handle frame specific events. The only exception to this is `ANIMATION_COMPLETE_KEY`, which is a key specific version of the completion event. +* `ANIMATION_UPDATE_EVENT` is a new event that is emitted from a Sprite when an animation updates, i.e. its frame changes. +* `ANIMATION_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. Fix #4894 (thanks @scott20145) +* The Game Object `Component.Animation` component has been renamed to `AnimationState` and has moved namespace. It's now in `Phaser.Animations` instead of `GameObjects.Components` to help differentiate it from the `Animation` class when browsing the documentation. +* The `play`, `playReverse`, `playAfterDelay`, `playAfterRepeat` and `chain` Sprite and Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object, as well as a string, as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. +* `AnimationState.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations. +* All playback methods: `play`, `playReverse`, `playAfterDelay` and `playAfterRepeat` will now check to see if the given animation key exists locally on the Sprite first. If it does, it's used, otherwise it then checks the global Animation Manager for the key instead. +* `AnimationState.skipMissedFrames` is now used when playing an animation, allowing you to create animations that run at frame rates far exceeding the refresh rate, or that will update to the correct frame should the game lag. Feature #4232 (thanks @colorcube) +* `AnimationManager.addMix` is a new method that allows you to create mixes between two animations. Mixing allows you to specify a unique delay between a pairing of animations. When playing Animation A on a Game Object, if you then play Animation B, and a mix exists, it will wait for the specified delay to be over before playing Animation B. This allows you to customise smoothing between different types of animation, such as blending between an idle and a walk state, or a running and a firing state. +* `AnimationManager.getMix` is a new method that will return the mix duration between the two given animations. +* `AnimationManager.removeMix` is a new method that will remove the mixture between either two animations, or all mixtures for the given animation. +* `AnimationState.remove` is a new method that will remove a locally stored Animation instance from a Sprite. +* `AnimationState.get` is a new method that will return a locally stored Animation instance from the Sprite. +* `AnimationState.exists` is a new method that will check if a locally stored Animation exists on the Sprite. +* The internal `AnimationState.remove` method has been renamed to `globalRemove`. +* `AnimationState.textureManager` is a new property that references the global Texture Manager. +* `AnimationState.anims` is a new property that contains locally created Animations in a Custom Map. +* `AnimationState.play` and `Sprite.play` no longer accept a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. +* `AnimationState.playReverse` and `Sprite.playReverse` no longer accept a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. +* The `AnimationState.delayedPlay` method has been renamed to `playAfterDelay`. The parameter order has also changed, so the key now comes first instead of the duration. +* The `AnimationState.stopOnRepeat` method has been renamed to `stopAfterRepeat` +* The `AnimationState.getCurrentKey` method has been renamed to `getName`. +* `AnimationState.getFrameName` is a new method that will return the key of the current Animation Frame, if an animation has been loaded. +* `AnimationState.playAfterDelay` and `Sprite.playAfterDelay` are new methods that will play the given animation after the delay in ms expires. +* `AnimationState.playAfterRepeat` and `Sprite.playAfterRepeat` are new methods that will play the given animation after the current animation finishes repeating. You can also specify the number of repeats allowed left to run. +* The `AnimationState.chain` method is now available on the Sprite class. +* The `AnimationState.stopAfterDelay` method is now available on the Sprite class. +* The `AnimationState.stopAfterRepeat` method is now available on the Sprite class. +* The `AnimationState.stopOnFrame` method is now available on the Sprite class. +* `AnimationManager.createFromAseprite` is a new method that allows you to use animations created in the Aseprite editor directly in Phaser. Please see the comprehensive documentation for this method for full details on how to do this. +* `AnimationState` now handles all of the loading of the animation. It no longer has to make calls out to the Animation Manager or Animation instance itself and will load the animation data directly, replacing as required from the optional `PlayAnimationConfig`. This improves performance and massively reduces CPU calls in animation heavy games. +* The `PlayAnimationConfig.frameRate` property lets you optionally override the animation frame rate. +* The `PlayAnimationConfig.duration` property lets you optionally override the animation duration. +* The `PlayAnimationConfig.delay` property lets you optionally override the animation delay. +* The `PlayAnimationConfig.repeat` property lets you optionally override the animation repeat counter. +* The `PlayAnimationConfig.repeatDelay` property lets you optionally override the animation repeat delay value. +* The `PlayAnimationConfig.yoyo` property lets you optionally override the animation yoyo boolean. +* The `PlayAnimationConfig.showOnStart` property lets you optionally override the animation show on start value. +* The `PlayAnimationConfig.hideOnComplete` property lets you optionally override the animation hide on complete value. +* The `PlayAnimationConfig.startFrame` property lets you optionally set the animation frame to start on. +* The `PlayAnimationConfig.timeScale` property lets you optionally set the animation time scale factor. +* `AnimationState.delayCounter` is a new property that allows you to control the delay before an animation will start playing. Only once this delay has expired, will the animation `START` events fire. Fix #4426 (thanks @bdaenen) +* `AnimationState.hasStarted` is a new boolean property that allows you to tell if the current animation has started playing, or is still waiting for a delay to expire. +* `AnimationState.showOnStart` is a new boolean property that controls if the Game Object should have `setVisible(true)` called on it when the animation starts. +* `AnimationState.hideOnComplete` is a new boolean property that controls if the Game Object should have `setVisible(false)` called on it when the animation completes. +* The `AnimationState.chain` method docs said it would remove all pending animations if called with no parameters. However, it didn't - and now does! +* The `AnimationState.setDelay` method has been removed. It never actually worked and you can now perform the same thing by calling either `playAfterDelay` or setting the `delay` property in the play config. +* The `AnimationState.getDelay` method has been removed. You can now read the `delay` property directly. +* The `AnimationState.setRepeat` method has been removed. You can achieve the same thing by setting the `repeat` property in the play config, or adjusting the public `repeatCounter` property if the animation has started. +* `AnimationState.handleStart` is a new internal private method that handles the animation start process. +* `AnimationState.handleRepeat` is a new internal private method that handles the animation repeat process. +* `AnimationState.handleStop` is a new internal private method that handles the animation stop process. +* `AnimationState.handleComplete` is a new internal private method that handles the animation complete process. +* `AnimationState.emitEvents` is a new internal private method that emits animation events, cutting down on duplicate code. +* The `AnimationState.restart` method has a new optional boolean parameter `resetRepeats` which controls if you want to reset the repeat counter during the restart, or not. +* `Animation.getTotalFrames` is a new method that will return the total number of frames in the animation. You can access it via `this.anims.currentAnim.getTotalFrames` from a Sprite. +* `Animation.calculateDuration` is a new method that calculates the duration, frameRate and msPerFrame for a given animation target. +* The `BuildGameObjectAnimation` function now uses the `PlayAnimationConfig` object to set the values. +* `Sprite.playReverse` is a new method that allows you to play the given animation in reverse on the Sprite. +* `Sprite.playAfterDelay` is a new method that allows you to play the given animation on the Sprite after a delay. +* `Sprite.stop` is a new method that allows you to stop the current animation on the Sprite. +* `AnimationManager.load` has been removed as it's no longer required. +* `AnimationManager.staggerPlay` has been fixed so you can now pass in negative stagger values. +* `AnimationManager.staggerPlay` has a new optional boolean parameter `staggerFirst`, which allows you to either include or exclude the first child in the stagger calculations. +* The `Animation.completeAnimation` method has been removed as it's no longer required. +* The `Animation.load` method has been removed as it's no longer required. +* The `Animation.setFrame` method has been removed as it's no longer required. +* The `Animation.getFirstTick` method has no longer needs the `includeDelay` parameter, as it's handled by `AnimationState` now. +* The `Animation.getFrames` method has a new optional boolean parameter `sortFrames` which will run a numeric sort on the frame names after constructing them, if a string-based frame is given. +* `Types.Animations.Animation` has a new boolean property `sortFrames`, which lets Phaser numerically sort the generated frames. +* `AnimationState.timeScale` is a new public property that replaces the old private `_timeScale` property. +* `AnimationState.delay` is a new public property that replaces the old private `_delay` property. +* `AnimationState.repeat` is a new public property that replaces the old private `_repeat` property. +* `AnimationState.repeatDelay` is a new public property that replaces the old private `_repeatDelay` property. +* `AnimationState.yoyo` is a new public property that replaces the old private `_yoyo` property. +* `AnimationState.inReverse` is a new public property that replaces the old private `_reverse` property. +* `AnimationState.startAnimation` is a new public method that replaces the old private `_startAnimation` method. +* The `AnimationState.getProgress` method has been fixed so it will return correctly if the animation is playing in reverse. +* The `AnimationState.globalRemove` method will now always be called when an animation is removed from the global Animation Manager, not just once. +* The `AnimationState.getRepeat` method has now been removed. You can get the value from the `repeat` property. +* The `AnimationState.setRepeatDelay` method has now been removed. You can set the value using the `repeatDelay` config property, or changing it at run-time. +* `AnimationState.complete` is a new method that handles the completion in animation playback. +* The `AnimationState.setTimeScale` method has now been removed. You can set the value using the `timeScale` config property, or changing it at run-time. +* The `AnimationState.getTimeScale` method has now been removed. You can read the value using the `timeScale` property. +* The `AnimationState.getTotalFrames` method has been fixed and won't error if called when no animation is loaded. +* The `AnimationState.setYoyo` method has now been removed. You can set the value using the `yoyo` config property, or changing it at run-time. +* The `AnimationState.getYoyo` method has now been removed. You can read the value using the `yoyo` property. +* The `AnimationState.stopAfterRepeat` method now has an optional parameter `repeatCount`, so you can tell the animation to stop after a specified number of repeats, not just 1. +* When playing an animation in reverse, if it reached the first frame and had to repeat, it would then jump to the frame before the final frame and carry on, skipping out the final frame. +* The `AnimationState.updateFrame` method has now been removed. Everything is handled by `setCurrentFrame` instead, which removes one extra step out of the update process. +* `GenerateFrameNames` will now `console.warn` if the generated frame isn't present in the texture, which should help with debugging animation creation massively. +* `GenerateFrameNumbers` will now `console.warn` if the generated frame isn't present in the texture, which should help with debugging animation creation massively. +* `GenerateFrameNumbers` would include the __BASE frame by mistake in its calculations. This didn't end up in the final animation, but did cause a cache miss when building the animation. +* `GenerateFrameNumbers` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. +* `GenerateFrameNames` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. + +### New Features + +* `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value. +* `Geom.Intersects.GetLineToPolygon` is a new function that checks for the closest point of intersection between a line segment and an array of polygons. +* `Geom.Intersects.GetLineToPoints` is a new function that checks for the closest point of intersection between a line segment and an array of points, where each pair of points form a line segment. +* `Geom.Intersects.GetRaysFromPointToPolygon` is a new function that emits rays out from the given point and detects for intersection against all given polygons, returning the points of intersection in the results array. +* `Geom.Polygon.Translate` is a new function that allows you to translate all the points of a polygon by the given values. +* `Geom.Polygon.Simplify` is a new function that takes a polygon and simplifies the points by running them through a combination of Douglas-Peucker and Radial Distance algorithms, potentially dramatically reducing the number of points while retaining its shape. +* `WebGLRenderer.setInt1iv` will allow you to look-up and set a 1iv uniform on the given shader. +* `Phaser.Types.Math.Vector3Like` is a new data type representing as Vector 3 like object. +* `Phaser.Types.Math.Vector4Like` is a new data type representing as Vector 4 like object. +* `Transform.getLocalPoint` is a new method, available on all Game Objects, that takes an `x` / `y` pair and translates them into the local space of the Game Object, factoring in parent transforms and display origins. +* The `KeyboardPlugin` will now track the key code and timestamp of the previous key pressed and compare it to the current event. If they match, it will skip the event. On some systems, if you were to type quickly, you would sometimes get duplicate key events firing (the exact same event firing more than once). This is now prevented from happening. +* `Display.Color.GetColorFromValue` is a new function that will take a hex color value and return it as an integer, for use in WebGL. This is now used internally by the Tint component and other classes. +* `Utils.String.RemoveAt` is a new function that will remove a character from the given index in a string and return the new string. +* `Frame.setUVs` is a new method that allows you to directly set the canvas and UV data for a frame. Use this if you need to override the values set automatically during frame creation. +* `TweenManager.getTweensOf` has a new parameter `includePending`. If set, it will also check the pending tweens for the given targets and return those in the results as well. Fix #5260 (thanks @pcharest2000) +* `WebGLPipeline.hasBooted` is a new boolean property that tracks if the pipeline has been booted or not, which is now far more important in 3.5 than in previous versions. This is checked in the `WebGLRenderer.addPipeline` method, and if not set, the pipeline is booted. Fix #5251 #5255 (thanks @telinc1 @rexrainbow) +* The WebGL Renderer will now add the pipelines during the `boot` method, instead of `init`. +* You can now use `this.renderer` from within a Scene, as it's now a Scene-level property and part of the Injection Map. +* `Clock.addEvent` can now take an existing `TimerEvent` object, as well as a config object. If a `TimerEvent` is given it will be removed from the Clock, reset and then added. This allows you to pool TimerEvents rather than constantly create and delete them. Fix #4115 (thanks @jcyuan) +* `Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock. +* `Group.getMatching` is a new method that will return any members of the Group that match the given criteria, such as `getMatching('visible', true)` (thanks @atursams) +* `ArcadePhysics.disableUpdate` is a new method that will prevent the Arcade Physics World `update` method from being called when the Scene updates. By disabling it, you're free to call the update method yourself, passing in your own delta and time values. +* `ArcadePhysics.enableUpdate` is a new method that will make the Arcade Physics World update in time with the Scene update. This is the default, so only call this if you have specifically disabled it previously. +* `ArcadeWorldConfig.customUpdate` is a new boolean property you can set in the Arcade Physics config object, either in the Scene or in the Game Config. If `true` the World update will never be called, allowing you to call it yourself from your own component. Close #5190 (thanks @cfortuner) +* `Utils.Array.SortByDigits` is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits. +* `GroupCreateConfig`, which is used when calling `Group.createMultiple` or `Group.createFromConfig`, can now accept the following new properties: `setOrigin: { x, y, stepX, stepY }` which are applied to the items created by the Group. +* `Transform.copyPosition` is a new method that will copy the position from the given object to the Game Object (thanks @samme) +* The `Text.MeasureText` function, which is used to calculate the ascent and descent of Text Game Objects whenever the style, or font size, is changed, has been updated to use the new `actualBoundingBoxAscent` functions present in modern browsers. This allows for significantly faster ascent calculations than previously. Older browsers, such as IE, will still fall back (thanks @rexrainbow) + +### Input / Mouse Updates and API Changes + +* `ScaleManager.refresh` is now called when the `Game.READY` event fires. This fixes a bug where the Scale Manager would have the incorrect canvas bounds, because they were calculated before a previous canvas was removed from the DOM. Fix #4862 (thanks @dranitski) +* The Game Config property `inputMouseCapture` has been removed, as this is now split into 3 new config options: +* `inputMousePreventDefaultDown` is a new config option that allows you to control `preventDefault` calls specifically on mouse down events. Set it via `input.mouse.preventDefaultDown` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. +* `inputMousePreventDefaultUp` is a new config option that allows you to control `preventDefault` calls specifically on mouse up events. Set it via `input.mouse.preventDefaultUp` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. +* `inputMousePreventDefaultMove` is a new config option that allows you to control `preventDefault` calls specifically on mouse move events. Set it via `input.mouse.preventDefaultMove` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. +* The `MouseManager.capture` property has been removed, as this is now split into 3 new config options (see below) +* `MouseManager.preventDefaultDown` is a new boolean property, set via the `inputMousePreventDefaultDown` config option that allows you to toggle capture of mouse down events at runtime. +* `MouseManager.preventDefaultUp` is a new boolean property, set via the `inputMousePreventDefaultUp` config option that allows you to toggle capture of mouse up events at runtime. +* `MouseManager.preventDefaultMove` is a new boolean property, set via the `inputMousePreventDefaultMove` config option that allows you to toggle capture of mouse move events at runtime. +* In the `MouseManager` the up, down and move events are no longer set as being passive if captured. Over, Out, Wheel and the Window level Down and Up events are always flagged as being passive. +* The `GamepadPlugin` will now call `refreshPads` as part of its start process. This allows you to use Gamepads across multiple Scenes, without having to wait for a connected event from each one of them. If you've already had a connected event in a previous Scene, you can now just read the pads directly via `this.input.gamepad.pad1` and similar. Fix #4890 (thanks @Sytten) +* Shutting down the Gamepad plugin (such as when sleeping a Scene) no longer calls `GamepadPlugin.disconnectAll`, but destroying it does. +* `Gamepad._created` is a new private internal property that keeps track of when the instance was created. This is compared to the navigator timestamp in the update loop to avoid event spamming. Fix #4890. + +### Updates and API Changes + +* Earcut, used for polygon triangulation, has been updated from 2.1.4 to 2.2.2. +* Earcut has now been exposed and is available via `Geom.Polygon.Earcut` and is fully documented. +* `Config.batchSize` has been increased from 2000 to 4096. +* Removed the Deferred Diffuse fragment and vertex shaders from the project, as they're not used. +* `StaticTilemapLayer.upload` will now set the vertex attributes and buffer the data, and handles internal checks more efficiently. +* `StaticTilemapLayer` now includes the `ModelViewProjection` mixin, so it doesn't need to modify the pipeline during rendering. +* `WebGLRenderer.textureFlush` is a new property that keeps track of the total texture flushes per frame. +* The `TextureTintStripPipeline` now extends `TextureTintPipeline` and just changes the topolgy, vastly reducing the filesize. +* `TransformMatrix.getXRound` is a new method that will return the X component, optionally passed via `Math.round`. +* `TransformMatrix.getYRound` is a new method that will return the Y component, optionally passed via `Math.round`. +* The `KeyboardPlugin` no longer emits `keydown_` events. These were replaced with `keydown-` events in v3.15. The previous event string was deprecated in v3.20. +* The `KeyboardPlugin` no longer emits `keyup_` events. These were replaced with `keyup-` events in v3.15. The previous event string was deprecated in v3.20. +* The `ScaleManager.updateBounds` method is now called every time the browser fires a 'resize' or 'orientationchange' event. This will update the offset of the canvas element Phaser is rendering to, which is responsible for keeping input positions correct. However, if you change the canvas position, or visibility, via any other method (i.e. via an Angular route) you should call the `updateBounds` method directly, yourself. +* The constant `Phaser.Renderer.WebGL.BYTE` value has been removed as it wasn't used internally. +* The constant `Phaser.Renderer.WebGL.SHORT` value has been removed as it wasn't used internally. +* The constant `Phaser.Renderer.WebGL.UNSIGNED_BYTE` value has been removed as it wasn't used internally. +* The constant `Phaser.Renderer.WebGL.UNSIGNED_SHORT` value has been removed as it wasn't used internally. +* The constant `Phaser.Renderer.WebGL.FLOAT` value has been removed as it wasn't used internally. +* `global.Phaser = Phaser` has been removed, as it's no longer required by the UMD loader, which should make importing in Angular 10 easier. Fix #5212 (thanks @blackyale) +* `Pointer.downTime` now stores the event timestamp of when the first button on the input device was pressed down, not just when button 1 was pressed down. +* `Pointer.upTime` now stores the event timestamp of when the final depressed button on the input device was released, not just when button 1 was released. +* The `Pointer.getDuration` method now uses the new Pointer `downTime` and `upTime` values, meaning it will accurately report the duration of when any button is being held down, not just the primary one. Fix #5112 (thanks @veleek) +* The `BaseShader` default vertex shader now includes the `outTexCoord` vec2 varying, mapped to be the same as that found in the pipeline shaders. Fix #5120 (@pavel-shirobok) +* When using the `GameObjectCreator` for `Containers` you can now specify the `children` property in the configuration object. +* `WebGLRenderer.finalType` is a new boolean property that signifies if the current Game Object being rendered is the final one in the list. +* The `WebGLRenderer.updateCanvasTexture` method will now set `gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL` to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064 #5155 (thanks @hugoruscitti @immangrove-supertree) +* `Textures.Parsers.JSONHash` will now perform a `hasOwnProperty` check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from `JSON.parse`. Fix #4768 (thanks @RollinSafary) +* The `Camera3D` Plugin has been rebuilt for Phaser 3.50 and the webpack config updated. This plugin is now considered deprecated and will not be updated beyond this release. +* `Tween.seek` will no longer issue a console warning for `'Tween.seek duration too long'`, it's now up to you to check on the performance of tween seeking. +* `WebGLRenderer.previousPipeline` is a new property that is set during a call to `clearPipeline` and used during calls to `rebindPipeline`, allowing the renderer to rebind any previous pipeline, not just the Multi Pipeline. +* The `WebGLRenderer.rebindPipeline` method has been changed slightly. Previously, you had to specify the `pipelineInstance`, but this is now optional. If you don't, it will use the new `previousPipeline` property instead. If not set, or none given, it will now return without throwing gl errors as well. +* If `inputWindowEvents` is set in the Game Config, then the `MouseManager` will now listen for the events on `window.top` instead of just `window`, which should help in situations where the pointer is released outside of an embedded iframe. Fix #4824 (thanks @rexrainbow) +* `Types.GameObjects.Text.GetTextSizeObject` is a new type def for the GetTextSize function results. +* The `Arcade.Body.resetFlags` method has a new optional boolean parameter `clear`. If set, it clears the `wasTouching` flags on the Body. This happens automatically when `Body.reset` is called. Previous to this, the flags were not reset until the next physics step (thanks @samme) +* `Utils.Array.StableSort` has been recoded. It's now based on Two-Screens stable sort 0.1.8 and has been updated to fit into Phaser better and no longer create any window bound objects. The `inplace` function has been removed, just call `StableSort(array)` directly now. All classes that used `StableSort.inplace` have been updated to call it directly. +* If a Scene is paused, or sent to sleep, it will automatically call `Keyboard.resetKeys`. This means that if you hold a key down, then sleep or pause a Scene, then release the key and resume or wake the Scene, it will no longer think it is still being held down (thanks @samme) +* `Actions.setOrigin` will now call `updateDisplayOrigin` on the items array, otherwise the effects can't be seen when rendering. +* You can now set the `ArcadeWorld.fixedStep` property via the `ArcadeWorldConfig` object (thanks @samme) +* `Utils.Array.NumerArray` can now accept the `start` and `end` parameters in reverse order, i.e. `10, 1` will generate a number array running from 10 to 1. Internally it has also been optimized to skip string based returns. +* `DataManager.Events.DESTROY` is a new event that the Data Manager will _listen_ for from its parent and then call its own `destroy` method when received. + +### Bug Fixes + +* `RenderTexture.resize` (which is called from `setSize`) wouldn't correctly set the `TextureSource.glTexture` property, leading to `bindTexture: attempt to use a deleted object` errors under WebGL. +* `RenderTexture.fill` would fail to fill the correct area under WebGL if the RenderTexture wasn't the same size as the Canvas. It now fills the given region properly. +* The `MatterAttractors` plugin, which enables attractors between bodies, has been fixed. The original plugin only worked if the body with the attractor was _first_ in the world bodies list. It can now attract any body, no matter where in the world list it is. Fix #5160 (thanks @strahius) +* The `KeyboardManager` and `KeyboardPlugin` were both still checking for the `InputManager.useQueue` property, which was removed several versions ago. +* In Arcade Physics, Dynamic bodies would no longer hit walls when riding on horizontally moving platforms. The horizontal (and vertical) friction is now re-applied correctly in these edge-cases. Fix #5210 (thanks @Dercetech @samme) +* Calling `Rectangle.setSize()` wouldn't change the underlying geometry of the Shape Game Object, causing any stroke to be incorrectly rendered after a size change. +* The `ProcessQueue` was emitting the wrong events internally. It now emits 'add' and 'remove' correctly (thanks @halilcakar) +* The `GridAlign` action didn't work if only the `height` parameter was set. Fix #5019 (thanks @halilcakar) +* The `Color.HSVToRGB` function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089 (thanks @DiamondeX) +* Previously, the `easeParams` array within a Tweens `props` object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292 (thanks @willblackmore) +* When using `Camera.setRenderToTexture` its `zoom` and `rotation` values would be applied twice. Fix #4221 #4924 #4713 (thanks @wayfu @DanMcgraw @pavel-shirobok) +* `GameObjects.Shape.Grid` would render a white fill even if you passed `undefined` as the fill color in the constructor. It now doesn't render cells if no fill color is given. +* The `onMouse` events in the Input Manager didn't reset the `activePointer` property to the mouse, meaning on dual-input systems such as Touch Screen devices, the active pointer would become locked to whichever input method was used first. Fix #4615 #5232 (thanks @mmolina01 @JstnPwll @Legomite) +* The Scale Managers `GetScreenOrientation` function will now check for `window.orientation` first, because iOS mobile browsers have an incomplete implementation of the Screen API, forcing us to use the window value as a priority. This means the Scale Manager will now emit `orientationchange` events correctly on iOS. Fix #4361 #4914 (thanks @pfdtravalmatic @jackfreak @cuihu) +* `Time.Clock.addEvent` can now take an instance of a `TimerEvent` as its parameter. Fix #5294 (thanks @samme @EmilSV) +* `GameConfig.audio` now defaults to an empty object, which simplifies access to the config in later checks (thanks @samme) + +### Namespace Updates + +* The `Phaser.Curves.MoveTo` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.DOM.GetInnerHeight` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.Bob` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.LightsManager` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.LightsPlugin` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.Particles.EmitterOp` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.GetTextSize` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.MeasureText` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.TextStyle` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Input.CreatePixelPerfectHandler` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Arcade.Components.OverlapCirc` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Arcade.Components.OverlapRect` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Arcade.Tilemap` namespace has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Matter.Components` namespace has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Matter.Events` namespace has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Matter.MatterGameObject` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Matter.PointerConstraint` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Scenes.GetPhysicsPlugins` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Scenes.GetScenePlugins` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Structs.Events` namespace has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Tilemaps.Parsers.Tiled` function has now been exposed on the Phaser namespace (thanks @samme) +* Every single `Tilemap.Component` function has now been made public. This means you can call the Component functions directly, should you need to, outside of the Tilemap system. + +### 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 @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards @rexrainbow @Riderrr @spwilson2 @EmilSV diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a7f25cd3..54b3a8bb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,499 +2,7 @@ ## Version 3.50.0 - Subaru - in development -### WebGL Pipeline Updates - -If you use a custom WebGL Pipeline in your game, you must update your code in order to use Phaser 3.50. - -Due to the huge amount of work that has taken place in this area, all of the pipelines have been renamed. If you extend any of these pipelines or use them in your game code (referenced by name), then please update accordingly. The name changes are: - -* `TextureTintPipeline` is now called the `MultiPipeline`. -* `TextureTintStripPipeline` is now called the `RopePipeline`. -* `ForwardDiffuseLightPipeline` is now called the `LightPipeline`. - -To match the new pipeline names, the shader source code has also been renamed. - -* `ForwardDiffuse.frag` is now called `Light.frag`. -* `TextureTint.frag` is now called `Multi.frag`. -* `TextureTint.vert` is now called `Multi.vert`. - -Other pipeline changes are as follows: - -* `Types.Renderer.WebGL.WebGLPipelineConfig` is a new TypeDef that helps you easily configure your own Custom Pipeline when using TypeScript and also provides better JSDocs. -* `Types.Renderer.WebGL.WebGLPipelineAttributesConfig` is a new TypeDef that helps you easily configure the attributes for your own Custom Pipelines when using TypeScript and also provides better JSDocs. -* All pipelines will now work out the `renderer` property automatically, so it's no longer required in the config. -* All pipelines will now work out the `gl` property automatically, so it's no longer required in the config. -* All pipelines will now extract the `name` property from the config, allowing you to set it externally. -* All pipelines will now extract the `vertexCapacity` property from the config, allowing you to set it externally. -* All pipelines will now extract the `vertexSize` property from the config, allowing you to set it externally. -* All pipelines will now extract the `vertexData` property from the config, allowing you to set it externally. -* All pipelines will now extract the `attributes` property from the config, allowing you to set it externally. -* All pipelines will now extract the `topology` property from the config, allowing you to set it externally. - -### Pipeline Manager - -The `WebGL.PipelineManager` is a new class that is responsbile for managing all of the WebGL Pipelines in Phaser. An instance of the Pipeline Manager is created by the WebGL Renderer and is available under the `pipelines` property. This means that the WebGL Renderer no longer handles pipelines directly, causing the following API changes: - -* `WebGLRenderer.pipelines` is no longer a plain object containing pipeline instances. It's now an instance of the `PipelineManager` class. This instance is created during the init and boot phase of the renderer. -* The `WebGLRenderer.currentPipeline` property no longer exists, instead use `PipelineManager.current`. -* The `WebGLRenderer.previousPipeline` property no longer exists, instead use `PipelineManager.previous`. -* The `WebGLRenderer.hasPipeline` method no longer exists, instead use `PipelineManager.has`. -* The `WebGLRenderer.getPipeline` method no longer exists, instead use `PipelineManager.get`. -* The `WebGLRenderer.removePipeline` method no longer exists, instead use `PipelineManager.remove`. -* The `WebGLRenderer.addPipeline` method no longer exists, instead use `PipelineManager.add`. -* The `WebGLRenderer.setPipeline` method no longer exists, instead use `PipelineManager.set`. -* The `WebGLRenderer.rebindPipeline` method no longer exists, instead use `PipelineManager.rebind`. -* The `WebGLRenderer.clearPipeline` method no longer exists, instead use `PipelineManager.clear`. - -The Pipeline Manager also offers the following new features: - -* The `PipelineManager.resize` method automatically handles resize events across all pipelines. -* The `PipelineManager.preRender` method calls the pre-render method of all pipelines. -* The `PipelineManager.render` method calls the render method of all pipelines. -* The `PipelineManager.postRender` method calls the post-render method of all pipelines. -* The `PipelineManager.setMulti` method automatically binds the Multi Texture Pipeline, Phaser's default. -* The `PipelineManager.clear` method will clear the pipeline, store it in `previous` and free the renderer. -* The `PipelineManager.rebind` method will reset the rendering context and restore the `previous` pipeline, if set. - -New constants have been created to help you reference a pipeline without needing to use strings: - -* `Phaser.Renderer.WebGL.Pipelines.BITMAPMASK_PIPELINE` for the Bitmap Mask Pipeline. -* `Phaser.Renderer.WebGL.Pipelines.LIGHT_PIPELINE` for the Light 2D Pipeline. -* `Phaser.Renderer.WebGL.Pipelines.SINGLE_PIPELINE` for the Single Pipeline. -* `Phaser.Renderer.WebGL.Pipelines.MULTI_PIPELINE` for the Multi Pipeline. -* `Phaser.Renderer.WebGL.Pipelines.ROPE_PIPELINE` for the Rope Pipeline. - -All Game Objects have been updated to use the new constants and Pipeline Manager. - -#### Single Pipeline - -There is also a new pipeline called `SinglePipeline`, created to emulate the old `TextureTintPipeline`. This special pipeline uses just a single texture and makes things a lot easier if you wish to create a custom pipeline, but not have to recode your shaders to work with multiple textures. Instead, just extend `SinglePipeline`, where-as before you extended the `TextureTintPipeline` and you won't have to change any of your shader code. However, if you can, you should update it to make it perform faster, but that choice is left up to you. - -### WebGL Multi-Texture Rendering - -The Multi Pipeline (previously called the Texture Tint Pipeline) has had its core flow rewritten to eliminate the need for constantly creating `batch` objects. Instead, it now supports the new multi-texture shader, vastly increasing rendering performance, especially on draw-call bound systems. - -All of the internal functions, such as `batchQuad` and `batchSprite` have been updated to use the new method of texture setting. The method signatures all remain the same unless indicated below. - -* `Config.render.maxTextures` is a new game config setting that allows you to control how many texture units will be used in WebGL. -* `WebGL.Utils.checkShaderMax` is a new function, used internally by the renderer, to determine the maximum number of texture units the GPU + browser supports. -* The property `WebGLRenderer.currentActiveTextureUnit` has been renamed to `currentActiveTexture`. -* `WebGLRenderer.startActiveTexture` is a new read-only property contains the current starting active texture unit. -* `WebGLRenderer.maxTextures` is a new read-only property that contains the maximum number of texture units WebGL can use. -* `WebGLRenderer.textureIndexes` is a new read-only array that contains all of the available WebGL texture units. -* `WebGLRenderer.tempTextures` is a new read-only array that contains temporary WebGL textures. -* The `WebGLRenderer.currentTextures` property has been removed, as it's no longer used. -* `TextureSource.glIndex` is a new property that holds the currently assigned texture unit for the Texture Source. -* `TextureSource.glIndexCounter` is a new property that holds the time the index was assigned to the Texture Source. -* `WebGLRenderer.currentTextures` has been removed, as it's no longer used internally. -* `WebGLRenderer.setBlankTexture` no longer has a `force` parameter, as it's set by default. -* The Mesh Game Object WebGL Renderer function has been updated to support multi-texture units. -* The Blitter Game Object WebGL Renderer function has been updated to support multi-texture units. -* The Bitmap Text Game Object WebGL Renderer function has been updated to support multi-texture units. -* The Dynamic Bitmap Text Game Object WebGL Renderer function has been updated to support multi-texture units. -* The Particle Emitter Game Object WebGL Renderer function has been updated to support multi-texture units. -* The Texture Tint vertex and fragment shaders have been updated to support the `inTexId` float attribute and dynamic generation. -* The Texture Tint Pipeline has a new attribute, `inTexId` which is a `gl.FLOAT`. -* `TextureTintPipeline.bind` is a new method that sets the `uMainSampler` uniform. -* The `TextureTintPipeline.requireTextureBatch` method has been removed, as it's no longer required. -* The `TextureTintPipeline.pushBatch` method has been removed, as it's no longer required. -* The `TextureTintPipeline.maxQuads` property has been removed, as it's no longer required. -* The `TextureTintPipeline.batches` property has been removed, as it's no longer required. -* `TextureTintPipeline.flush` has been rewritten to support multi-textures. -* `TextureTintPipeline.flush` no longer creates a sub-array if the batch is full, but instead uses `bufferData` for speed. -* `WebGLPipeline.currentUnit` is a new property that holds the most recently assigned texture unit. Treat as read-only. -* `WebGLRenderer.setTextureSource` is a new method, used by pipelines and Game Objects, that will assign a texture unit to the given Texture Source. -* The `WebGLRenderer.setTexture2D` method has been updated to use the new texture unit assignment. It no longer takes the `textureUnit` or `flush` parameters and these have been removed from its method signature. -* `WebGLRenderer.setTextureZero` is a new method that activates texture zero and binds the given texture to it. Useful for fbo backed game objects. -* `WebGLRenderer.clearTextureZero` is a new method that clears the texture that was bound to unit zero. -* `WebGLRenderer.textureZero` is a new property that holds the currently bound unit zero texture. -* `WebGLRenderer.normalTexture` is a new property that holds the currently bound normal map (texture unit one). -* `WebGLRenderer.setNormalMap` is a new method that sets the current normal map texture. -* `WebGLRenderer.clearNormalMap` is a new method that clears the current normal map texture. -* `WebGLRenderer.resetTextures` is a new method that flushes the pipeline, resets all textures back to the temporary ones, and resets the active texture counter. -* `WebGLPipeline.boot` will now check all of the attributes and store the pointer location within the attribute entry. -* `WebGLPipeline.bind` no longer looks-up and enables every attribute, every frame. Instead, it uses the cached pointer location stored in the attribute entry, cutting down on redundant WebGL operations. -* `WebGLRenderer.isNewNormalMap` is a new method that returns a boolean if the given parameters are not currently used. -* `WebGLPipeline.forceZero` is a new property that informs Game Objects if the pipeline requires a zero bound texture unit. -* `WebGLPipeline.setAttribPointers` is a new method that will set the vertex attribute pointers for the pipeline. -* `WebGLRenderer.unbindTextures` is a new method that will activate and then null bind all WebGL textures. -* `Renderer.WebGL.Utils.parseFragmentShaderMaxTextures` is a new function that will take fragment shader source and search it for `%count%` and `%forloop%` declarations, replacing them with the required GLSL for multi-texture support, returning the modified source. - -### Light Pipeline Changes - -The Light Pipeline (previously called the Forward Diffuse Light Pipeline), which is responsible for rendering lights under WebGL, has been rewritten to work with the new Multi Pipeline features. Lots of redundant code has been removed and the following changes and improvements took place: - -* The pipeline now works with Game Objects that do not have a normal map. They will be rendered using the new default normal map, which allows for a flat light effect to pass over them and merge with their diffuse map colors. -* Fixed a bug in the way lights were handled that caused Tilemaps to render one tile at a time, causing massive slow down. They're now batched properly, making a combination of lights and tilemaps possible again. -* The Bitmap Text (Static and Dynamic) Game Objects now support rendering with normal maps. -* The TileSprite Game Objects now support rendering with normal maps. -* Mesh and Quad Game Objects now support rendering with normal maps. -* The Graphics Game Objects now support rendering in Light2d. You can even use normal map textures for the texture fills. -* Particle Emitter Game Object now supports rendering in Light2d. -* All Shape Game Objects (Rectangle, IsoBox, Star, Polygon, etc) now support rendering in Light2d. -* The Text Game Object now supports rendering in Light2d, no matter which font, stroke or style it is using. -* Both Static and Dynamic Tilemap Layer Game Objects now support the Light2d pipeline, with or without normal maps. -* The pipeline will no longer look-up and set all of the light uniforms unless the `Light` is dirty. -* The pipeline will no longer reset all of the lights unless the quantity of lights has changed. -* The `ForwardDiffuseLightPipeline.defaultNormalMap` property has changed, it's now an object with a `glTexture` property that maps to the pipelines default normal map. -* The `ForwardDiffuseLightPipeline.boot` method has been changed to now generate a default normal map. -* The `ForwardDiffuseLightPipeline.onBind` method has been removed as it's no longer required. -* The `ForwardDiffuseLightPipeline.setNormalMap` method has been removed as it's no longer required. -* `ForwardDiffuseLightPipeline.bind` is a new method that handles setting-up the shader uniforms. -* The `ForwardDiffuseLightPipeline.batchTexture` method has been rewritten to use the Texture Tint Pipeline function instead. -* The `ForwardDiffuseLightPipeline.batchSprite` method has been rewritten to use the Texture Tint Pipeline function instead. -* `ForwardDiffuseLightPipeline.lightCount` is a new property that stores the previous number of lights rendered. -* `ForwardDiffuseLightPipeline.getNormalMap` is a new method that will look-up and return a normal map for the given object. - -### Lights - -* `Light.dirty` is a new property that controls if the light is dirty, or not, and needs its uniforms updating. -* `Light` has been recoded so that all of its properties are now setters that activate its `dirty` flag. -* `LightsManager.destroy` will now clear the `lightPool` array when destroyed, where-as previously it didn't. -* `LightsManager.cull` now takes the viewport height from the renderer instead of the game config (thanks zenwaichi) - -### WebGL ModelViewProjection API Changes - -The `ModelViewProjection` object contained a lot of functions that Phaser never used internally. These have now been -moved to external functions, which can be easily excluded from Custom builds to save space. - -If you used any of them in your code, please update to the new function names below: - -* `Phaser.Renderer.WebGL.MVP` is a new namespace under which the Model View Projection functions now live. -* `projIdentity` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ProjectIdentity` -* `projPersp` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ProjectPerspective` -* `modelRotateX` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.RotateX` -* `modelRotateY` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.RotateY` -* `modelRotateZ` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.RotateZ` -* `viewLoad` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewLoad` -* `viewRotateX` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewRotateX` -* `viewRotateY` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewRotateY` -* `viewRotateZ` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewRotateZ` -* `viewScale` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewScale` -* `viewTranslate` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewTranslate` -* `modelIdentity` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.Identity` -* `modelScale` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.Scale` -* `modelTranslate` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.Translate` -* `viewIdentity` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewIdentity` -* `viewLoad2D` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ViewLoad2D` -* `projOrtho` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ProjectOrtho` -* `Phaser.Renderer.WebGL.MVP.SetIdentity` is a new function the others use, to save on space. - -### BitmapText New Features, Updates and API Changes - -* `BitmapText.setCharacterTint` is a new method that allows you to set a tint color (either additive or fill) on a specific range of characters within a static Bitmap Text. You can specify the start and length offsets and per-corner tint colors. -* `BitmapText.setWordTint` is a new method that allows you to set a tint color (either additive or fill) on all matching words within a static Bitmap Text. You can specify the word by string, or numeric offset, and the number of replacements to tint. -* `BitmapText.setDropShadow` is a new method that allows you to apply a drop shadow effect to a Bitmap Text object. You can set the horizontal and vertical offset of the shadow, as well as the color and alpha levels. Call this method with no parameters to clear a shadow. -* `BitmapTextWebGLRenderer` has been rewritten from scratch to make use of the new pre-cached WebGL uv texture and character location data generated by `GetBitmapTextSize`. This has reduced the number of calculations made in the function dramatically, as it no longer has work out glyph advancing or offsets during render, but only when the text content updates. -* `BitmapText.getCharacterAt` is a new method that will return the character data from the BitmapText at the given `x` and `y` coordinates. The character data includes the code, position, dimensions, and glyph information. -* The `BitmapTextSize` object returned by `BitmapText.getTextBounds` has a new property called `characters` which is an array that contains the scaled position coordinates of each character in the BitmapText, which you could use for tasks such as determining which character in the BitmapText was clicked. -* `ParseXMLBitmapFont` will now calculate the WebGL uv data for the glyphs during parsing. This avoids it having to be done during rendering, saving CPU cycles on an operation that never changes. -* `ParseXMLBitmapFont` will now create a Frame object for each glyph. This means you could, for example, create a Sprite using the BitmapText texture and the glyph as the frame key, i.e.: `this.add.sprite(x, y, fontName, 'A')`. -* `BitmapTextWord`, `BitmapTextCharacter` and `BitmapTextLines` are three new type defs that are now part of the `BitmapTextSize` config object, as returned by `getTextBounds`. This improves the TypeScript defs and JS Docs for this object. -* The signature of the `ParseXMLBitmapFont` function has changed. The `frame` parameter is no longer optional, and is now the second parameter in the list, instead of being the 4th. If you call this function directly, please update your code. -* The `BitmapText.getTextBounds` method was being called every frame, even if the bounds didn't change, potentially costing a lot of CPU time depending on the text length and quantity of them. It now only updates the bounds if they change. -* The `GetBitmapTextSize` function used `Math.round` on the values, if the `round` parameter was `true`, which didn't create integers. It now uses `Math.ceil` instead to give integer results. -* The `GetBitmapTextSize` function has a new boolean parameter `updateOrigin`, which will adjust the origin of the parent BitmapText if set, based on the new bounds calculations. -* `BitmapText.preDestroy` is a new method that will tidy-up all of the BitmapText data during object destruction. -* `BitmapText.dropShadowX` is a new property that controls the horizontal offset of the drop shadow on the Bitmap Text. -* `BitmapText.dropShadowY` is a new property that controls the vertical offset of the drop shadow on the Bitmap Text. -* `BitmapText.dropShadowColor` is a new property that sets the color of the Bitmap Text drop shadow. -* `BitmapText.dropShadowAlpha` is a new property that sets the alpha of the Bitmap Text drop shadow. -* `BatchChar` is a new internal private function for batching a single character of a Bitmap Text to the pipeline. -* If you give an invalid Bitmap Font key, the Bitmap Text object will now issue a `console.warn`. -* Setting the `color` value in the `DynamicBitmapText.setDisplayCallback` would inverse the red and blue channels if the color was not properly encoded for WebGL. It is now encoded automatically, meaning you can pass normal hex values as the colors in the display callback. Fix #5225 (thanks @teebarjunk) -* If you apply `setSize` to the Dynamic BitmapText the scissor is now calculated based on the parent transforms, not just the local ones, meaning you can crop Bitmap Text objects that exist within Containers. Fix #4653 (thanks @lgibson02) -* `ParseXMLBitmapFont` has a new optional parameter `texture`. If defined, this Texture is populated with Frame data, one frame per glyph. This happens automatically when loading Bitmap Text data in Phaser. - -### Update List Changes - -The way in which Game Objects add themselves to the Scene Update List has changed. Instead of being added by the Factory methods, they will now add and remove themselves based on the new `ADDED_TO_SCENE` and `REMOVED_FROM_SCENE` events. This means, you can now add Sprites directly to a Container, or Group, and they'll animate properly without first having to be part of the Display List. The full set of changes and new features relating to this follow: - -* `GameObjects.Events.ADDED_TO_SCENE` is a new event, emitted by a Game Object, when it is added to a Scene, or a Container that is part of the Scene. -* `GameObjects.Events.REMOVED_FROM_SCENE` is a new event, emitted by a Game Object, when it is removed from a Scene, or a Container that is part of the Scene. -* `Scenes.Events.ADDED_TO_SCENE` is a new event, emitted by a Scene, when a new Game Object is added to the display list in the Scene, or a Container that is on the display list. -* `Scenes.Events.REMOVED_FROM_SCENE` is a new event, emitted by a Scene, when it a Game Object is removed from the display list in the Scene, or a Container that is on the display list. -* `GameObject.addedToScene` is a new method that custom Game Objects can use to perform additional set-up when a Game Object is added to a Scene. For example, Sprite uses this to add itself to the Update List. -* `GameObject.removedFromScene` is a new method that custom Game Objects can use to perform additional tear-down when a Game Object is removed from a Scene. For example, Sprite uses this to remove themselves from the Update List. -* Game Objects no longer automatically remove themselves from the Update List during `preDestroy`. This should be handled directly in the `removedFromScene` method now. -* The `Container` will now test to see if any Game Object added to it is already on the display list, or not, and emit its ADDED and REMOVED events accordingly. Fix #5267 #3876 (thanks @halgorithm @mbpictures) -* `DisplayList.events` is a new property that references the Scene's Event Emitter. This is now used internally. -* `DisplayList.addChildCallback` is a new method that overrides the List callback and fires the new ADDED events. -* `DisplayList.removeChildCallback` is a new method that overrides the List callback and fires the new REMOVED events. -* `GameObjectCreator.events` is a new property that references the Scene's Event Emitter. This is now used internally. -* `GameObjectFactory.events` is a new property that references the Scene's Event Emitter. This is now used internally. -* `ProcessQueue.checkQueue` is a new boolean property that will make sure only unique objects are added to the Process Queue. -* The `Update List` now uses the new `checkQueue` property to ensure no duplicate objects are on the active list. -* `DOMElementFactory`, `ExternFactory`, `ParticleManagerFactor`, `RopeFactory` and `SpriteFactory` all no longer add the objects to the Update List, this is now handled by the ADDED events instead. -* `Sprite`, `Rope`, `ParticleEmitterManager`, `Extern` and `DOMElement` now all override the `addedToScene` and `removedFromScene` callbacks to handle further set-up tasks. - -### Spine Plugin Updates - -* The Spine Runtimes have been updated to 3.8.95, which are the most recent non-beta versions. Please note, you will _need_ to re-export your animations if you're working in a version of Spine lower than 3.8.20. -* `SpineContainer` is a new Game Object available via `this.add.spineContainer` to which you can add Spine Game Objects only. It uses a special rendering function to retain batching, even across multiple container or Spine Game Object instances, resulting in dramatically improved performance over using regular Containers. -* A Spine Game Object with `setVisible(false)` will no longer still cause internal gl commands and is now properly skipped, retaining any current batch in the process. Fix #5174 (thanks @Kitsee) -* The Spine Game Object WebGL Renderer will no longer clear the type if invisible and will only end the batch if the next type doesn't match. -* The Spine Game Object WebGL Renderer will no longer rebind the pipeline if it was the final object on the display list, saving lots of gl commands. -* The Webpack build scripts have all been updated for Webpack 4.44.x. Fix #5243 (thanks @RollinSafary) -* There is a new npm script `npm run plugin.spine.runtimes` which will build all of the Spine runtimes, for ingestion by the plugin. Note: You will need to check-out the Esoteric Spine Runtimes repo into `plugins/spine/` in order for this to work. -* Spine Game Objects can now be rendered to Render Textures. Fix #5184 (thanks @Kitsee) -* Using > 128 Spine objects in a Container would cause a `WebGL: INVALID_OPERATION: vertexAttribPointer: no ARRAY_BUFFER is bound and offset is non-zero` error if you added any subsequent Spine objects to the Scene. There is now no limit. Fix #5246 (thanks @d7561985) -* The Spine Plugin will now work in HEADLESS mode without crashing. Fix #4988 (thanks @raimon-segura) -* Spine Game Objects now use -1 as their default blend mode, which means 'skip setting it'. -* The Spine TypeScript defs have been updated for the latest version of the plugin and to add SpineContainers. -* The `SpineGameObject.setAnimation` method will now use the `trackIndex` parameter if `ignoreIfPlaying` is set and run the check against this track index. Fix #4842 (thanks @vinerz) -* The `SpineFile` will no longer throw a warning if adding a texture into the Texture Manager that already exists. This allows you to have multiple Spine JSON use the same texture file, however, it also means you now get no warning if you accidentally load a texture that exists, so be careful with your keys! Fix #4947 (thanks @Nomy1) -* The Spine Plugin `destroy` method will now no longer remove the Game Objects from the Game Object Factory, or dispose of the Scene Renderer. This means when a Scene is destroyed, it will keep the Game Objects in the factory for other Scene's to use. Fix #5279 (thanks @Racoonacoon) -* `SpinePlugin.gameDestroy` is a new method that is called if the Game instance emits a `destroy` event. It removes the Spine Game Objects from the factory and disposes of the Spine scene renderer. - -### Animation API New Features and Updates - -If you use Animations in your game, please read the following important API changes in 3.50: - -The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations just to change properties such as `duration`, and can now set them dynamically at run-time as well. - -* The `Animation` class no longer extends `EventEmitter`, as it no longer emits any events directly. This means you cannot now listen for events directly from an Animation instance. All of the events are now dispatched by the Game Objects instead. -* All of the `SPRITE_ANIMATION_KEY` events have been removed. Instead, please use the new events which all carry the `frameKey` parameter, which can be used to handle frame specific events. The only exception to this is `ANIMATION_COMPLETE_KEY`, which is a key specific version of the completion event. -* `ANIMATION_UPDATE_EVENT` is a new event that is emitted from a Sprite when an animation updates, i.e. its frame changes. -* `ANIMATION_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. Fix #4894 (thanks @scott20145) -* The Game Object `Component.Animation` component has been renamed to `AnimationState` and has moved namespace. It's now in `Phaser.Animations` instead of `GameObjects.Components` to help differentiate it from the `Animation` class when browsing the documentation. -* The `play`, `playReverse`, `playAfterDelay`, `playAfterRepeat` and `chain` Sprite and Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object, as well as a string, as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. -* `AnimationState.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations. -* All playback methods: `play`, `playReverse`, `playAfterDelay` and `playAfterRepeat` will now check to see if the given animation key exists locally on the Sprite first. If it does, it's used, otherwise it then checks the global Animation Manager for the key instead. -* `AnimationState.skipMissedFrames` is now used when playing an animation, allowing you to create animations that run at frame rates far exceeding the refresh rate, or that will update to the correct frame should the game lag. Feature #4232 (thanks @colorcube) -* `AnimationManager.addMix` is a new method that allows you to create mixes between two animations. Mixing allows you to specify a unique delay between a pairing of animations. When playing Animation A on a Game Object, if you then play Animation B, and a mix exists, it will wait for the specified delay to be over before playing Animation B. This allows you to customise smoothing between different types of animation, such as blending between an idle and a walk state, or a running and a firing state. -* `AnimationManager.getMix` is a new method that will return the mix duration between the two given animations. -* `AnimationManager.removeMix` is a new method that will remove the mixture between either two animations, or all mixtures for the given animation. -* `AnimationState.remove` is a new method that will remove a locally stored Animation instance from a Sprite. -* `AnimationState.get` is a new method that will return a locally stored Animation instance from the Sprite. -* `AnimationState.exists` is a new method that will check if a locally stored Animation exists on the Sprite. -* The internal `AnimationState.remove` method has been renamed to `globalRemove`. -* `AnimationState.textureManager` is a new property that references the global Texture Manager. -* `AnimationState.anims` is a new property that contains locally created Animations in a Custom Map. -* `AnimationState.play` and `Sprite.play` no longer accept a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. -* `AnimationState.playReverse` and `Sprite.playReverse` no longer accept a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. -* The `AnimationState.delayedPlay` method has been renamed to `playAfterDelay`. The parameter order has also changed, so the key now comes first instead of the duration. -* The `AnimationState.stopOnRepeat` method has been renamed to `stopAfterRepeat` -* The `AnimationState.getCurrentKey` method has been renamed to `getName`. -* `AnimationState.getFrameName` is a new method that will return the key of the current Animation Frame, if an animation has been loaded. -* `AnimationState.playAfterDelay` and `Sprite.playAfterDelay` are new methods that will play the given animation after the delay in ms expires. -* `AnimationState.playAfterRepeat` and `Sprite.playAfterRepeat` are new methods that will play the given animation after the current animation finishes repeating. You can also specify the number of repeats allowed left to run. -* The `AnimationState.chain` method is now available on the Sprite class. -* The `AnimationState.stopAfterDelay` method is now available on the Sprite class. -* The `AnimationState.stopAfterRepeat` method is now available on the Sprite class. -* The `AnimationState.stopOnFrame` method is now available on the Sprite class. -* `AnimationManager.createFromAseprite` is a new method that allows you to use animations created in the Aseprite editor directly in Phaser. Please see the comprehensive documentation for this method for full details on how to do this. -* `AnimationState` now handles all of the loading of the animation. It no longer has to make calls out to the Animation Manager or Animation instance itself and will load the animation data directly, replacing as required from the optional `PlayAnimationConfig`. This improves performance and massively reduces CPU calls in animation heavy games. -* The `PlayAnimationConfig.frameRate` property lets you optionally override the animation frame rate. -* The `PlayAnimationConfig.duration` property lets you optionally override the animation duration. -* The `PlayAnimationConfig.delay` property lets you optionally override the animation delay. -* The `PlayAnimationConfig.repeat` property lets you optionally override the animation repeat counter. -* The `PlayAnimationConfig.repeatDelay` property lets you optionally override the animation repeat delay value. -* The `PlayAnimationConfig.yoyo` property lets you optionally override the animation yoyo boolean. -* The `PlayAnimationConfig.showOnStart` property lets you optionally override the animation show on start value. -* The `PlayAnimationConfig.hideOnComplete` property lets you optionally override the animation hide on complete value. -* The `PlayAnimationConfig.startFrame` property lets you optionally set the animation frame to start on. -* The `PlayAnimationConfig.timeScale` property lets you optionally set the animation time scale factor. -* `AnimationState.delayCounter` is a new property that allows you to control the delay before an animation will start playing. Only once this delay has expired, will the animation `START` events fire. Fix #4426 (thanks @bdaenen) -* `AnimationState.hasStarted` is a new boolean property that allows you to tell if the current animation has started playing, or is still waiting for a delay to expire. -* `AnimationState.showOnStart` is a new boolean property that controls if the Game Object should have `setVisible(true)` called on it when the animation starts. -* `AnimationState.hideOnComplete` is a new boolean property that controls if the Game Object should have `setVisible(false)` called on it when the animation completes. -* The `AnimationState.chain` method docs said it would remove all pending animations if called with no parameters. However, it didn't - and now does! -* The `AnimationState.setDelay` method has been removed. It never actually worked and you can now perform the same thing by calling either `playAfterDelay` or setting the `delay` property in the play config. -* The `AnimationState.getDelay` method has been removed. You can now read the `delay` property directly. -* The `AnimationState.setRepeat` method has been removed. You can achieve the same thing by setting the `repeat` property in the play config, or adjusting the public `repeatCounter` property if the animation has started. -* `AnimationState.handleStart` is a new internal private method that handles the animation start process. -* `AnimationState.handleRepeat` is a new internal private method that handles the animation repeat process. -* `AnimationState.handleStop` is a new internal private method that handles the animation stop process. -* `AnimationState.handleComplete` is a new internal private method that handles the animation complete process. -* `AnimationState.emitEvents` is a new internal private method that emits animation events, cutting down on duplicate code. -* The `AnimationState.restart` method has a new optional boolean parameter `resetRepeats` which controls if you want to reset the repeat counter during the restart, or not. -* `Animation.getTotalFrames` is a new method that will return the total number of frames in the animation. You can access it via `this.anims.currentAnim.getTotalFrames` from a Sprite. -* `Animation.calculateDuration` is a new method that calculates the duration, frameRate and msPerFrame for a given animation target. -* The `BuildGameObjectAnimation` function now uses the `PlayAnimationConfig` object to set the values. -* `Sprite.playReverse` is a new method that allows you to play the given animation in reverse on the Sprite. -* `Sprite.playAfterDelay` is a new method that allows you to play the given animation on the Sprite after a delay. -* `Sprite.stop` is a new method that allows you to stop the current animation on the Sprite. -* `AnimationManager.load` has been removed as it's no longer required. -* `AnimationManager.staggerPlay` has been fixed so you can now pass in negative stagger values. -* `AnimationManager.staggerPlay` has a new optional boolean parameter `staggerFirst`, which allows you to either include or exclude the first child in the stagger calculations. -* The `Animation.completeAnimation` method has been removed as it's no longer required. -* The `Animation.load` method has been removed as it's no longer required. -* The `Animation.setFrame` method has been removed as it's no longer required. -* The `Animation.getFirstTick` method has no longer needs the `includeDelay` parameter, as it's handled by `AnimationState` now. -* The `Animation.getFrames` method has a new optional boolean parameter `sortFrames` which will run a numeric sort on the frame names after constructing them, if a string-based frame is given. -* `Types.Animations.Animation` has a new boolean property `sortFrames`, which lets Phaser numerically sort the generated frames. -* `AnimationState.timeScale` is a new public property that replaces the old private `_timeScale` property. -* `AnimationState.delay` is a new public property that replaces the old private `_delay` property. -* `AnimationState.repeat` is a new public property that replaces the old private `_repeat` property. -* `AnimationState.repeatDelay` is a new public property that replaces the old private `_repeatDelay` property. -* `AnimationState.yoyo` is a new public property that replaces the old private `_yoyo` property. -* `AnimationState.inReverse` is a new public property that replaces the old private `_reverse` property. -* `AnimationState.startAnimation` is a new public method that replaces the old private `_startAnimation` method. -* The `AnimationState.getProgress` method has been fixed so it will return correctly if the animation is playing in reverse. -* The `AnimationState.globalRemove` method will now always be called when an animation is removed from the global Animation Manager, not just once. -* The `AnimationState.getRepeat` method has now been removed. You can get the value from the `repeat` property. -* The `AnimationState.setRepeatDelay` method has now been removed. You can set the value using the `repeatDelay` config property, or changing it at run-time. -* `AnimationState.complete` is a new method that handles the completion in animation playback. -* The `AnimationState.setTimeScale` method has now been removed. You can set the value using the `timeScale` config property, or changing it at run-time. -* The `AnimationState.getTimeScale` method has now been removed. You can read the value using the `timeScale` property. -* The `AnimationState.getTotalFrames` method has been fixed and won't error if called when no animation is loaded. -* The `AnimationState.setYoyo` method has now been removed. You can set the value using the `yoyo` config property, or changing it at run-time. -* The `AnimationState.getYoyo` method has now been removed. You can read the value using the `yoyo` property. -* The `AnimationState.stopAfterRepeat` method now has an optional parameter `repeatCount`, so you can tell the animation to stop after a specified number of repeats, not just 1. -* When playing an animation in reverse, if it reached the first frame and had to repeat, it would then jump to the frame before the final frame and carry on, skipping out the final frame. -* The `AnimationState.updateFrame` method has now been removed. Everything is handled by `setCurrentFrame` instead, which removes one extra step out of the update process. -* `GenerateFrameNames` will now `console.warn` if the generated frame isn't present in the texture, which should help with debugging animation creation massively. -* `GenerateFrameNumbers` will now `console.warn` if the generated frame isn't present in the texture, which should help with debugging animation creation massively. -* `GenerateFrameNumbers` would include the __BASE frame by mistake in its calculations. This didn't end up in the final animation, but did cause a cache miss when building the animation. -* `GenerateFrameNumbers` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. -* `GenerateFrameNames` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. - -### New Features - -* `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value. -* `Geom.Intersects.GetLineToPolygon` is a new function that checks for the closest point of intersection between a line segment and an array of polygons. -* `Geom.Intersects.GetLineToPoints` is a new function that checks for the closest point of intersection between a line segment and an array of points, where each pair of points form a line segment. -* `Geom.Intersects.GetRaysFromPointToPolygon` is a new function that emits rays out from the given point and detects for intersection against all given polygons, returning the points of intersection in the results array. -* `Geom.Polygon.Translate` is a new function that allows you to translate all the points of a polygon by the given values. -* `Geom.Polygon.Simplify` is a new function that takes a polygon and simplifies the points by running them through a combination of Douglas-Peucker and Radial Distance algorithms, potentially dramatically reducing the number of points while retaining its shape. -* `WebGLRenderer.setInt1iv` will allow you to look-up and set a 1iv uniform on the given shader. -* `Phaser.Types.Math.Vector3Like` is a new data type representing as Vector 3 like object. -* `Phaser.Types.Math.Vector4Like` is a new data type representing as Vector 4 like object. -* `Transform.getLocalPoint` is a new method, available on all Game Objects, that takes an `x` / `y` pair and translates them into the local space of the Game Object, factoring in parent transforms and display origins. -* The `KeyboardPlugin` will now track the key code and timestamp of the previous key pressed and compare it to the current event. If they match, it will skip the event. On some systems, if you were to type quickly, you would sometimes get duplicate key events firing (the exact same event firing more than once). This is now prevented from happening. -* `Display.Color.GetColorFromValue` is a new function that will take a hex color value and return it as an integer, for use in WebGL. This is now used internally by the Tint component and other classes. -* `Utils.String.RemoveAt` is a new function that will remove a character from the given index in a string and return the new string. -* `Frame.setUVs` is a new method that allows you to directly set the canvas and UV data for a frame. Use this if you need to override the values set automatically during frame creation. -* `TweenManager.getTweensOf` has a new parameter `includePending`. If set, it will also check the pending tweens for the given targets and return those in the results as well. Fix #5260 (thanks @pcharest2000) -* `WebGLPipeline.hasBooted` is a new boolean property that tracks if the pipeline has been booted or not, which is now far more important in 3.5 than in previous versions. This is checked in the `WebGLRenderer.addPipeline` method, and if not set, the pipeline is booted. Fix #5251 #5255 (thanks @telinc1 @rexrainbow) -* The WebGL Renderer will now add the pipelines during the `boot` method, instead of `init`. -* You can now use `this.renderer` from within a Scene, as it's now a Scene-level property and part of the Injection Map. -* `Clock.addEvent` can now take an existing `TimerEvent` object, as well as a config object. If a `TimerEvent` is given it will be removed from the Clock, reset and then added. This allows you to pool TimerEvents rather than constantly create and delete them. Fix #4115 (thanks @jcyuan) -* `Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock. -* `Group.getMatching` is a new method that will return any members of the Group that match the given criteria, such as `getMatching('visible', true)` (thanks @atursams) -* `ArcadePhysics.disableUpdate` is a new method that will prevent the Arcade Physics World `update` method from being called when the Scene updates. By disabling it, you're free to call the update method yourself, passing in your own delta and time values. -* `ArcadePhysics.enableUpdate` is a new method that will make the Arcade Physics World update in time with the Scene update. This is the default, so only call this if you have specifically disabled it previously. -* `ArcadeWorldConfig.customUpdate` is a new boolean property you can set in the Arcade Physics config object, either in the Scene or in the Game Config. If `true` the World update will never be called, allowing you to call it yourself from your own component. Close #5190 (thanks @cfortuner) -* `Utils.Array.SortByDigits` is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits. -* `GroupCreateConfig`, which is used when calling `Group.createMultiple` or `Group.createFromConfig`, can now accept the following new properties: `setOrigin: { x, y, stepX, stepY }` which are applied to the items created by the Group. -* `Transform.copyPosition` is a new method that will copy the position from the given object to the Game Object (thanks @samme) -* The `Text.MeasureText` function, which is used to calculate the ascent and descent of Text Game Objects whenever the style, or font size, is changed, has been updated to use the new `actualBoundingBoxAscent` functions present in modern browsers. This allows for significantly faster ascent calculations than previously. Older browsers, such as IE, will still fall back (thanks @rexrainbow) - -### Input / Mouse Updates and API Changes - -* `ScaleManager.refresh` is now called when the `Game.READY` event fires. This fixes a bug where the Scale Manager would have the incorrect canvas bounds, because they were calculated before a previous canvas was removed from the DOM. Fix #4862 (thanks @dranitski) -* The Game Config property `inputMouseCapture` has been removed, as this is now split into 3 new config options: -* `inputMousePreventDefaultDown` is a new config option that allows you to control `preventDefault` calls specifically on mouse down events. Set it via `input.mouse.preventDefaultDown` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. -* `inputMousePreventDefaultUp` is a new config option that allows you to control `preventDefault` calls specifically on mouse up events. Set it via `input.mouse.preventDefaultUp` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. -* `inputMousePreventDefaultMove` is a new config option that allows you to control `preventDefault` calls specifically on mouse move events. Set it via `input.mouse.preventDefaultMove` in the Game Config. It defaults to `true`, the same as the previous `capture` property did. -* The `MouseManager.capture` property has been removed, as this is now split into 3 new config options (see below) -* `MouseManager.preventDefaultDown` is a new boolean property, set via the `inputMousePreventDefaultDown` config option that allows you to toggle capture of mouse down events at runtime. -* `MouseManager.preventDefaultUp` is a new boolean property, set via the `inputMousePreventDefaultUp` config option that allows you to toggle capture of mouse up events at runtime. -* `MouseManager.preventDefaultMove` is a new boolean property, set via the `inputMousePreventDefaultMove` config option that allows you to toggle capture of mouse move events at runtime. -* In the `MouseManager` the up, down and move events are no longer set as being passive if captured. Over, Out, Wheel and the Window level Down and Up events are always flagged as being passive. -* The `GamepadPlugin` will now call `refreshPads` as part of its start process. This allows you to use Gamepads across multiple Scenes, without having to wait for a connected event from each one of them. If you've already had a connected event in a previous Scene, you can now just read the pads directly via `this.input.gamepad.pad1` and similar. Fix #4890 (thanks @Sytten) -* Shutting down the Gamepad plugin (such as when sleeping a Scene) no longer calls `GamepadPlugin.disconnectAll`, but destroying it does. -* `Gamepad._created` is a new private internal property that keeps track of when the instance was created. This is compared to the navigator timestamp in the update loop to avoid event spamming. Fix #4890. - -### Updates and API Changes - -* Earcut, used for polygon triangulation, has been updated from 2.1.4 to 2.2.2. -* Earcut has now been exposed and is available via `Geom.Polygon.Earcut` and is fully documented. -* `Config.batchSize` has been increased from 2000 to 4096. -* Removed the Deferred Diffuse fragment and vertex shaders from the project, as they're not used. -* `StaticTilemapLayer.upload` will now set the vertex attributes and buffer the data, and handles internal checks more efficiently. -* `StaticTilemapLayer` now includes the `ModelViewProjection` mixin, so it doesn't need to modify the pipeline during rendering. -* `WebGLRenderer.textureFlush` is a new property that keeps track of the total texture flushes per frame. -* The `TextureTintStripPipeline` now extends `TextureTintPipeline` and just changes the topolgy, vastly reducing the filesize. -* `TransformMatrix.getXRound` is a new method that will return the X component, optionally passed via `Math.round`. -* `TransformMatrix.getYRound` is a new method that will return the Y component, optionally passed via `Math.round`. -* The `KeyboardPlugin` no longer emits `keydown_` events. These were replaced with `keydown-` events in v3.15. The previous event string was deprecated in v3.20. -* The `KeyboardPlugin` no longer emits `keyup_` events. These were replaced with `keyup-` events in v3.15. The previous event string was deprecated in v3.20. -* The `ScaleManager.updateBounds` method is now called every time the browser fires a 'resize' or 'orientationchange' event. This will update the offset of the canvas element Phaser is rendering to, which is responsible for keeping input positions correct. However, if you change the canvas position, or visibility, via any other method (i.e. via an Angular route) you should call the `updateBounds` method directly, yourself. -* The constant `Phaser.Renderer.WebGL.BYTE` value has been removed as it wasn't used internally. -* The constant `Phaser.Renderer.WebGL.SHORT` value has been removed as it wasn't used internally. -* The constant `Phaser.Renderer.WebGL.UNSIGNED_BYTE` value has been removed as it wasn't used internally. -* The constant `Phaser.Renderer.WebGL.UNSIGNED_SHORT` value has been removed as it wasn't used internally. -* The constant `Phaser.Renderer.WebGL.FLOAT` value has been removed as it wasn't used internally. -* `global.Phaser = Phaser` has been removed, as it's no longer required by the UMD loader, which should make importing in Angular 10 easier. Fix #5212 (thanks @blackyale) -* `Pointer.downTime` now stores the event timestamp of when the first button on the input device was pressed down, not just when button 1 was pressed down. -* `Pointer.upTime` now stores the event timestamp of when the final depressed button on the input device was released, not just when button 1 was released. -* The `Pointer.getDuration` method now uses the new Pointer `downTime` and `upTime` values, meaning it will accurately report the duration of when any button is being held down, not just the primary one. Fix #5112 (thanks @veleek) -* The `BaseShader` default vertex shader now includes the `outTexCoord` vec2 varying, mapped to be the same as that found in the pipeline shaders. Fix #5120 (@pavel-shirobok) -* When using the `GameObjectCreator` for `Containers` you can now specify the `children` property in the configuration object. -* `WebGLRenderer.finalType` is a new boolean property that signifies if the current Game Object being rendered is the final one in the list. -* The `WebGLRenderer.updateCanvasTexture` method will now set `gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL` to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064 #5155 (thanks @hugoruscitti @immangrove-supertree) -* `Textures.Parsers.JSONHash` will now perform a `hasOwnProperty` check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from `JSON.parse`. Fix #4768 (thanks @RollinSafary) -* The `Camera3D` Plugin has been rebuilt for Phaser 3.50 and the webpack config updated. This plugin is now considered deprecated and will not be updated beyond this release. -* `Tween.seek` will no longer issue a console warning for `'Tween.seek duration too long'`, it's now up to you to check on the performance of tween seeking. -* `WebGLRenderer.previousPipeline` is a new property that is set during a call to `clearPipeline` and used during calls to `rebindPipeline`, allowing the renderer to rebind any previous pipeline, not just the Multi Pipeline. -* The `WebGLRenderer.rebindPipeline` method has been changed slightly. Previously, you had to specify the `pipelineInstance`, but this is now optional. If you don't, it will use the new `previousPipeline` property instead. If not set, or none given, it will now return without throwing gl errors as well. -* If `inputWindowEvents` is set in the Game Config, then the `MouseManager` will now listen for the events on `window.top` instead of just `window`, which should help in situations where the pointer is released outside of an embedded iframe. Fix #4824 (thanks @rexrainbow) -* `Types.GameObjects.Text.GetTextSizeObject` is a new type def for the GetTextSize function results. -* The `Arcade.Body.resetFlags` method has a new optional boolean parameter `clear`. If set, it clears the `wasTouching` flags on the Body. This happens automatically when `Body.reset` is called. Previous to this, the flags were not reset until the next physics step (thanks @samme) -* `Utils.Array.StableSort` has been recoded. It's now based on Two-Screens stable sort 0.1.8 and has been updated to fit into Phaser better and no longer create any window bound objects. The `inplace` function has been removed, just call `StableSort(array)` directly now. All classes that used `StableSort.inplace` have been updated to call it directly. -* If a Scene is paused, or sent to sleep, it will automatically call `Keyboard.resetKeys`. This means that if you hold a key down, then sleep or pause a Scene, then release the key and resume or wake the Scene, it will no longer think it is still being held down (thanks @samme) -* `Actions.setOrigin` will now call `updateDisplayOrigin` on the items array, otherwise the effects can't be seen when rendering. -* You can now set the `ArcadeWorld.fixedStep` property via the `ArcadeWorldConfig` object (thanks @samme) -* `Utils.Array.NumerArray` can now accept the `start` and `end` parameters in reverse order, i.e. `10, 1` will generate a number array running from 10 to 1. Internally it has also been optimized to skip string based returns. -* `DataManager.Events.DESTROY` is a new event that the Data Manager will _listen_ for from its parent and then call its own `destroy` method when received. - -### Bug Fixes - -* `RenderTexture.resize` (which is called from `setSize`) wouldn't correctly set the `TextureSource.glTexture` property, leading to `bindTexture: attempt to use a deleted object` errors under WebGL. -* `RenderTexture.fill` would fail to fill the correct area under WebGL if the RenderTexture wasn't the same size as the Canvas. It now fills the given region properly. -* The `MatterAttractors` plugin, which enables attractors between bodies, has been fixed. The original plugin only worked if the body with the attractor was _first_ in the world bodies list. It can now attract any body, no matter where in the world list it is. Fix #5160 (thanks @strahius) -* The `KeyboardManager` and `KeyboardPlugin` were both still checking for the `InputManager.useQueue` property, which was removed several versions ago. -* In Arcade Physics, Dynamic bodies would no longer hit walls when riding on horizontally moving platforms. The horizontal (and vertical) friction is now re-applied correctly in these edge-cases. Fix #5210 (thanks @Dercetech @samme) -* Calling `Rectangle.setSize()` wouldn't change the underlying geometry of the Shape Game Object, causing any stroke to be incorrectly rendered after a size change. -* The `ProcessQueue` was emitting the wrong events internally. It now emits 'add' and 'remove' correctly (thanks @halilcakar) -* The `GridAlign` action didn't work if only the `height` parameter was set. Fix #5019 (thanks @halilcakar) -* The `Color.HSVToRGB` function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089 (thanks @DiamondeX) -* Previously, the `easeParams` array within a Tweens `props` object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292 (thanks @willblackmore) -* When using `Camera.setRenderToTexture` its `zoom` and `rotation` values would be applied twice. Fix #4221 #4924 #4713 (thanks @wayfu @DanMcgraw @pavel-shirobok) -* `GameObjects.Shape.Grid` would render a white fill even if you passed `undefined` as the fill color in the constructor. It now doesn't render cells if no fill color is given. -* The `onMouse` events in the Input Manager didn't reset the `activePointer` property to the mouse, meaning on dual-input systems such as Touch Screen devices, the active pointer would become locked to whichever input method was used first. Fix #4615 #5232 (thanks @mmolina01 @JstnPwll @Legomite) -* The Scale Managers `GetScreenOrientation` function will now check for `window.orientation` first, because iOS mobile browsers have an incomplete implementation of the Screen API, forcing us to use the window value as a priority. This means the Scale Manager will now emit `orientationchange` events correctly on iOS. Fix #4361 #4914 (thanks @pfdtravalmatic @jackfreak @cuihu) -* `Time.Clock.addEvent` can now take an instance of a `TimerEvent` as its parameter. Fix #5294 (thanks @samme @EmilSV) -* `GameConfig.audio` now defaults to an empty object, which simplifies access to the config in later checks (thanks @samme) - -### Namespace Updates - -* The `Phaser.Curves.MoveTo` function has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.DOM.GetInnerHeight` function has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.GameObjects.Bob` class has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.GameObjects.LightsManager` class has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.GameObjects.LightsPlugin` class has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.GameObjects.Particles.EmitterOp` class has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.GameObjects.GetTextSize` function has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.GameObjects.MeasureText` function has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.GameObjects.TextStyle` function has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Input.CreatePixelPerfectHandler` function has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Physics.Arcade.Components.OverlapCirc` function has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Physics.Arcade.Components.OverlapRect` function has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Physics.Arcade.Tilemap` namespace has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Physics.Matter.Components` namespace has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Physics.Matter.Events` namespace has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Physics.Matter.MatterGameObject` class has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Physics.Matter.PointerConstraint` class has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Scenes.GetPhysicsPlugins` function has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Scenes.GetScenePlugins` function has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Structs.Events` namespace has now been exposed on the Phaser namespace (thanks @samme) -* The `Phaser.Tilemaps.Parsers.Tiled` function has now been exposed on the Phaser namespace (thanks @samme) -* Every single `Tilemap.Component` function has now been made public. This means you can call the Component functions directly, should you need to, outside of the Tilemap system. - -### 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 @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards @rexrainbow @Riderrr @spwilson2 @EmilSV - - - - - - +The Change Log for Phaser v3.50.0 is so extensive and important, due to API changes, that we've split it into its own file. Please see `CHANGELOG-v3.50.md` for the full details. ## Version 3.24.1 - Rem - 14th July 2020 From d1f2c9239cd74b3f5906375f0cff68c8966e4f69 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:51:37 +0100 Subject: [PATCH 062/153] Resolution removal * The `BaseCamera.resolution` property has been removed. * The internal private `BaseCamera._cx`, `_cy`, `_cw` and `_ch` properties has been removed. * The `BaseCamera.preRender` method no longer receives or uses the `resolution` parameter. --- src/cameras/2d/BaseCamera.js | 116 +++++++---------------------------- 1 file changed, 22 insertions(+), 94 deletions(-) diff --git a/src/cameras/2d/BaseCamera.js b/src/cameras/2d/BaseCamera.js index 8115470aa..03daf3995 100644 --- a/src/cameras/2d/BaseCamera.js +++ b/src/cameras/2d/BaseCamera.js @@ -34,10 +34,10 @@ var Vector2 = require('../../math/Vector2'); * * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, * allowing you to filter Game Objects out on a per-Camera basis. - * + * * The Base Camera is extended by the Camera class, which adds in special effects including Fade, * Flash and Camera Shake, as well as the ability to follow Game Objects. - * + * * The Base Camera was introduced in Phaser 3.12. It was split off from the Camera class, to allow * you to isolate special effects as needed. Therefore the 'since' values for properties of this class relate * to when they were added to the Camera class. @@ -46,7 +46,7 @@ var Vector2 = require('../../math/Vector2'); * @memberof Phaser.Cameras.Scene2D * @constructor * @since 3.12.0 - * + * * @extends Phaser.Events.EventEmitter * @extends Phaser.GameObjects.Components.Alpha * @extends Phaser.GameObjects.Components.Visible @@ -133,19 +133,6 @@ var BaseCamera = new Class({ */ this.name = ''; - /** - * This property is un-used in v3.16. - * - * The resolution of the Game, used in most Camera calculations. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#resolution - * @type {number} - * @readonly - * @deprecated - * @since 3.12.0 - */ - this.resolution = 1; - /** * Should this camera round its pixel values to integers? * @@ -195,9 +182,9 @@ var BaseCamera = new Class({ /** * Is this Camera dirty? - * + * * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame. - * + * * This flag is cleared during the `postRenderCamera` method of the renderer. * * @name Phaser.Cameras.Scene2D.BaseCamera#dirty @@ -231,46 +218,6 @@ var BaseCamera = new Class({ */ this._y = y; - /** - * Internal Camera X value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cx - * @type {number} - * @private - * @since 3.12.0 - */ - this._cx = 0; - - /** - * Internal Camera Y value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cy - * @type {number} - * @private - * @since 3.12.0 - */ - this._cy = 0; - - /** - * Internal Camera Width value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cw - * @type {number} - * @private - * @since 3.12.0 - */ - this._cw = 0; - - /** - * Internal Camera Height value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_ch - * @type {number} - * @private - * @since 3.12.0 - */ - this._ch = 0; - /** * The width of the Camera viewport, in pixels. * @@ -513,7 +460,7 @@ var BaseCamera = new Class({ /** * The Camera that this Camera uses for translation during masking. - * + * * If the mask is fixed in position this will be a reference to * the CameraManager.default instance. Otherwise, it'll be a reference * to itself. @@ -847,18 +794,16 @@ var BaseCamera = new Class({ var s = Math.sin(this.rotation); var zoom = this.zoom; - var res = this.resolution; var scrollX = this.scrollX; var scrollY = this.scrollY; - // Works for zoom of 1 with any resolution, but resolution > 1 and zoom !== 1 breaks var sx = x + ((scrollX * c - scrollY * s) * zoom); var sy = y + ((scrollX * s + scrollY * c) * zoom); // Apply transform to point - output.x = (sx * ima + sy * imc) * res + ime; - output.y = (sx * imb + sy * imd) * res + imf; + output.x = (sx * ima + sy * imc) + ime; + output.y = (sx * imb + sy * imd) + imf; return output; }, @@ -910,10 +855,8 @@ var BaseCamera = new Class({ * @method Phaser.Cameras.Scene2D.BaseCamera#preRender * @protected * @since 3.0.0 - * - * @param {number} resolution - The game resolution, as set in the Scale Manager. */ - preRender: function (resolution) + preRender: function () { var width = this.width; var height = this.height; @@ -921,7 +864,7 @@ var BaseCamera = new Class({ var halfWidth = width * 0.5; var halfHeight = height * 0.5; - var zoom = this.zoom * resolution; + var zoom = this.zoom; var matrix = this.matrix; var originX = width * this.originX; @@ -1104,15 +1047,15 @@ var BaseCamera = new Class({ /** * Set the bounds of the Camera. The bounds are an axis-aligned rectangle. - * + * * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the * edges and into blank space. It does not limit the placement of Game Objects, or where * the Camera viewport can be positioned. - * + * * Temporarily disable the bounds by changing the boolean `Camera.useBounds`. - * + * * Clear the bounds entirely by calling `Camera.removeBounds`. - * + * * If you set bounds that are smaller than the viewport it will stop the Camera from being * able to scroll. The bounds can be positioned where-ever you wish. By default they are from * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of @@ -1156,9 +1099,9 @@ var BaseCamera = new Class({ /** * Returns a rectangle containing the bounds of the Camera. - * + * * If the Camera does not have any bounds the rectangle will be empty. - * + * * The rectangle is a copy of the bounds, so is safe to modify. * * @method Phaser.Cameras.Scene2D.BaseCamera#getBounds @@ -1245,7 +1188,7 @@ var BaseCamera = new Class({ /** * Should the Camera round pixel values to whole integers when rendering Game Objects? - * + * * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing. * * @method Phaser.Cameras.Scene2D.BaseCamera#setRoundPixels @@ -1264,8 +1207,6 @@ var BaseCamera = new Class({ /** * Sets the Scene the Camera is bound to. - * - * Also populates the `resolution` property and updates the internal size values. * * @method Phaser.Cameras.Scene2D.BaseCamera#setScene * @since 3.0.0 @@ -1289,15 +1230,6 @@ var BaseCamera = new Class({ this.scaleManager = sys.scale; this.cameraManager = sys.cameras; - var res = this.scaleManager.resolution; - - this.resolution = res; - - this._cx = this._x * res; - this._cy = this._y * res; - this._cw = this._width * res; - this._ch = this._height * res; - this.updateSystem(); return this; @@ -1419,14 +1351,14 @@ var BaseCamera = new Class({ * Sets the mask to be applied to this Camera during rendering. * * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. - * + * * Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. * * If a mask is already set on this Camera it will be immediately replaced. - * + * * Masks have no impact on physics or input detection. They are purely a rendering component * that allows you to limit what is visible during the render pass. - * + * * Note: You cannot mask a Camera that has `renderToTexture` set. * * @method Phaser.Cameras.Scene2D.BaseCamera#setMask @@ -1573,9 +1505,9 @@ var BaseCamera = new Class({ /** * Destroys this Camera instance and its internal properties and references. * Once destroyed you cannot use this Camera again, even if re-added to a Camera Manager. - * + * * This method is called automatically by `CameraManager.remove` if that methods `runDestroy` argument is `true`, which is the default. - * + * * Unless you have a specific reason otherwise, always use `CameraManager.remove` and allow it to handle the camera destruction, * rather than calling this method directly. * @@ -1626,7 +1558,6 @@ var BaseCamera = new Class({ set: function (value) { this._x = value; - this._cx = value * this.resolution; this.updateSystem(); } @@ -1651,7 +1582,6 @@ var BaseCamera = new Class({ set: function (value) { this._y = value; - this._cy = value * this.resolution; this.updateSystem(); } @@ -1677,7 +1607,6 @@ var BaseCamera = new Class({ set: function (value) { this._width = value; - this._cw = value * this.resolution; this.updateSystem(); } @@ -1703,7 +1632,6 @@ var BaseCamera = new Class({ set: function (value) { this._height = value; - this._ch = value * this.resolution; this.updateSystem(); } From 3579d39fa2d38ae1b39b725d474dc8a9660ef3a6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:51:59 +0100 Subject: [PATCH 063/153] The `Camera.preRender` method no longer receives or uses the `resolution` parameter. --- src/cameras/2d/Camera.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cameras/2d/Camera.js b/src/cameras/2d/Camera.js index 931f1e9ce..c017c9b28 100644 --- a/src/cameras/2d/Camera.js +++ b/src/cameras/2d/Camera.js @@ -748,10 +748,8 @@ var Camera = new Class({ * @method Phaser.Cameras.Scene2D.Camera#preRender * @protected * @since 3.0.0 - * - * @param {number} resolution - The game resolution, as set in the Scale Manager. */ - preRender: function (resolution) + preRender: function () { var width = this.width; var height = this.height; @@ -759,7 +757,7 @@ var Camera = new Class({ var halfWidth = width * 0.5; var halfHeight = height * 0.5; - var zoom = this.zoom * resolution; + var zoom = this.zoom; var matrix = this.matrix; var originX = width * this.originX; From f0f93cde7dabdb79858511ebb78ba0109baa47ae Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:52:40 +0100 Subject: [PATCH 064/153] The `CameraManager.onResize` method no longer receives or uses the `resolution` parameter. --- src/cameras/2d/CameraManager.js | 60 ++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/cameras/2d/CameraManager.js b/src/cameras/2d/CameraManager.js index c734f57f5..098251f12 100644 --- a/src/cameras/2d/CameraManager.js +++ b/src/cameras/2d/CameraManager.js @@ -15,13 +15,13 @@ var SceneEvents = require('../../scene/events'); /** * @classdesc * The Camera Manager is a plugin that belongs to a Scene and is responsible for managing all of the Scene Cameras. - * + * * By default you can access the Camera Manager from within a Scene using `this.cameras`, although this can be changed * in your game config. - * + * * Create new Cameras using the `add` method. Or extend the Camera class with your own addition code and then add * the new Camera in using the `addExisting` method. - * + * * Cameras provide a view into your game world, and can be positioned, rotated, zoomed and scrolled accordingly. * * A Camera consists of two elements: The viewport and the scroll values. @@ -36,7 +36,7 @@ var SceneEvents = require('../../scene/events'); * viewport, and changing the viewport has no impact on the scrolling. * * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, - * allowing you to filter Game Objects out on a per-Camera basis. The Camera Manager can manage up to 31 unique + * allowing you to filter Game Objects out on a per-Camera basis. The Camera Manager can manage up to 31 unique * 'Game Object ignore capable' Cameras. Any Cameras beyond 31 that you create will all be given a Camera ID of * zero, meaning that they cannot be used for Game Object exclusion. This means if you need your Camera to ignore * Game Objects, make sure it's one of the first 31 created. @@ -102,11 +102,11 @@ var CameraManager = new Class({ * A handy reference to the 'main' camera. By default this is the first Camera the * Camera Manager creates. You can also set it directly, or use the `makeMain` argument * in the `add` and `addExisting` methods. It allows you to access it from your game: - * + * * ```javascript * var cam = this.cameras.main; * ``` - * + * * Also see the properties `camera1`, `camera2` and so on. * * @name Phaser.Cameras.Scene2D.CameraManager#main @@ -192,7 +192,7 @@ var CameraManager = new Class({ // Make one this.add(); } - + this.main = this.cameras[0]; } @@ -204,19 +204,19 @@ var CameraManager = new Class({ /** * Adds a new Camera into the Camera Manager. The Camera Manager can support up to 31 different Cameras. - * + * * Each Camera has its own viewport, which controls the size of the Camera and its position within the canvas. - * + * * Use the `Camera.scrollX` and `Camera.scrollY` properties to change where the Camera is looking, or the * Camera methods such as `centerOn`. Cameras also have built in special effects, such as fade, flash, shake, * pan and zoom. - * + * * By default Cameras are transparent and will render anything that they can see based on their `scrollX` * and `scrollY` values. Game Objects can be set to be ignored by a Camera by using the `Camera.ignore` method. - * + * * The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change * it after creation if required. - * + * * See the Camera class documentation for more details. * * @method Phaser.Cameras.Scene2D.CameraManager#add @@ -260,15 +260,15 @@ var CameraManager = new Class({ /** * Adds an existing Camera into the Camera Manager. - * + * * The Camera should either be a `Phaser.Cameras.Scene2D.Camera` instance, or a class that extends from it. - * + * * The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change * it after addition if required. - * + * * The Camera will be assigned an ID, which is used for Game Object exclusion and then added to the * manager. As long as it doesn't already exist in the manager it will be added then returned. - * + * * If this method returns `null` then the Camera already exists in this Camera Manager. * * @method Phaser.Cameras.Scene2D.CameraManager#addExisting @@ -297,7 +297,7 @@ var CameraManager = new Class({ { this.main = camera; } - + return camera; } @@ -306,7 +306,7 @@ var CameraManager = new Class({ /** * Gets the next available Camera ID number. - * + * * The Camera Manager supports up to 31 unique cameras, after which the ID returned will always be zero. * You can create additional cameras beyond 31, but they cannot be used for Game Object exclusion. * @@ -354,12 +354,12 @@ var CameraManager = new Class({ /** * Gets the total number of Cameras in this Camera Manager. - * + * * If the optional `isVisible` argument is set it will only count Cameras that are currently visible. * * @method Phaser.Cameras.Scene2D.CameraManager#getTotal * @since 3.11.0 - * + * * @param {boolean} [isVisible=false] - Set the `true` to only include visible Cameras in the total. * * @return {integer} The total number of Cameras in this Camera Manager. @@ -387,7 +387,7 @@ var CameraManager = new Class({ /** * Populates this Camera Manager based on the given configuration object, or an array of config objects. - * + * * See the `Phaser.Types.Cameras.Scene2D.CameraConfig` documentation for details of the object structure. * * @method Phaser.Cameras.Scene2D.CameraManager#fromJSON @@ -456,7 +456,7 @@ var CameraManager = new Class({ /** * Gets a Camera based on its name. - * + * * Camera names are optional and don't have to be set, so this method is only of any use if you * have given your Cameras unique names. * @@ -484,7 +484,7 @@ var CameraManager = new Class({ /** * Returns an array of all cameras below the given Pointer. - * + * * The first camera in the array is the top-most camera in the camera list. * * @method Phaser.Cameras.Scene2D.CameraManager#getCamerasBelowPointer @@ -519,10 +519,10 @@ var CameraManager = new Class({ /** * Removes the given Camera, or an array of Cameras, from this Camera Manager. - * + * * If found in the Camera Manager it will be immediately removed from the local cameras array. * If also currently the 'main' camera, 'main' will be reset to be camera 0. - * + * * The removed Cameras are automatically destroyed if the `runDestroy` argument is `true`, which is the default. * If you wish to re-use the cameras then set this to `false`, but know that they will retain their references * and internal data until destroyed or re-added to a Camera Manager. @@ -532,7 +532,7 @@ var CameraManager = new Class({ * * @param {(Phaser.Cameras.Scene2D.Camera|Phaser.Cameras.Scene2D.Camera[])} camera - The Camera, or an array of Cameras, to be removed from this Camera Manager. * @param {boolean} [runDestroy=true] - Automatically call `Camera.destroy` on each Camera removed from this Camera Manager. - * + * * @return {integer} The total number of Cameras removed. */ remove: function (camera, runDestroy) @@ -574,7 +574,7 @@ var CameraManager = new Class({ /** * The internal render method. This is called automatically by the Scene and should not be invoked directly. - * + * * It will iterate through all local cameras and render them in turn, as long as they're visible and have * an alpha level > 0. * @@ -607,7 +607,7 @@ var CameraManager = new Class({ /** * Resets this Camera Manager. - * + * * This will iterate through all current Cameras, destroying them all, then it will reset the * cameras array, reset the ID counter and create 1 new single camera using the default values. * @@ -655,9 +655,9 @@ var CameraManager = new Class({ * @since 3.18.0 * * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions. - * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this. + * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions. The canvas width / height values match this. */ - onResize: function (gameSize, baseSize, displaySize, resolution, previousWidth, previousHeight) + onResize: function (gameSize, baseSize, displaySize, previousWidth, previousHeight) { for (var i = 0; i < this.cameras.length; i++) { From c46c3e4c82a4dc18e4a09389c5d28d44bed2c7eb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:53:23 +0100 Subject: [PATCH 065/153] The `Core.Config.resolution` property has been removed. --- src/core/Config.js | 6 ------ src/core/typedefs/GameConfig.js | 1 - src/core/typedefs/ScaleConfig.js | 1 - 3 files changed, 8 deletions(-) diff --git a/src/core/Config.js b/src/core/Config.js index f9dfc7608..e4f287529 100644 --- a/src/core/Config.js +++ b/src/core/Config.js @@ -61,11 +61,6 @@ var Config = new Class({ */ this.zoom = GetValue(config, 'zoom', 1); - /** - * @const {number} Phaser.Core.Config#resolution - The canvas device pixel resolution. Currently un-used. - */ - this.resolution = GetValue(config, 'resolution', 1); - /** * @const {?*} Phaser.Core.Config#parent - A parent DOM element into which the canvas created by the renderer will be injected. */ @@ -130,7 +125,6 @@ var Config = new Class({ this.width = GetValue(scaleConfig, 'width', this.width); this.height = GetValue(scaleConfig, 'height', this.height); this.zoom = GetValue(scaleConfig, 'zoom', this.zoom); - this.resolution = GetValue(scaleConfig, 'resolution', this.resolution); this.parent = GetValue(scaleConfig, 'parent', this.parent); this.scaleMode = GetValue(scaleConfig, 'mode', this.scaleMode); this.expandParent = GetValue(scaleConfig, 'expandParent', this.expandParent); diff --git a/src/core/typedefs/GameConfig.js b/src/core/typedefs/GameConfig.js index 76b96ab87..1104d1049 100644 --- a/src/core/typedefs/GameConfig.js +++ b/src/core/typedefs/GameConfig.js @@ -5,7 +5,6 @@ * @property {(integer|string)} [width=1024] - The width of the game, in game pixels. * @property {(integer|string)} [height=768] - The height of the game, in game pixels. * @property {number} [zoom=1] - Simple scale applied to the game canvas. 2 is double size, 0.5 is half size, etc. - * @property {number} [resolution=1] - The size of each game pixel, in canvas pixels. Values larger than 1 are "high" resolution. * @property {number} [type=CONST.AUTO] - Which renderer to use. Phaser.AUTO, Phaser.CANVAS, Phaser.HEADLESS, or Phaser.WEBGL. AUTO picks WEBGL if available, otherwise CANVAS. * @property {(HTMLElement|string)} [parent=undefined] - The DOM element that will contain the game canvas, or its `id`. If undefined, or if the named element doesn't exist, the game canvas is appended to the document body. If `null` no parent will be used and you are responsible for adding the canvas to the dom. * @property {HTMLCanvasElement} [canvas=null] - Provide your own Canvas element for Phaser to use instead of creating one. diff --git a/src/core/typedefs/ScaleConfig.js b/src/core/typedefs/ScaleConfig.js index de5c88d72..fb3282657 100644 --- a/src/core/typedefs/ScaleConfig.js +++ b/src/core/typedefs/ScaleConfig.js @@ -5,7 +5,6 @@ * @property {(integer|string)} [width=1024] - The base width of your game. Can be an integer or a string: '100%'. If a string it will only work if you have set a parent element that has a size. * @property {(integer|string)} [height=768] - The base height of your game. Can be an integer or a string: '100%'. If a string it will only work if you have set a parent element that has a size. * @property {(Phaser.Scale.ZoomType|integer)} [zoom=1] - The zoom value of the game canvas. - * @property {number} [resolution=1] - The rendering resolution of the canvas. This is reserved for future use and is currently ignored. * @property {?(HTMLElement|string)} [parent] - The DOM element that will contain the game canvas, or its `id`. If undefined, or if the named element doesn't exist, the game canvas is inserted directly into the document body. If `null` no parent will be used and you are responsible for adding the canvas to your environment. * @property {boolean} [expandParent=true] - Is the Scale Manager allowed to adjust the CSS height property of the parent and/or document body to be 100%? * @property {Phaser.Scale.ScaleModeType} [mode=Phaser.Scale.ScaleModes.NONE] - The scale mode. From 0acdf4373ffa32aa612db6d846708a4bc0f616f0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:53:36 +0100 Subject: [PATCH 066/153] Formatting update --- src/gameobjects/rendertexture/RenderTexture.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gameobjects/rendertexture/RenderTexture.js b/src/gameobjects/rendertexture/RenderTexture.js index e70b1408c..6ec7218ce 100644 --- a/src/gameobjects/rendertexture/RenderTexture.js +++ b/src/gameobjects/rendertexture/RenderTexture.js @@ -330,8 +330,10 @@ var RenderTexture = new Class({ * texture will not change. * * If Render Texture was not created from specific frame, the following will happen: + * * In WebGL it will destroy and then re-create the frame buffer being used by the Render Texture. * In Canvas it will resize the underlying canvas element. + * * Both approaches will erase everything currently drawn to the Render Texture. * * If the dimensions given are the same as those already being used, calling this method will do nothing. From d6f5aabb7e4e2e5f64ba10437927f2fc4e8cbd8d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:55:06 +0100 Subject: [PATCH 067/153] The `TextStyle.resolution` property is no longer read from the Game Config. You can still set it via the Text Style config to a value other than 1, but it will default to this now. --- src/gameobjects/text/static/Text.js | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/gameobjects/text/static/Text.js b/src/gameobjects/text/static/Text.js index 1df9bc385..fa46cd6dc 100644 --- a/src/gameobjects/text/static/Text.js +++ b/src/gameobjects/text/static/Text.js @@ -19,11 +19,11 @@ var TextStyle = require('../TextStyle'); /** * @classdesc * A Text Game Object. - * + * * Text objects work by creating their own internal hidden Canvas and then renders text to it using * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered * to your game during the render pass. - * + * * Because it uses the Canvas API you can take advantage of all the features this offers, such as * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts * loaded externally, such as Google or TypeKit Web fonts. @@ -46,7 +46,7 @@ var TextStyle = require('../TextStyle'); * * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts * across mobile browsers. - * + * * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of @@ -220,7 +220,7 @@ var Text = new Class({ * The line spacing value. * This value is added to the font height to calculate the overall line height. * Only has an effect if this Text object contains multiple lines of text. - * + * * If you update this property directly, instead of using the `setLineSpacing` method, then * be sure to call `updateText` after, or you won't see the change reflected in the Text object. * @@ -240,10 +240,10 @@ var Text = new Class({ */ this.dirty = false; - // If resolution wasn't set, then we get it from the game config + // If resolution wasn't set, force it to 1 if (this.style.resolution === 0) { - this.style.resolution = scene.sys.game.config.resolution; + this.style.resolution = 1; } /** @@ -680,10 +680,10 @@ var Text = new Class({ * ```javascript * Text.setFont('"Press Start 2P"'); * ``` - * + * * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all * quoted properly, too: - * + * * ```javascript * Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif'); * ``` @@ -951,9 +951,9 @@ var Text = new Class({ /** * Set the alignment of the text in this Text object. - * + * * The argument can be one of: `left`, `right`, `center` or `justify`. - * + * * Alignment only works if the Text object has more than one line of text. * * @method Phaser.GameObjects.Text#setAlign @@ -973,10 +973,10 @@ var Text = new Class({ * * By default it will be set to match the resolution set in the Game Config, * but you can override it via this method, or by specifying it in the Text style configuration object. - * + * * It allows for much clearer text on High DPI devices, at the cost of memory because it uses larger * internal Canvas textures for the Text. - * + * * Therefore, please use with caution, as the more high res Text you have, the more memory it uses. * * @method Phaser.GameObjects.Text#setResolution @@ -1233,9 +1233,9 @@ var Text = new Class({ var spaceSize = context.measureText(' ').width; var trimmedLine = lines[i].trim(); var array = trimmedLine.split(' '); - + extraSpace += (lines[i].length - trimmedLine.length) * spaceSize; - + var extraSpaceCharacters = Math.floor(extraSpace / spaceSize); var idx = 0; @@ -1245,7 +1245,7 @@ var Text = new Class({ idx = (idx + 1) % (array.length - 1 || 1); --extraSpaceCharacters; } - + lines[i] = array.join(' '); } } From f2fca49b3f025adc341c408892e6317deedafa95 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:55:26 +0100 Subject: [PATCH 068/153] Remove Camera resolution use --- src/input/InputManager.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/input/InputManager.js b/src/input/InputManager.js index 4aead9563..0ae87ab3b 100644 --- a/src/input/InputManager.js +++ b/src/input/InputManager.js @@ -885,12 +885,6 @@ var InputManager = new Class({ var x = pointer.x; var y = pointer.y; - if (camera.resolution !== 1) - { - x += camera._x; - y += camera._y; - } - // Stores the world point inside of tempPoint camera.getWorldPoint(x, y, tempPoint); From b63cc75154459e30005db10743110b1338369038 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:55:38 +0100 Subject: [PATCH 069/153] Remove Camera.resolution use --- src/input/Pointer.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/input/Pointer.js b/src/input/Pointer.js index 401873f6c..f237aba55 100644 --- a/src/input/Pointer.js +++ b/src/input/Pointer.js @@ -508,17 +508,8 @@ var Pointer = new Class({ */ updateWorldPoint: function (camera) { - var x = this.x; - var y = this.y; - - if (camera.resolution !== 1) - { - x += camera._x; - y += camera._y; - } - // Stores the world point inside of tempPoint - var temp = camera.getWorldPoint(x, y); + var temp = camera.getWorldPoint(this.x, this.y); this.worldX = temp.x; this.worldY = temp.y; From 37a9261ac4a7d0e18936be5313a9e0d2af58c060 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:56:11 +0100 Subject: [PATCH 070/153] The `CanvasRenderer` no longer reads or uses the Game Config resolution property. --- src/renderer/canvas/CanvasRenderer.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/renderer/canvas/CanvasRenderer.js b/src/renderer/canvas/CanvasRenderer.js index d1678ddce..8663f69c1 100644 --- a/src/renderer/canvas/CanvasRenderer.js +++ b/src/renderer/canvas/CanvasRenderer.js @@ -86,7 +86,6 @@ var CanvasRenderer = new Class({ this.config = { clearBeforeRender: game.config.clearBeforeRender, backgroundColor: game.config.backgroundColor, - resolution: game.config.resolution, antialias: game.config.antialias, roundPixels: game.config.roundPixels }; @@ -229,8 +228,6 @@ var CanvasRenderer = new Class({ * * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions. * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this. - * @param {Phaser.Structs.Size} displaySize - The display Size object. The size of the canvas style width / height attributes. - * @param {number} [resolution] - The Scale Manager resolution setting. */ onResize: function (gameSize, baseSize) { From 67e49b515cdea8f57c0562985aa760266345a1ff Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:57:16 +0100 Subject: [PATCH 071/153] The `PipelineManager.resize` method along with `WebGLPipeline.resize` and anything else that extends them no longer receives or uses the `resolution` parameter. --- src/renderer/webgl/PipelineManager.js | 7 +++---- src/renderer/webgl/WebGLPipeline.js | 18 +++--------------- src/renderer/webgl/pipelines/MultiPipeline.js | 5 ++--- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/renderer/webgl/PipelineManager.js b/src/renderer/webgl/PipelineManager.js index 31e6d14d1..5a9bf71ec 100644 --- a/src/renderer/webgl/PipelineManager.js +++ b/src/renderer/webgl/PipelineManager.js @@ -175,7 +175,7 @@ var PipelineManager = new Class({ pipeline.boot(); } - pipeline.resize(renderer.width, renderer.height, renderer.config.resolution); + pipeline.resize(renderer.width, renderer.height); return pipeline; }, @@ -190,15 +190,14 @@ var PipelineManager = new Class({ * * @param {number} [width] - The new width of the renderer. * @param {number} [height] - The new height of the renderer. - * @param {number} [resolution] - The new resolution of the renderer. */ - resize: function (width, height, resolution) + resize: function (width, height) { var pipelines = this.pipelines; pipelines.each(function (pipelineName, pipelineInstance) { - pipelineInstance.resize(width, height, resolution); + pipelineInstance.resize(width, height); }); }, diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index 3ab5b101d..fa0f21ce4 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -87,16 +87,6 @@ var WebGLPipeline = new Class({ */ this.view = game.canvas; - /** - * The current game resolution. - * This is hard-coded to 1. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution - * @type {number} - * @since 3.0.0 - */ - this.resolution = 1; - /** * Width of the current viewport. * @@ -371,15 +361,13 @@ var WebGLPipeline = new Class({ * * @param {number} width - The new width of this WebGL Pipeline. * @param {number} height - The new height of this WebGL Pipeline. - * @param {number} resolution - The resolution this WebGL Pipeline should be resized to. * * @return {this} This WebGLPipeline instance. */ - resize: function (width, height, resolution) + resize: function (width, height) { - this.width = width * resolution; - this.height = height * resolution; - this.resolution = resolution; + this.width = width; + this.height = height; return this; }, diff --git a/src/renderer/webgl/pipelines/MultiPipeline.js b/src/renderer/webgl/pipelines/MultiPipeline.js index 048b09b57..4bee9ba6b 100644 --- a/src/renderer/webgl/pipelines/MultiPipeline.js +++ b/src/renderer/webgl/pipelines/MultiPipeline.js @@ -338,13 +338,12 @@ var MultiPipeline = new Class({ * * @param {number} width - The new width. * @param {number} height - The new height. - * @param {number} resolution - The resolution. * * @return {this} This WebGLPipeline instance. */ - resize: function (width, height, resolution) + resize: function (width, height) { - WebGLPipeline.prototype.resize.call(this, width, height, resolution); + WebGLPipeline.prototype.resize.call(this, width, height); ProjectOrtho(this, 0, this.width, this.height, 0, -1000, 1000); From e4b1093e72350e9e2b354594547cd10a852b0ce1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:58:08 +0100 Subject: [PATCH 072/153] The `WebGLRenderer.resize` and `onResize` methods no longer receives or uses the `resolution` parameter. --- src/renderer/webgl/WebGLRenderer.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index b19e09719..34f751a43 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -76,7 +76,6 @@ var WebGLRenderer = new Class({ antialias: gameConfig.antialias, backgroundColor: gameConfig.backgroundColor, contextCreation: contextCreationConfig, - resolution: gameConfig.resolution, roundPixels: gameConfig.roundPixels, maxTextures: gameConfig.maxTextures, maxTextureSize: gameConfig.maxTextureSize, @@ -843,7 +842,7 @@ var WebGLRenderer = new Class({ var baseSize = game.scale.baseSize; - this.resize(baseSize.width, baseSize.height, game.scale.resolution); + this.resize(baseSize.width, baseSize.height); }, /** @@ -853,16 +852,14 @@ var WebGLRenderer = new Class({ * @since 3.16.0 * * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions. - * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this. - * @param {Phaser.Structs.Size} displaySize - The display Size object. The size of the canvas style width / height attributes. - * @param {number} [resolution] - The Scale Manager resolution setting. + * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions. The canvas width / height values match this. */ - onResize: function (gameSize, baseSize, displaySize, resolution) + onResize: function (gameSize, baseSize) { // Has the underlying canvas size changed? - if (baseSize.width !== this.width || baseSize.height !== this.height || resolution !== this.resolution) + if (baseSize.width !== this.width || baseSize.height !== this.height) { - this.resize(baseSize.width, baseSize.height, resolution); + this.resize(baseSize.width, baseSize.height); } }, @@ -874,21 +871,19 @@ var WebGLRenderer = new Class({ * * @param {number} [width] - The new width of the renderer. * @param {number} [height] - The new height of the renderer. - * @param {number} [resolution] - The new resolution of the renderer. * * @return {this} This WebGLRenderer instance. */ - resize: function (width, height, resolution) + resize: function (width, height) { var gl = this.gl; this.width = width; this.height = height; - this.resolution = resolution; gl.viewport(0, 0, width, height); - this.pipelines.resize(width, height, resolution); + this.pipelines.resize(width, height); this.drawingBufferHeight = gl.drawingBufferHeight; From 68946f3894575d2ab750026c71ec95d2c988f9d2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:58:50 +0100 Subject: [PATCH 073/153] The `Phaser.Scale.Events#RESIZE` event no longer sends the `resolution` as a parameter. --- src/scale/events/RESIZE_EVENT.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/scale/events/RESIZE_EVENT.js b/src/scale/events/RESIZE_EVENT.js index cbee53336..c9f8818dc 100644 --- a/src/scale/events/RESIZE_EVENT.js +++ b/src/scale/events/RESIZE_EVENT.js @@ -6,7 +6,7 @@ /** * The Scale Manager Resize Event. - * + * * This event is dispatched whenever the Scale Manager detects a resize event from the browser. * It sends three parameters to the callback, each of them being Size components. You can read * the `width`, `height`, `aspectRatio` and other properties of these components to help with @@ -14,11 +14,10 @@ * * @event Phaser.Scale.Events#RESIZE * @since 3.16.1 - * + * * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas. - * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution. + * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size. * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode. - * @param {number} resolution - The current resolution. Defaults to 1 at the moment. * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width. * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height. */ From b733dbcbe1ac673e66301c6c34a6c02ace2dda06 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 11:59:30 +0100 Subject: [PATCH 074/153] The `ScaleManager.resolution` property has been removed and all internal use of it. --- src/scale/ScaleManager.js | 59 +++++++++++++-------------------------- 1 file changed, 19 insertions(+), 40 deletions(-) diff --git a/src/scale/ScaleManager.js b/src/scale/ScaleManager.js index 61357201a..ca619b141 100644 --- a/src/scale/ScaleManager.js +++ b/src/scale/ScaleManager.js @@ -204,7 +204,7 @@ var ScaleManager = new Class({ /** * The Base Size component. * - * The modified game size, which is the gameSize * resolution, used to set the canvas width and height + * The modified game size, which is the auto-rounded gameSize, used to set the canvas width and height * (but not the CSS style) * * @name Phaser.Scale.ScaleManager#baseSize @@ -233,17 +233,6 @@ var ScaleManager = new Class({ */ this.scaleMode = CONST.SCALE_MODE.NONE; - /** - * The canvas resolution. - * - * This is hard-coded to a value of 1 in the 3.16 release of Phaser and will be enabled at a later date. - * - * @name Phaser.Scale.ScaleManager#resolution - * @type {number} - * @since 3.16.0 - */ - this.resolution = 1; - /** * The game zoom factor. * @@ -491,7 +480,6 @@ var ScaleManager = new Class({ var width = config.width; var height = config.height; var scaleMode = config.scaleMode; - var resolution = config.resolution; var zoom = config.zoom; var autoRound = config.autoRound; @@ -527,11 +515,6 @@ var ScaleManager = new Class({ height = Math.floor(parentHeight * parentScaleY); } - // This is fixed at 1 on purpose. - // Changing it will break all user input. - // Wait for another release to solve this issue. - this.resolution = 1; - this.scaleMode = scaleMode; this.autoRound = autoRound; @@ -561,8 +544,8 @@ var ScaleManager = new Class({ this._resetZoom = true; } - // The modified game size, which is the w/h * resolution - this.baseSize.setSize(width * resolution, height * resolution); + // The modified game size + this.baseSize.setSize(width, height); if (autoRound) { @@ -663,9 +646,8 @@ var ScaleManager = new Class({ DOMRect.height = GetInnerHeight(true); } - var resolution = this.resolution; - var newWidth = DOMRect.width * resolution; - var newHeight = DOMRect.height * resolution; + var newWidth = DOMRect.width; + var newHeight = DOMRect.height; if (parentSize.width !== newWidth || parentSize.height !== newHeight) { @@ -745,7 +727,6 @@ var ScaleManager = new Class({ setGameSize: function (width, height) { var autoRound = this.autoRound; - var resolution = this.resolution; if (autoRound) { @@ -759,8 +740,8 @@ var ScaleManager = new Class({ // The un-modified game size, as requested in the game config (the raw width / height) as used for world bounds, etc this.gameSize.resize(width, height); - // The modified game size, which is the w/h * resolution - this.baseSize.resize(width * resolution, height * resolution); + // The modified game size + this.baseSize.resize(width, height); if (autoRound) { @@ -810,7 +791,6 @@ var ScaleManager = new Class({ resize: function (width, height) { var zoom = this.zoom; - var resolution = this.resolution; var autoRound = this.autoRound; if (autoRound) @@ -825,8 +805,8 @@ var ScaleManager = new Class({ // The un-modified game size, as requested in the game config (the raw width / height) as used for world bounds, etc this.gameSize.resize(width, height); - // The modified game size, which is the w/h * resolution - this.baseSize.resize(width * resolution, height * resolution); + // The modified game size + this.baseSize.resize(width, height); if (autoRound) { @@ -836,7 +816,7 @@ var ScaleManager = new Class({ // The size used for the canvas style, factoring in the scale mode and parent and zoom value // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change) - this.displaySize.setSize((width * zoom) * resolution, (height * zoom) * resolution); + this.displaySize.setSize((width * zoom), (height * zoom)); this.canvas.width = this.baseSize.width; this.canvas.height = this.baseSize.height; @@ -940,7 +920,7 @@ var ScaleManager = new Class({ domStyle.marginTop = canvasStyle.marginTop; } - this.emit(Events.RESIZE, this.gameSize, this.baseSize, this.displaySize, this.resolution, previousWidth, previousHeight); + this.emit(Events.RESIZE, this.gameSize, this.baseSize, this.displaySize, previousWidth, previousHeight); return this; }, @@ -989,15 +969,14 @@ var ScaleManager = new Class({ var zoom = this.zoom; var autoRound = this.autoRound; - var resolution = 1; if (this.scaleMode === CONST.SCALE_MODE.NONE) { // No scale - this.displaySize.setSize((width * zoom) * resolution, (height * zoom) * resolution); + this.displaySize.setSize((width * zoom), (height * zoom)); - styleWidth = this.displaySize.width / resolution; - styleHeight = this.displaySize.height / resolution; + styleWidth = this.displaySize.width; + styleHeight = this.displaySize.height; if (autoRound) { @@ -1022,10 +1001,10 @@ var ScaleManager = new Class({ this.gameSize.setSize(this.displaySize.width, this.displaySize.height); - this.baseSize.setSize(this.displaySize.width * resolution, this.displaySize.height * resolution); + this.baseSize.setSize(this.displaySize.width, this.displaySize.height); - styleWidth = this.displaySize.width / resolution; - styleHeight = this.displaySize.height / resolution; + styleWidth = this.displaySize.width; + styleHeight = this.displaySize.height; if (autoRound) { @@ -1041,8 +1020,8 @@ var ScaleManager = new Class({ // All other scale modes this.displaySize.setSize(this.parentSize.width, this.parentSize.height); - styleWidth = this.displaySize.width / resolution; - styleHeight = this.displaySize.height / resolution; + styleWidth = this.displaySize.width; + styleHeight = this.displaySize.height; if (autoRound) { From 00421243e2fb46976fb4fa667f640dd299292d69 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 12 Sep 2020 12:00:18 +0100 Subject: [PATCH 075/153] Lots of resolution removal changes. Fix #4417 --- CHANGELOG-v3.50.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index 4dd04bf78..684cbb249 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -482,6 +482,28 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `Phaser.Tilemaps.Parsers.Tiled` function has now been exposed on the Phaser namespace (thanks @samme) * Every single `Tilemap.Component` function has now been made public. This means you can call the Component functions directly, should you need to, outside of the Tilemap system. +### Removal of 'Resolution' property from across the API + +For legacy reasons, Phaser 3 has never properly supported HighDPI devices. It will render happily to them of course, but wouldn't let you set a 'resolution' for the Canvas beyond 1. Earlier versions of 3.x had a resolution property in the Game Config, but it was never fully implemented (for example, it would break zooming cameras). When the Scale Manager was introduced in v3.16 we forced the resolution to be 1 to avoid it breaking anything else internally. + +For a long time, the 'resolution' property has been present - taunting developers and confusing new comers. In this release we have finally gone through and removed all references to it. The Game Config option is now gone, it's removed from the Scale Manager, Base Camera and everywhere else where it matters. As much as we would have liked to implement the feature, we've spent too long without and things have been built around the assumption it isn't present that just wouldn't cope with having it shoe-horned in at this stage. As frustrating as this is, it's even more annoying to just leave the property there confusing people and wasting CPU cycles. Phaser 4 has been built with HighDPI screens in mind from the very start, but it's just too late for v3. The following changes are a result of this removal: + +* The `Phaser.Scale.Events#RESIZE` event no longer sends the `resolution` as a parameter. +* The `BaseCamera.resolution` property has been removed. +* The internal private `BaseCamera._cx`, `_cy`, `_cw` and `_ch` properties has been removed. +* The `BaseCamera.preRender` method no longer receives or uses the `resolution` parameter. +* The `Camera.preRender` method no longer receives or uses the `resolution` parameter. +* The `CameraManager.onResize` method no longer receives or uses the `resolution` parameter. +* The `Core.Config.resolution` property has been removed. +* The `TextStyle.resolution` property is no longer read from the Game Config. You can still set it via the Text Style config to a value other than 1, but it will default to this now. +* The `CanvasRenderer` no longer reads or uses the Game Config resolution property. +* The `PipelineManager.resize` method along with `WebGLPipeline.resize` and anything else that extends them no longer receives or uses the `resolution` parameter. +* The `WebGLRenderer.resize` and `onResize` methods no longer receives or uses the `resolution` parameter. +* The `ScaleManager.resolution` property has been removed and all internal use of it. + + + + ### 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: From 0cb806c11e0fa9f50d94be4ef1fde2f559dd9943 Mon Sep 17 00:00:00 2001 From: Rex Date: Sun, 13 Sep 2020 17:05:55 +0800 Subject: [PATCH 076/153] Fix add.existing bug Add game object to updateList if it dose not add to displayList. ( Group game object dose not have `renderCanvas` or `renderWebGL` method) --- src/gameobjects/GameObjectFactory.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index bae9b2fde..a42c20608 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -134,6 +134,10 @@ var GameObjectFactory = new Class({ { this.displayList.add(child); } + else if (child.preUpdate) + { + this.updateList.add(child); + } return child; }, From cd0a27acfaf7486a1ac816052f49d7ad9d9beb94 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sun, 13 Sep 2020 15:17:07 +0100 Subject: [PATCH 077/153] Fix #5308 --- src/gameobjects/GameObject.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gameobjects/GameObject.js b/src/gameobjects/GameObject.js index 0bcf1d9a0..f8eaa0dba 100644 --- a/src/gameobjects/GameObject.js +++ b/src/gameobjects/GameObject.js @@ -36,12 +36,15 @@ var GameObject = new Class({ EventEmitter.call(this); /** - * The Scene to which this Game Object belongs. + * A reference to the Scene to which this Game Object belongs. + * * Game Objects can only belong to one Scene. * + * You should consider this property as being read-only. You cannot move a + * Game Object to another Scene by simply changing it. + * * @name Phaser.GameObjects.GameObject#scene * @type {Phaser.Scene} - * @protected * @since 3.0.0 */ this.scene = scene; From 1ba5be547624cd385069e64eeef548a607f16090 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sun, 13 Sep 2020 15:17:09 +0100 Subject: [PATCH 078/153] Update CHANGELOG-v3.50.md --- CHANGELOG-v3.50.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index 684cbb249..11f10e7e5 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -508,4 +508,4 @@ For a long time, the 'resolution' property has been present - taunting developer 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 @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards @rexrainbow @Riderrr @spwilson2 @EmilSV +@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards @rexrainbow @Riderrr @spwilson2 @EmilSV @PhaserEditor2D From 3fd52ecdd3b27539e4b2994a7d5c4c9e5e55c1bf Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sun, 13 Sep 2020 17:16:17 +0100 Subject: [PATCH 079/153] Added debug draw --- src/gameobjects/mesh/MeshWebGLRenderer.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/gameobjects/mesh/MeshWebGLRenderer.js b/src/gameobjects/mesh/MeshWebGLRenderer.js index 294860c05..35a61f0ad 100644 --- a/src/gameobjects/mesh/MeshWebGLRenderer.js +++ b/src/gameobjects/mesh/MeshWebGLRenderer.js @@ -103,6 +103,28 @@ var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera } pipeline.vertexCount += vertexCount; + + /* + pipeline.flush(); + + for (var i = 0; i < meshVerticesLength; i += 2) + { + var x = vertices[i + 0]; + var y = vertices[i + 1]; + + var tx = x * calcMatrix.a + y * calcMatrix.c + calcMatrix.e; + var ty = x * calcMatrix.b + y * calcMatrix.d + calcMatrix.f; + + if (camera.roundPixels) + { + tx = Math.round(tx); + ty = Math.round(ty); + } + + pipeline.drawFillRect(tx, ty, 2, 2, 0x00ff00, 1); + } + */ + }; module.exports = MeshWebGLRenderer; From 25b5c2d1d116e4ce6572611e7583294ecce79743 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sun, 13 Sep 2020 23:11:04 +0100 Subject: [PATCH 080/153] Loads of new Mesh updates * `Mesh.setVertices` is a new method that allows you to set the verts of a Mesh Game Object from the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage. * The Mesh constructor signature has changed to `scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame`, where `indicies` is the new parameter added to the list. It allows you to provide indexed vertex data to create the Mesh from, where the `indicies` array holds the vertex index information. The final list of vertices is built from this index along with the provided vertices and uvs arrays. * You can now supply just a single numerical value as the `color` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the color for all vertices created. * You can now supply just a single numerical value as the `alpha` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created. * The `Mesh` Game Object now extends the `SingleAlpha` component and the alpha value is factored into the final alpha value per vertex during rendering. This means you can now set the whole alpha across the Mesh using the standard `setAlpha` methods. But, if you wish to, you can still control the alpha on a per-vertex basis as well. * The `Mesh` Game Object now has the Animation State Component. This allows you to create and play animations across the texture of a Mesh, something that previously wasn't possible. As a result, the Mesh now adds itself to the Update List when added to a Scene. * `Mesh.setDebug` is a new method that allows you to render a debug visualisation of the Mesh vertices to a Graphics Game Object. You can provide your own Graphics instance and optionally callback that is invoked during rendering. This allows you to easily visualise the vertices of your Mesh to help debug UV mapping. * `Mesh.debugGraphic` is a new property that holds the debug Graphics instance reference. * `Mesh.debugCallback` is a new property that holds the debug render callback. * `Mesh.renderDebugVerts` is a new method that acts as the default render callback for `setDebug` if none is provided. * `Mesh.preDestroy` is a new method that will clean-up the Mesh arrays and debug references on destruction. --- src/gameobjects/mesh/Mesh.js | 312 ++++++++++++++++++---- src/gameobjects/mesh/MeshWebGLRenderer.js | 32 +-- 2 files changed, 270 insertions(+), 74 deletions(-) diff --git a/src/gameobjects/mesh/Mesh.js b/src/gameobjects/mesh/Mesh.js index 6f4ecb573..62add6a53 100644 --- a/src/gameobjects/mesh/Mesh.js +++ b/src/gameobjects/mesh/Mesh.js @@ -4,16 +4,21 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var AnimationState = require('../../animations/AnimationState'); var Class = require('../../utils/Class'); var Components = require('../components'); var GameObject = require('../GameObject'); +var GameObjectEvents = require('../events'); var MeshRender = require('./MeshRender'); -var NOOP = require('../../utils/NOOP'); /** * @classdesc * A Mesh Game Object. * + * The Mesh object is WebGL only and does not have a Canvas counterpart. + * + * The Mesh origin is always 0.5 x 0.5 and cannot be changed. + * * @class Mesh * @extends Phaser.GameObjects.GameObject * @memberof Phaser.GameObjects @@ -21,6 +26,7 @@ var NOOP = require('../../utils/NOOP'); * @webglOnly * @since 3.0.0 * + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Mask @@ -35,17 +41,19 @@ var NOOP = require('../../utils/NOOP'); * @param {number} x - The horizontal position of this Game Object in the world. * @param {number} y - The vertical position of this Game Object in the world. * @param {number[]} vertices - An array containing the vertices data for this Mesh. - * @param {number[]} uv - An array containing the uv data for this Mesh. - * @param {number[]} colors - An array containing the color data for this Mesh. - * @param {number[]} alphas - An array containing the alpha data for this Mesh. - * @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. + * @param {number[]} uvs - An array containing the uv data for this Mesh. + * @param {number[]} [indicies] - An array containing the vertex indicies for this Mesh. + * @param {number|number[]} [colors] - An array containing the color data for this Mesh. + * @param {number|number[]} [alphas] - An array containing the alpha data for this Mesh. + * @param {string|Phaser.Textures.Texture} [texture] - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with. */ var Mesh = new Class({ Extends: GameObject, Mixins: [ + Components.AlphaSingle, Components.BlendMode, Components.Depth, Components.Mask, @@ -60,44 +68,18 @@ var Mesh = new Class({ initialize: - function Mesh (scene, x, y, vertices, uv, colors, alphas, texture, frame) + function Mesh (scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame) { GameObject.call(this, scene, 'Mesh'); - if (vertices.length !== uv.length) - { - throw new Error('Mesh Vertex count must match UV count'); - } - - var verticesUB = (vertices.length / 2) | 0; - - if (colors.length > 0 && colors.length < verticesUB) - { - throw new Error('Mesh Color count must match Vertex count'); - } - - if (alphas.length > 0 && alphas.length < verticesUB) - { - throw new Error('Mesh Alpha count must match Vertex count'); - } - - var i; - - if (colors.length === 0) - { - for (i = 0; i < verticesUB; ++i) - { - colors[i] = 0xFFFFFF; - } - } - - if (alphas.length === 0) - { - for (i = 0; i < verticesUB; ++i) - { - alphas[i] = 1.0; - } - } + /** + * The Animation State of this Mesh. + * + * @name Phaser.GameObjects.Mesh#anims + * @type {Phaser.Animation.AnimationState} + * @since 3.50.0 + */ + this.anims = new AnimationState(this); /** * An array containing the vertices data for this Mesh. @@ -106,7 +88,7 @@ var Mesh = new Class({ * @type {Float32Array} * @since 3.0.0 */ - this.vertices = new Float32Array(vertices); + this.vertices; /** * An array containing the uv data for this Mesh. @@ -115,7 +97,7 @@ var Mesh = new Class({ * @type {Float32Array} * @since 3.0.0 */ - this.uv = new Float32Array(uv); + this.uv; /** * An array containing the color data for this Mesh. @@ -124,7 +106,7 @@ var Mesh = new Class({ * @type {Uint32Array} * @since 3.0.0 */ - this.colors = new Uint32Array(colors); + this.colors; /** * An array containing the alpha data for this Mesh. @@ -133,32 +115,254 @@ var Mesh = new Class({ * @type {Float32Array} * @since 3.0.0 */ - this.alphas = new Float32Array(alphas); + this.alphas; /** - * Fill or additive mode used when blending the color values? + * The tint fill mode. + * + * 0 = An additive tint (the default), where vertices colors are blended with the texture. + * 1 = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * 2 = A complete tint, where the vertices colors replace the texture, including alpha, entirely. * * @name Phaser.GameObjects.Mesh#tintFill - * @type {boolean} - * @default false + * @type {integer} * @since 3.11.0 */ - this.tintFill = false; + this.tintFill = 0; + + /** + * You can optionally choose to render the vertices of this Mesh to a Graphics instance. + * + * Achieve this by setting the `debugCallback` and the `debugGraphic` properties. + * + * You can do this in a single call via the `Mesh.setDebug` method, which will use the + * built-in debug function. You can also set it to your own callback. The callback + * will be invoked _once per render_ and sent the following parameters: + * + * `debugCallback(src, meshLength, verts)` + * + * `src` is the Mesh instance being debugged. + * `meshLength` is the number of mesh vertices in total. + * `verts` is an array of the translated vertex coordinates. + * + * To disable rendering, set this property back to `null`. + * + * @name Phaser.GameObjects.Mesh#debugCallback + * @type {function} + * @since 3.50.0 + */ + this.debugCallback = null; + + /** + * The Graphics instance that the debug vertices will be drawn to, if `setDebug` has + * been called. + * + * @name Phaser.GameObjects.Mesh#debugGraphic + * @type {Phaser.GameObjects.Graphics} + * @since 3.50.0 + */ + this.debugGraphic = null; this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); + this.setVertices(vertices, uvs, indicies, colors, alphas); this.initPipeline(); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); + }, + + setVertices: function (vertices, uvs, indicies, colors, alphas) + { + if (colors === undefined) { colors = 0xffffff; } + if (alphas === undefined) { alphas = 1; } + + if (vertices.length !== uvs.length) + { + throw new Error('Mesh - vertices and uv count not equal'); + } + + if (Array.isArray(indicies)) + { + var verticesFull = []; + var uvsFull = []; + + for (var i = 0; i < indicies.length; i++) + { + var index = indicies[i] * 2; + + verticesFull.push(vertices[index], vertices[index + 1]); + uvsFull.push(uvs[index], uvs[index + 1]); + } + + vertices = verticesFull; + uvs = uvsFull; + } + + var halfVerts = Math.floor(vertices.length / 2); + + if (!Array.isArray(colors)) + { + var tempColor = colors; + + colors = []; + + for (var c = 0; c < halfVerts; c++) + { + colors.push(tempColor); + } + } + + if (!Array.isArray(alphas)) + { + var tempAlpha = alphas; + + alphas = []; + + for (var a = 0; a < halfVerts; a++) + { + alphas.push(tempAlpha); + } + } + + this.vertices = new Float32Array(vertices); + this.uv = new Float32Array(uvs); + this.colors = new Uint32Array(colors); + this.alphas = new Float32Array(alphas); + + return this; }, /** - * This method is left intentionally empty and does not do anything. - * It is retained to allow a Mesh or Quad to be added to a Container. + * This method enables rendering of the Mesh vertices to the given Graphics instance. * - * @method Phaser.GameObjects.Mesh#setAlpha - * @since 3.17.0 + * If you enable this feature, you **must** call `Graphics.clear()` in your Scene `update`, + * otherwise the Graphics instance you provide to debug will fill-up with draw calls, + * eventually crashing the browser. This is not done automatically to allow you to debug + * draw multiple Mesh objects to a single Graphics instance. + * + * The Mesh class has a built-in debug rendering callback `Mesh.renderDebugVerts`, however + * you can also provide your own callback to be used instead. Do this by setting the `callback` parameter. + * + * The callback is invoked _once per render_ and sent the following parameters: + * + * `callback(src, meshLength, verts)` + * + * `src` is the Mesh instance being debugged. + * `meshLength` is the number of mesh vertices in total. + * `verts` is an array of the translated vertex coordinates. + * + * If using your own callback you do not have to provide a Graphics instance to this method. + * + * To disable debug rendering, to either your own callback or the built-in one, call this method + * with no arguments. + * + * @method Phaser.GameObjects.Mesh#setDebug + * @since 3.50.0 + * + * @param {Phaser.GameObjects.Graphics} [graphic] - The Graphic instance to render to if using the built-in callback. + * @param {function} [callback] - The callback to invoke during debug render. Leave as undefined to use the built-in callback. + * + * @return {this} This Game Object instance. */ - setAlpha: NOOP + setDebug: function (graphic, callback) + { + this.debugGraphic = graphic; + + if (!graphic && !callback) + { + this.debugCallback = null; + } + else if (!callback) + { + this.debugCallback = this.renderDebugVerts; + } + else + { + this.debugCallback = callback; + } + + return this; + }, + + /** + * The Mesh update loop. + * + * @method Phaser.GameObjects.Mesh#preUpdate + * @protected + * @since 3.50.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + preUpdate: function (time, delta) + { + this.anims.update(time, delta); + }, + + /** + * The built-in Mesh vertices debug rendering method. + * + * See `Mesh.setDebug` for more details. + * + * @method Phaser.GameObjects.Mesh#renderDebugVerts + * @since 3.50.0 + * + * @param {Phaser.GameObjects.Mesh} src - The Mesh object being rendered. + * @param {integer} meshLength - The number of vertices in the mesh. + * @param {number[]} verts - An array of translated vertex coordinates. + */ + renderDebugVerts: function (src, meshLength, verts) + { + var graphic = src.debugGraphic; + + for (var i = 0; i < meshLength; i += 6) + { + var x0 = verts[i + 0]; + var y0 = verts[i + 1]; + var x1 = verts[i + 2]; + var y1 = verts[i + 3]; + var x2 = verts[i + 4]; + var y2 = verts[i + 5]; + + graphic.strokeTriangle(x0, y0, x1, y1, x2, y2); + } + }, + + /** + * Handles the pre-destroy step for the Mesh, which removes the Animation component and typed arrays. + * + * @method Phaser.GameObjects.Mesh#preDestroy + * @private + * @since 3.50.0 + */ + preDestroy: function () + { + this.anims.destroy(); + + this.anims = undefined; + + this.vertices = null; + this.uv = null; + this.colors = null; + this.alphas = null; + + this.debugCallback = null; + this.debugGraphic = null; + } }); diff --git a/src/gameobjects/mesh/MeshWebGLRenderer.js b/src/gameobjects/mesh/MeshWebGLRenderer.js index 35a61f0ad..4060d4699 100644 --- a/src/gameobjects/mesh/MeshWebGLRenderer.js +++ b/src/gameobjects/mesh/MeshWebGLRenderer.js @@ -77,6 +77,9 @@ var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera var colorIndex = 0; var tintEffect = src.tintFill; + var debugCallback = src.debugCallback; + var debugVerts = []; + for (var i = 0; i < meshVerticesLength; i += 2) { var x = vertices[i + 0]; @@ -91,40 +94,29 @@ var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera ty = Math.round(ty); } + if (debugCallback) + { + debugVerts[i + 0] = tx; + debugVerts[i + 1] = ty; + } + vertexViewF32[++vertexOffset] = tx; vertexViewF32[++vertexOffset] = ty; vertexViewF32[++vertexOffset] = uvs[i + 0]; vertexViewF32[++vertexOffset] = uvs[i + 1]; vertexViewF32[++vertexOffset] = textureUnit; vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = Utils.getTintAppendFloatAlpha(colors[colorIndex], camera.alpha * alphas[colorIndex]); + vertexViewU32[++vertexOffset] = Utils.getTintAppendFloatAlpha(colors[colorIndex], camera.alpha * src.alpha * alphas[colorIndex]); colorIndex++; } pipeline.vertexCount += vertexCount; - /* - pipeline.flush(); - - for (var i = 0; i < meshVerticesLength; i += 2) + if (debugCallback) { - var x = vertices[i + 0]; - var y = vertices[i + 1]; - - var tx = x * calcMatrix.a + y * calcMatrix.c + calcMatrix.e; - var ty = x * calcMatrix.b + y * calcMatrix.d + calcMatrix.f; - - if (camera.roundPixels) - { - tx = Math.round(tx); - ty = Math.round(ty); - } - - pipeline.drawFillRect(tx, ty, 2, 2, 0x00ff00, 1); + debugCallback.call(src, src, meshVerticesLength, debugVerts); } - */ - }; module.exports = MeshWebGLRenderer; From ae067861f6314f5cf24c61937d2e76c6f35b5687 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sun, 13 Sep 2020 23:11:06 +0100 Subject: [PATCH 081/153] Update CHANGELOG-v3.50.md --- CHANGELOG-v3.50.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index 11f10e7e5..643e71cdc 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -348,6 +348,20 @@ The Animation API has had a significant overhaul to improve playback handling. I * `GenerateFrameNumbers` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. * `GenerateFrameNames` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. +### Mesh Game Object New Features and Updates + +* `Mesh.setVertices` is a new method that allows you to set the verts of a Mesh Game Object from the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage. +* The Mesh constructor signature has changed to `scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame`, where `indicies` is the new parameter added to the list. It allows you to provide indexed vertex data to create the Mesh from, where the `indicies` array holds the vertex index information. The final list of vertices is built from this index along with the provided vertices and uvs arrays. +* You can now supply just a single numerical value as the `color` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the color for all vertices created. +* You can now supply just a single numerical value as the `alpha` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created. +* The `Mesh` Game Object now extends the `SingleAlpha` component and the alpha value is factored into the final alpha value per vertex during rendering. This means you can now set the whole alpha across the Mesh using the standard `setAlpha` methods. But, if you wish to, you can still control the alpha on a per-vertex basis as well. +* The `Mesh` Game Object now has the Animation State Component. This allows you to create and play animations across the texture of a Mesh, something that previously wasn't possible. As a result, the Mesh now adds itself to the Update List when added to a Scene. +* `Mesh.setDebug` is a new method that allows you to render a debug visualisation of the Mesh vertices to a Graphics Game Object. You can provide your own Graphics instance and optionally callback that is invoked during rendering. This allows you to easily visualise the vertices of your Mesh to help debug UV mapping. +* `Mesh.debugGraphic` is a new property that holds the debug Graphics instance reference. +* `Mesh.debugCallback` is a new property that holds the debug render callback. +* `Mesh.renderDebugVerts` is a new method that acts as the default render callback for `setDebug` if none is provided. +* `Mesh.preDestroy` is a new method that will clean-up the Mesh arrays and debug references on destruction. + ### New Features * `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value. @@ -501,9 +515,6 @@ For a long time, the 'resolution' property has been present - taunting developer * The `WebGLRenderer.resize` and `onResize` methods no longer receives or uses the `resolution` parameter. * The `ScaleManager.resolution` property has been removed and all internal use of it. - - - ### 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: From 17ed707acb8f4a9ec50f3bf2ca59a3eb7287d804 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 09:23:59 +0100 Subject: [PATCH 082/153] The `Loader.path` was being added to the File URL even if the URL was absolute. This is now checked for and the path is not applied unless the URL is relative #5301 --- src/loader/File.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/loader/File.js b/src/loader/File.js index 8afdba51e..34982df8a 100644 --- a/src/loader/File.js +++ b/src/loader/File.js @@ -77,7 +77,18 @@ var File = new Class({ if (!this.type || !this.key) { - throw new Error('Error calling \'Loader.' + this.type + '\' invalid key provided.'); + throw new Error('Invalid Loader.' + this.type + ' key'); + } + + var url = GetFastValue(fileConfig, 'url'); + + if (url === undefined) + { + url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); + } + else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)) + { + url = loader.path + url; } /** @@ -91,16 +102,7 @@ var File = new Class({ * @type {object|string} * @since 3.0.0 */ - this.url = GetFastValue(fileConfig, 'url'); - - if (this.url === undefined) - { - this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); - } - else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0) - { - this.url = loader.path + this.url; - } + this.url = url; /** * The final URL this file will load from, including baseURL and path. From b7eb869d8cebb2e0f9d1e7085f834836f98c195e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 09:24:02 +0100 Subject: [PATCH 083/153] Update CHANGELOG-v3.50.md --- CHANGELOG-v3.50.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index 643e71cdc..84a81df48 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -470,6 +470,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The Scale Managers `GetScreenOrientation` function will now check for `window.orientation` first, because iOS mobile browsers have an incomplete implementation of the Screen API, forcing us to use the window value as a priority. This means the Scale Manager will now emit `orientationchange` events correctly on iOS. Fix #4361 #4914 (thanks @pfdtravalmatic @jackfreak @cuihu) * `Time.Clock.addEvent` can now take an instance of a `TimerEvent` as its parameter. Fix #5294 (thanks @samme @EmilSV) * `GameConfig.audio` now defaults to an empty object, which simplifies access to the config in later checks (thanks @samme) +* The `Loader.path` was being added to the File URL even if the URL was absolute. This is now checked for and the path is not applied unless the URL is relative (thanks @firesoft) ### Namespace Updates From ea0abc4f696b707d25d1f0920d59a877ae725b48 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 09:44:17 +0100 Subject: [PATCH 084/153] Tidy up the formatting --- src/renderer/webgl/Utils.js | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/renderer/webgl/Utils.js b/src/renderer/webgl/Utils.js index 535dd516f..c6576e545 100644 --- a/src/renderer/webgl/Utils.js +++ b/src/renderer/webgl/Utils.js @@ -10,6 +10,7 @@ * Generate shader source to test maximum ifs. * * @private + * @ignore * @param {number} maxIfs - The number of if statements to generate */ function GenerateSrc (maxIfs) @@ -53,10 +54,10 @@ module.exports = { */ getTintFromFloats: function (r, g, b, a) { - var ur = ((r * 255.0)|0) & 0xFF; - var ug = ((g * 255.0)|0) & 0xFF; - var ub = ((b * 255.0)|0) & 0xFF; - var ua = ((a * 255.0)|0) & 0xFF; + var ur = ((r * 255) | 0) & 0xff; + var ug = ((g * 255) | 0) & 0xff; + var ub = ((b * 255) | 0) & 0xff; + var ua = ((a * 255) | 0) & 0xff; return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; }, @@ -75,7 +76,8 @@ module.exports = { */ getTintAppendFloatAlpha: function (rgb, a) { - var ua = ((a * 255.0)|0) & 0xFF; + var ua = ((a * 255) | 0) & 0xff; + return ((ua << 24) | rgb) >>> 0; }, @@ -94,10 +96,10 @@ module.exports = { */ getTintAppendFloatAlphaAndSwap: function (rgb, a) { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - var ua = ((a * 255.0)|0) & 0xFF; + var ur = ((rgb >> 16) | 0) & 0xff; + var ug = ((rgb >> 8) | 0) & 0xff; + var ub = (rgb | 0) & 0xff; + var ua = ((a * 255) | 0) & 0xff; return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; }, @@ -114,11 +116,11 @@ module.exports = { */ getFloatsFromUintRGB: function (rgb) { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; + var ur = ((rgb >> 16) | 0) & 0xff; + var ug = ((rgb >> 8) | 0) & 0xff; + var ub = (rgb | 0) & 0xff; - return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; + return [ ur / 255, ug / 255, ub / 255 ]; }, /** @@ -146,7 +148,7 @@ module.exports = { } else { - count += 1; // We'll force any other type to be 32 bit. for now + count += 1; } } From 6d09f1fe402ae89ca8a5834207c459720e55b51d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 10:59:32 +0100 Subject: [PATCH 085/153] Refactored Tint component * `Tint.tintTopLeft` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintTL` which has now been removed. * `Tint.tintTopRight` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintTR` which has now been removed. * `Tint.tintBottomLeft` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintBL` which has now been removed. * `Tint.tintBottomRight` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintBR` which has now been removed. * The property `Tint._isTinted` has been removed as it's no longer required. --- src/gameobjects/components/Tint.js | 183 +++++++---------------------- 1 file changed, 44 insertions(+), 139 deletions(-) diff --git a/src/gameobjects/components/Tint.js b/src/gameobjects/components/Tint.js index dda719c9a..221be869f 100644 --- a/src/gameobjects/components/Tint.js +++ b/src/gameobjects/components/Tint.js @@ -4,8 +4,6 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColorFromValue = require('../../display/color/GetColorFromValue'); - /** * Provides methods used for setting the tint of a Game Object. * Should be applied as a mixin and not used directly. @@ -18,62 +16,58 @@ var GetColorFromValue = require('../../display/color/GetColorFromValue'); var Tint = { /** - * Private internal value. Holds the top-left tint value. + * The tint value being applied to the top-left vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. * - * @name Phaser.GameObjects.Components.Tint#_tintTL + * @name Phaser.GameObjects.Components.Tint#tintTopLeft * @type {number} - * @private - * @default 16777215 + * @default 0xffffff * @since 3.0.0 */ - _tintTL: 16777215, + tintTopLeft: 0xffffff, /** - * Private internal value. Holds the top-right tint value. + * The tint value being applied to the top-right vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. * - * @name Phaser.GameObjects.Components.Tint#_tintTR + * @name Phaser.GameObjects.Components.Tint#tintTopRight * @type {number} - * @private - * @default 16777215 + * @default 0xffffff * @since 3.0.0 */ - _tintTR: 16777215, + tintTopRight: 0xffffff, /** - * Private internal value. Holds the bottom-left tint value. + * The tint value being applied to the bottom-left vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. * - * @name Phaser.GameObjects.Components.Tint#_tintBL + * @name Phaser.GameObjects.Components.Tint#tintBottomLeft * @type {number} - * @private - * @default 16777215 + * @default 0xffffff * @since 3.0.0 */ - _tintBL: 16777215, + tintBottomLeft: 0xffffff, /** - * Private internal value. Holds the bottom-right tint value. + * The tint value being applied to the bottom-right vertice of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple. * - * @name Phaser.GameObjects.Components.Tint#_tintBR + * @name Phaser.GameObjects.Components.Tint#tintBottomRight * @type {number} - * @private - * @default 16777215 + * @default 0xffffff * @since 3.0.0 */ - _tintBR: 16777215, + tintBottomRight: 0xffffff, /** - * Private internal value. Holds if the Game Object is tinted or not. + * The tint fill mode. * - * @name Phaser.GameObjects.Components.Tint#_isTinted - * @type {boolean} - * @private - * @default false - * @since 3.11.0 - */ - _isTinted: false, - - /** - * Fill or additive? + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. * * @name Phaser.GameObjects.Components.Tint#tintFill * @type {boolean} @@ -98,8 +92,6 @@ var Tint = { { this.setTint(0xffffff); - this._isTinted = false; - return this; }, @@ -141,12 +133,10 @@ var Tint = { bottomRight = topLeft; } - this._tintTL = GetColorFromValue(topLeft); - this._tintTR = GetColorFromValue(topRight); - this._tintBL = GetColorFromValue(bottomLeft); - this._tintBR = GetColorFromValue(bottomRight); - - this._isTinted = true; + this.tintTopLeft = topLeft; + this.tintTopRight = topRight; + this.tintBottomLeft = bottomLeft; + this.tintBottomRight = bottomRight; this.tintFill = false; @@ -190,102 +180,6 @@ var Tint = { return this; }, - /** - * The tint value being applied to the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Tint#tintTopLeft - * @type {integer} - * @webglOnly - * @since 3.0.0 - */ - tintTopLeft: { - - get: function () - { - return this._tintTL; - }, - - set: function (value) - { - this._tintTL = GetColorFromValue(value); - this._isTinted = true; - } - - }, - - /** - * The tint value being applied to the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Tint#tintTopRight - * @type {integer} - * @webglOnly - * @since 3.0.0 - */ - tintTopRight: { - - get: function () - { - return this._tintTR; - }, - - set: function (value) - { - this._tintTR = GetColorFromValue(value); - this._isTinted = true; - } - - }, - - /** - * The tint value being applied to the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomLeft - * @type {integer} - * @webglOnly - * @since 3.0.0 - */ - tintBottomLeft: { - - get: function () - { - return this._tintBL; - }, - - set: function (value) - { - this._tintBL = GetColorFromValue(value); - this._isTinted = true; - } - - }, - - /** - * The tint value being applied to the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomRight - * @type {integer} - * @webglOnly - * @since 3.0.0 - */ - tintBottomRight: { - - get: function () - { - return this._tintBR; - }, - - set: function (value) - { - this._tintBR = GetColorFromValue(value); - this._isTinted = true; - } - - }, - /** * The tint value being applied to the whole of the Game Object. * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value. @@ -304,7 +198,10 @@ var Tint = { }, /** - * Does this Game Object have a tint applied to it or not? + * Does this Game Object have a tint applied? + * + * It checks to see if the 4 tint properties are set to the value 0xffffff + * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted. * * @name Phaser.GameObjects.Components.Tint#isTinted * @type {boolean} @@ -316,7 +213,15 @@ var Tint = { get: function () { - return this._isTinted; + var white = 0xffffff; + + return ( + this.tintFill || + this.tintTopLeft !== white || + this.tintTopRight !== white || + this.tintBottomLeft !== white || + this.tintBottomRight !== white + ); } } From 75c5f11aee79c46642092260e4bdd81927aded3f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 11:02:02 +0100 Subject: [PATCH 086/153] Updated shader source RGB to BGR and removed if-else block * The `Single.frag`, `Light.frag` and `Multi.frag` shaders have all been updated so they now read the color value as `outTint.bgr` instead of `outTint.rgb`. This allows the colors to remain in RGB order within the Tint component. * The `Single.frag`, `Light.frag` and `Multi.frag` shaders have all been updated so they no longer have a 3-way check on the `outTintEffect` value. --- src/renderer/webgl/shaders/Light-frag.js | 2 +- src/renderer/webgl/shaders/Multi-frag.js | 21 ++++++--------------- src/renderer/webgl/shaders/Single-frag.js | 22 +++++++--------------- src/renderer/webgl/shaders/src/Light.frag | 2 +- src/renderer/webgl/shaders/src/Multi.frag | 21 ++++++--------------- src/renderer/webgl/shaders/src/Single.frag | 21 ++++++--------------- 6 files changed, 27 insertions(+), 62 deletions(-) diff --git a/src/renderer/webgl/shaders/Light-frag.js b/src/renderer/webgl/shaders/Light-frag.js index fb19e26cf..6ef912420 100644 --- a/src/renderer/webgl/shaders/Light-frag.js +++ b/src/renderer/webgl/shaders/Light-frag.js @@ -27,7 +27,7 @@ module.exports = [ 'void main()', '{', ' vec3 finalColor = vec3(0.0, 0.0, 0.0);', - ' vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);', + ' vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.bgr * outTint.a, outTint.a);', ' vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;', ' vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));', ' vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;', diff --git a/src/renderer/webgl/shaders/Multi-frag.js b/src/renderer/webgl/shaders/Multi-frag.js index 582e2a05b..4c55cad71 100644 --- a/src/renderer/webgl/shaders/Multi-frag.js +++ b/src/renderer/webgl/shaders/Multi-frag.js @@ -16,24 +16,15 @@ module.exports = [ '', ' %forloop%', '', - ' vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);', - ' vec4 color = texture;', + ' vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);', '', - ' if (outTintEffect == 0.0)', - ' {', - ' // Multiply texture tint', - ' color = texture * texel;', - ' }', - ' else if (outTintEffect == 1.0)', + ' // Multiply texture tint', + ' vec4 color = texture * texel;', + '', + ' if (outTintEffect == 1.0)', ' {', ' // Solid color + texture alpha', - ' color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);', - ' color.a = texture.a * texel.a;', - ' }', - ' else if (outTintEffect == 2.0)', - ' {', - ' // Solid color, no texture', - ' color = texel;', + ' color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);', ' }', '', ' gl_FragColor = color;', diff --git a/src/renderer/webgl/shaders/Single-frag.js b/src/renderer/webgl/shaders/Single-frag.js index 6476b2f14..51d6e996a 100644 --- a/src/renderer/webgl/shaders/Single-frag.js +++ b/src/renderer/webgl/shaders/Single-frag.js @@ -12,24 +12,16 @@ module.exports = [ 'void main()', '{', ' vec4 texture = texture2D(uMainSampler, outTexCoord);', - ' vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);', - ' vec4 color = texture;', + ' vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);', '', - ' if (outTintEffect == 0.0)', - ' {', - ' // Multiply texture tint', - ' color = texture * texel;', - ' }', - ' else if (outTintEffect == 1.0)', + ' // Multiply texture tint', + ' vec4 color = texture * texel;', + '', + ' if (outTintEffect == 1.0)', ' {', ' // Solid color + texture alpha', - ' color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);', - ' color.a = texture.a * texel.a;', - ' }', - ' else if (outTintEffect == 2.0)', - ' {', - ' // Solid color, no texture', - ' color = texel;', + ' color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);', + ' // color.a = texture.a * texel.a;', ' }', '', ' gl_FragColor = color;', diff --git a/src/renderer/webgl/shaders/src/Light.frag b/src/renderer/webgl/shaders/src/Light.frag index 67236b7b8..fa4116bb4 100644 --- a/src/renderer/webgl/shaders/src/Light.frag +++ b/src/renderer/webgl/shaders/src/Light.frag @@ -26,7 +26,7 @@ varying vec4 outTint; void main() { vec3 finalColor = vec3(0.0, 0.0, 0.0); - vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a); + vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.bgr * outTint.a, outTint.a); vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb; vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0)); vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w; diff --git a/src/renderer/webgl/shaders/src/Multi.frag b/src/renderer/webgl/shaders/src/Multi.frag index 1b7f61203..d95e03480 100644 --- a/src/renderer/webgl/shaders/src/Multi.frag +++ b/src/renderer/webgl/shaders/src/Multi.frag @@ -15,24 +15,15 @@ void main() %forloop% - vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a); - vec4 color = texture; + vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a); - if (outTintEffect == 0.0) - { - // Multiply texture tint - color = texture * texel; - } - else if (outTintEffect == 1.0) + // Multiply texture tint + vec4 color = texture * texel; + + if (outTintEffect == 1.0) { // Solid color + texture alpha - color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a); - color.a = texture.a * texel.a; - } - else if (outTintEffect == 2.0) - { - // Solid color, no texture - color = texel; + color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a); } gl_FragColor = color; diff --git a/src/renderer/webgl/shaders/src/Single.frag b/src/renderer/webgl/shaders/src/Single.frag index 2a9c3648d..8ba4f284b 100644 --- a/src/renderer/webgl/shaders/src/Single.frag +++ b/src/renderer/webgl/shaders/src/Single.frag @@ -11,24 +11,15 @@ varying vec4 outTint; void main() { vec4 texture = texture2D(uMainSampler, outTexCoord); - vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a); - vec4 color = texture; + vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a); - if (outTintEffect == 0.0) - { - // Multiply texture tint - color = texture * texel; - } - else if (outTintEffect == 1.0) + // Multiply texture tint + vec4 color = texture * texel; + + if (outTintEffect == 1.0) { // Solid color + texture alpha - color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a); - color.a = texture.a * texel.a; - } - else if (outTintEffect == 2.0) - { - // Solid color, no texture - color = texel; + color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a); } gl_FragColor = color; From 4ade25fc79ddf0f1e48df49838699802b9ef8b7f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 11:05:09 +0100 Subject: [PATCH 087/153] No longer read private values for tint The `Multi Pipeline`, `Bitmap Text`, `Render Texture`, `Text`, `TileSprite` and `Camera` now all read the tint values from the public properties instead of the private `_tintTL` etc ones. They also now set the `tintEffect` value directly from the `tintFill` property, removing another conditional check. --- .../dynamic/DynamicBitmapTextWebGLRenderer.js | 19 +++++++++---------- .../static/BitmapTextWebGLRenderer.js | 10 +++++----- .../RenderTextureWebGLRenderer.js | 10 +++++----- .../text/static/TextWebGLRenderer.js | 10 +++++----- .../tilesprite/TileSpriteWebGLRenderer.js | 10 +++++----- src/renderer/webgl/WebGLRenderer.js | 10 +++++----- src/renderer/webgl/pipelines/MultiPipeline.js | 10 +++++----- 7 files changed, 39 insertions(+), 40 deletions(-) diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js index c59803e83..c6318c1c9 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js @@ -5,7 +5,6 @@ */ var Utils = require('../../../renderer/webgl/Utils'); -var GetColorFromValue = require('../../../display/color/GetColorFromValue'); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -85,11 +84,11 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, src, interpolationPerce var textureWidth = texture.width; var textureHeight = texture.height; - var tintEffect = (src._isTinted && src.tintFill); - var tintTL = Utils.getTintAppendFloatAlpha(src._tintTL, camera.alpha * src._alphaTL); - var tintTR = Utils.getTintAppendFloatAlpha(src._tintTR, camera.alpha * src._alphaTR); - var tintBL = Utils.getTintAppendFloatAlpha(src._tintBL, camera.alpha * src._alphaBL); - var tintBR = Utils.getTintAppendFloatAlpha(src._tintBR, camera.alpha * src._alphaBR); + var tintEffect = src.tintFill; + var tintTL = Utils.getTintAppendFloatAlpha(src.tintTopLeft, camera.alpha * src._alphaTL); + var tintTR = Utils.getTintAppendFloatAlpha(src.tintTopRight, camera.alpha * src._alphaTR); + var tintBL = Utils.getTintAppendFloatAlpha(src.tintBottomLeft, camera.alpha * src._alphaBL); + var tintBR = Utils.getTintAppendFloatAlpha(src.tintBottomRight, camera.alpha * src._alphaBR); var textureUnit = pipeline.setGameObject(src); @@ -232,10 +231,10 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, src, interpolationPerce tintBR = output.tint.bottomRight; } - tintTL = Utils.getTintAppendFloatAlpha(GetColorFromValue(tintTL), camera.alpha * src._alphaTL); - tintTR = Utils.getTintAppendFloatAlpha(GetColorFromValue(tintTR), camera.alpha * src._alphaTR); - tintBL = Utils.getTintAppendFloatAlpha(GetColorFromValue(tintBL), camera.alpha * src._alphaBL); - tintBR = Utils.getTintAppendFloatAlpha(GetColorFromValue(tintBR), camera.alpha * src._alphaBR); + tintTL = Utils.getTintAppendFloatAlpha(tintTL, camera.alpha * src._alphaTL); + tintTR = Utils.getTintAppendFloatAlpha(tintTR, camera.alpha * src._alphaTR); + tintBL = Utils.getTintAppendFloatAlpha(tintBL, camera.alpha * src._alphaBL); + tintBR = Utils.getTintAppendFloatAlpha(tintBR, camera.alpha * src._alphaBR); } x *= scale; diff --git a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js index cfe3c6ff6..495f32bb0 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js @@ -69,12 +69,12 @@ var BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, var charColors = src.charColors; - var tintEffect = (src._isTinted && src.tintFill); + var tintEffect = src.tintFill; - var tintTL = Utils.getTintAppendFloatAlpha(src._tintTL, cameraAlpha * src._alphaTL); - var tintTR = Utils.getTintAppendFloatAlpha(src._tintTR, cameraAlpha * src._alphaTR); - var tintBL = Utils.getTintAppendFloatAlpha(src._tintBL, cameraAlpha * src._alphaBL); - var tintBR = Utils.getTintAppendFloatAlpha(src._tintBR, cameraAlpha * src._alphaBR); + var tintTL = Utils.getTintAppendFloatAlpha(src.tintTopLeft, cameraAlpha * src._alphaTL); + var tintTR = Utils.getTintAppendFloatAlpha(src.tintTopRight, cameraAlpha * src._alphaTR); + var tintBL = Utils.getTintAppendFloatAlpha(src.tintBottomLeft, cameraAlpha * src._alphaBL); + var tintBR = Utils.getTintAppendFloatAlpha(src.tintBottomRight, cameraAlpha * src._alphaBR); var texture = src.frame.glTexture; var textureUnit = pipeline.setGameObject(src); diff --git a/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js b/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js index 98e2c6bf4..e39f1d997 100644 --- a/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js +++ b/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js @@ -43,11 +43,11 @@ var RenderTextureWebGLRenderer = function (renderer, src, interpolationPercentag src.scrollFactorX, src.scrollFactorY, src.displayOriginX, src.displayOriginY, 0, 0, width, height, - getTint(src._tintTL, camera.alpha * src._alphaTL), - getTint(src._tintTR, camera.alpha * src._alphaTR), - getTint(src._tintBL, camera.alpha * src._alphaBL), - getTint(src._tintBR, camera.alpha * src._alphaBR), - (src._isTinted && src.tintFill), + getTint(src.tintTopLeft, camera.alpha * src._alphaTL), + getTint(src.tintTopRight, camera.alpha * src._alphaTR), + getTint(src.tintBottomLeft, camera.alpha * src._alphaBL), + getTint(src.tintBottomRight, camera.alpha * src._alphaBR), + src.tintFill, 0, 0, camera, parentMatrix, diff --git a/src/gameobjects/text/static/TextWebGLRenderer.js b/src/gameobjects/text/static/TextWebGLRenderer.js index c7a91b766..e94ea3d8c 100644 --- a/src/gameobjects/text/static/TextWebGLRenderer.js +++ b/src/gameobjects/text/static/TextWebGLRenderer.js @@ -48,11 +48,11 @@ var TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera src.scrollFactorX, src.scrollFactorY, src.displayOriginX, src.displayOriginY, 0, 0, width, height, - getTint(src._tintTL, camera.alpha * src._alphaTL), - getTint(src._tintTR, camera.alpha * src._alphaTR), - getTint(src._tintBL, camera.alpha * src._alphaBL), - getTint(src._tintBR, camera.alpha * src._alphaBR), - (src._isTinted && src.tintFill), + getTint(src.tintTopLeft, camera.alpha * src._alphaTL), + getTint(src.tintTopRight, camera.alpha * src._alphaTR), + getTint(src.tintBottomLeft, camera.alpha * src._alphaBL), + getTint(src.tintBottomRight, camera.alpha * src._alphaBR), + src.tintFill, 0, 0, camera, parentMatrix, diff --git a/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js b/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js index 8d83006cc..e44ad9d0c 100644 --- a/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js +++ b/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js @@ -50,11 +50,11 @@ var TileSpriteWebGLRenderer = function (renderer, src, interpolationPercentage, src.scrollFactorX, src.scrollFactorY, src.originX * width, src.originY * height, 0, 0, width, height, - getTint(src._tintTL, camera.alpha * src._alphaTL), - getTint(src._tintTR, camera.alpha * src._alphaTR), - getTint(src._tintBL, camera.alpha * src._alphaBL), - getTint(src._tintBR, camera.alpha * src._alphaBR), - (src._isTinted && src.tintFill), + getTint(src.tintTopLeft, camera.alpha * src._alphaTL), + getTint(src.tintTopRight, camera.alpha * src._alphaTR), + getTint(src.tintBottomLeft, camera.alpha * src._alphaBL), + getTint(src.tintBottomRight, camera.alpha * src._alphaBR), + src.tintFill, (src.tilePositionX % src.displayFrame.width) / src.displayFrame.width, (src.tilePositionY % src.displayFrame.height) / src.displayFrame.height, camera, diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 34f751a43..18287d5cd 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -2114,11 +2114,11 @@ var WebGLRenderer = new Class({ 1, 1, 0, 0, 0, 0, camera.width, camera.height, - getTint(camera._tintTL, camera._alphaTL), - getTint(camera._tintTR, camera._alphaTR), - getTint(camera._tintBL, camera._alphaBL), - getTint(camera._tintBR, camera._alphaBR), - (camera._isTinted && camera.tintFill), + getTint(camera.tintTopLeft, camera._alphaTL), + getTint(camera.tintTopRight, camera._alphaTR), + getTint(camera.tintBottomLeft, camera._alphaBL), + getTint(camera.tintBottomRight, camera._alphaBR), + camera.tintFill, 0, 0, this.defaultCamera, null diff --git a/src/renderer/webgl/pipelines/MultiPipeline.js b/src/renderer/webgl/pipelines/MultiPipeline.js index 4bee9ba6b..3b7ac0f2d 100644 --- a/src/renderer/webgl/pipelines/MultiPipeline.js +++ b/src/renderer/webgl/pipelines/MultiPipeline.js @@ -528,10 +528,10 @@ var MultiPipeline = new Class({ var tx3 = calcMatrix.getX(xw, y); var ty3 = calcMatrix.getY(xw, y); - var tintTL = Utils.getTintAppendFloatAlpha(sprite._tintTL, camera.alpha * sprite._alphaTL); - var tintTR = Utils.getTintAppendFloatAlpha(sprite._tintTR, camera.alpha * sprite._alphaTR); - var tintBL = Utils.getTintAppendFloatAlpha(sprite._tintBL, camera.alpha * sprite._alphaBL); - var tintBR = Utils.getTintAppendFloatAlpha(sprite._tintBR, camera.alpha * sprite._alphaBR); + var tintTL = Utils.getTintAppendFloatAlpha(sprite.tintTopLeft, camera.alpha * sprite._alphaTL); + var tintTR = Utils.getTintAppendFloatAlpha(sprite.tintTopRight, camera.alpha * sprite._alphaTR); + var tintBL = Utils.getTintAppendFloatAlpha(sprite.tintBottomLeft, camera.alpha * sprite._alphaBL); + var tintBR = Utils.getTintAppendFloatAlpha(sprite.tintBottomRight, camera.alpha * sprite._alphaBR); if (camera.roundPixels) { @@ -556,7 +556,7 @@ var MultiPipeline = new Class({ var unit = this.setGameObject(sprite); - var tintEffect = (sprite._isTinted && sprite.tintFill); + var tintEffect = sprite.tintFill; this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit); }, From 0f6cc79cd16459bb4f61cb6174354a229f3f5f4e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 11:05:32 +0100 Subject: [PATCH 088/153] The function `GetColorFromValue` has been removed as it's no longer used internally. --- src/display/color/GetColorFromValue.js | 23 ----------------------- src/display/color/index.js | 1 - 2 files changed, 24 deletions(-) delete mode 100644 src/display/color/GetColorFromValue.js diff --git a/src/display/color/GetColorFromValue.js b/src/display/color/GetColorFromValue.js deleted file mode 100644 index 6b744ef87..000000000 --- a/src/display/color/GetColorFromValue.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Given a hex color value, such as 0xff00ff (for purple), it will return a - * numeric representation of it (i.e. 16711935) for use in WebGL tinting. - * - * @function Phaser.Display.Color.GetColorFromValue - * @since 3.50.0 - * - * @param {number} red - The hex color value, such as 0xff0000. - * - * @return {number} The combined color value. - */ -var GetColorFromValue = function (value) -{ - return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16); -}; - -module.exports = GetColorFromValue; diff --git a/src/display/color/index.js b/src/display/color/index.js index e9cc94b2e..b4231fe9d 100644 --- a/src/display/color/index.js +++ b/src/display/color/index.js @@ -10,7 +10,6 @@ Color.ColorToRGBA = require('./ColorToRGBA'); Color.ComponentToHex = require('./ComponentToHex'); Color.GetColor = require('./GetColor'); Color.GetColor32 = require('./GetColor32'); -Color.GetColorFromValue = require('./GetColorFromValue'); Color.HexStringToColor = require('./HexStringToColor'); Color.HSLToColor = require('./HSLToColor'); Color.HSVColorWheel = require('./HSVColorWheel'); From e5ce83aebd024d5876f4d31f2e96c1f6f5265c14 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 11:06:16 +0100 Subject: [PATCH 089/153] New direct tint value --- .../bitmaptext/static/BitmapText.js | 61 ++++--------------- 1 file changed, 11 insertions(+), 50 deletions(-) diff --git a/src/gameobjects/bitmaptext/static/BitmapText.js b/src/gameobjects/bitmaptext/static/BitmapText.js index 2e4f4366b..79f34d44c 100644 --- a/src/gameobjects/bitmaptext/static/BitmapText.js +++ b/src/gameobjects/bitmaptext/static/BitmapText.js @@ -8,7 +8,6 @@ var Class = require('../../../utils/Class'); var Clamp = require('../../../math/Clamp'); var Components = require('../../components'); var GameObject = require('../../GameObject'); -var GetColorFromValue = require('../../../display/color/GetColorFromValue'); var GetBitmapTextSize = require('../GetBitmapTextSize'); var ParseFromAtlas = require('../ParseFromAtlas'); var ParseXMLBitmapFont = require('../ParseXMLBitmapFont'); @@ -246,22 +245,13 @@ var BitmapText = new Class({ /** * The color of the drop shadow. * - * @name Phaser.GameObjects.BitmapText#_dropShadowColor - * @type {number} - * @private - * @since 3.50.0 - */ - this._dropShadowColor = 0x000000; - - /** - * The GL encoded color of the drop shadow. + * You can set this directly, or use `Phaser.GameObjects.BitmapText#setDropShadow`. * - * @name Phaser.GameObjects.BitmapText#_dropShadowColorGL + * @name Phaser.GameObjects.BitmapText#dropShadowColor * @type {number} - * @private * @since 3.50.0 */ - this._dropShadowColorGL = 0x000000; + this.dropShadowColor = 0x000000; /** * The alpha value of the drop shadow. @@ -536,27 +526,23 @@ var BitmapText = new Class({ else { var tintEffect = (tintFill) ? 1 : 0; - var tintTL = GetColorFromValue(topLeft); - var tintTR = GetColorFromValue(topRight); - var tintBL = GetColorFromValue(bottomLeft); - var tintBR = GetColorFromValue(bottomRight); if (color) { color.tintEffect = tintEffect; - color.tintTL = tintTL; - color.tintTR = tintTR; - color.tintBL = tintBL; - color.tintBR = tintBR; + color.tintTL = topLeft; + color.tintTR = topRight; + color.tintBL = bottomLeft; + color.tintBR = bottomRight; } else { charColors[i] = { tintEffect: tintEffect, - tintTL: tintTL, - tintTR: tintTR, - tintBL: tintBL, - tintBR: tintBR + tintTL: topLeft, + tintTR: topRight, + tintBL: bottomLeft, + tintBR: bottomRight }; } } @@ -989,31 +975,6 @@ var BitmapText = new Class({ }, - /** - * The color of the drop shadow. - * - * You can also set this via `Phaser.GameObjects.BitmapText#setDropShadow`. - * - * @name Phaser.GameObjects.BitmapText#dropShadowColor - * @type {number} - * @since 3.50.0 - */ - dropShadowColor: { - - get: function () - { - return this._dropShadowColor; - }, - - set: function (value) - { - this._dropShadowColor = value; - - this._dropShadowColorGL = GetColorFromValue(value); - } - - }, - /** * Build a JSON representation of this Bitmap Text. * From f7fb186047e9b6d8ff0396338ba44ed9122d82c6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 11:06:20 +0100 Subject: [PATCH 090/153] Update CHANGELOG-v3.50.md --- CHANGELOG-v3.50.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index 84a81df48..9af0de643 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -409,6 +409,23 @@ The Animation API has had a significant overhaul to improve playback handling. I * Shutting down the Gamepad plugin (such as when sleeping a Scene) no longer calls `GamepadPlugin.disconnectAll`, but destroying it does. * `Gamepad._created` is a new private internal property that keeps track of when the instance was created. This is compared to the navigator timestamp in the update loop to avoid event spamming. Fix #4890. +### Tint Updates and Shader Changes + +Phaser has had the ability to apply an additive tint to a Game Object since the beginning, and gained 'filled tints', with and without texture alpha, in v3.11. While this was handy, it introduced a 3-way if-else condition to the shaders to handle the different modes. Plus, setting tint colors was also generating rgb order Float32 color values for each Game Object, making reading those colors back again difficult (as they'd return in BGR order). + +This has all changed in 3.50, as outlined below. Tint values are now used directly in the shader and don't pass through a color conversion function first. Lots of private properties have been removed and the shaders no longer have a 3-way if-else block. All of this means improved performance and a slight reduction in memory overhead. + +* `Tint.tintTopLeft` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintTL` which has now been removed. +* `Tint.tintTopRight` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintTR` which has now been removed. +* `Tint.tintBottomLeft` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintBL` which has now been removed. +* `Tint.tintBottomRight` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintBR` which has now been removed. +* The property `Tint._isTinted` has been removed as it's no longer required. +* The `Single.frag`, `Light.frag` and `Multi.frag` shaders have all been updated so they now read the color value as `outTint.bgr` instead of `outTint.rgb`. This allows the colors to remain in RGB order within the Tint component. +* The `Single.frag`, `Light.frag` and `Multi.frag` shaders have all been updated so they no longer have a 3-way check on the `outTintEffect` value. +* The `Multi Pipeline`, `Bitmap Text`, `Render Texture`, `Text`, `TileSprite` and `Camera` now all read the tint values from the public properties instead of the private `_tintTL` etc ones. They also now set the `tintEffect` value directly from the `tintFill` property, removing another conditional check. +* The function `GetColorFromValue` has been removed as it's no longer used internally. + + ### Updates and API Changes * Earcut, used for polygon triangulation, has been updated from 2.1.4 to 2.2.2. From 81b63cdf208e68e5ee0d6c9b59b76150492c29af Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 11:12:41 +0100 Subject: [PATCH 091/153] The `Rope.tintFill` property is now a boolean, not an integer, and can no longer take `2` as a value for a complete fill. Instead, you should provide a solid color texture with no alpha. --- src/gameobjects/rope/Rope.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/gameobjects/rope/Rope.js b/src/gameobjects/rope/Rope.js index 6cf0c6867..3def2fe74 100644 --- a/src/gameobjects/rope/Rope.js +++ b/src/gameobjects/rope/Rope.js @@ -167,15 +167,14 @@ var Rope = new Class({ /** * The tint fill mode. * - * 0 = An additive tint (the default), where vertices colors are blended with the texture. - * 1 = A fill tint, where the vertices colors replace the texture, but respects texture alpha. - * 2 = A complete tint, where the vertices colors replace the texture, including alpha, entirely. + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. * * @name Phaser.GameObjects.Rope#tintFill - * @type {integer} + * @type {boolean} * @since 3.23.0 */ - this.tintFill = (texture === '__DEFAULT') ? 2 : 0; + this.tintFill = (texture === '__DEFAULT') ? true : false; /** * If the Rope is marked as `dirty` it will automatically recalculate its vertices @@ -423,28 +422,26 @@ var Rope = new Class({ /** * Sets the tint fill mode. * - * Mode 0 is an additive tint, the default, which blends the vertices colors with the texture. + * Mode 0 (`false`) is an additive tint, the default, which blends the vertices colors with the texture. * This mode respects the texture alpha. * - * Mode 1 is a fill tint. Unlike an additive tint, a fill-tint literally replaces the pixel colors + * Mode 1 (`true`) is a fill tint. Unlike an additive tint, a fill-tint literally replaces the pixel colors * from the texture with those in the tint. You can use this for effects such as making a player flash 'white' * if hit by something. This mode respects the texture alpha. * - * Mode 2 is a complete tint. The texture colors and alpha are replaced entirely by the vertices colors. - * * See the `setColors` method for details of how to color each of the vertices. * * @method Phaser.GameObjects.Rope#setTintFill * @webglOnly * @since 3.23.0 * - * @param {integer} [value=0] - Set to 0 for an Additive tint, 1 for a fill tint with alpha, or 2 for a fill tint without alpha. + * @param {boolean} [value=false] - Set to `false` for an Additive tint or `true` fill tint with alpha. * * @return {this} This Game Object instance. */ setTintFill: function (value) { - if (value === undefined) { value = 0; } + if (value === undefined) { value = false; } this.tintFill = value; From 81800e0ce2122c969a1fad6afb122501efb02809 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 14:44:29 +0100 Subject: [PATCH 092/153] `WebGLRenderer.whiteTexture` is a new property that is a reference to a pure white 4x4 texture that is created during Boot by the Texture Manager. The Multi Pipeline uses this internally for all Graphic, Shape and fill rendering. --- src/renderer/webgl/WebGLRenderer.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 18287d5cd..33ac17bf2 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -445,6 +445,17 @@ var WebGLRenderer = new Class({ */ this.blankTexture = null; + /** + * A pure white 4x4 texture, as used by the Graphics system where needed. + * This is set in the `boot` method. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#whiteTexture + * @type {WebGLTexture} + * @readonly + * @since 3.50.0 + */ + this.whiteTexture = null; + /** * A default Camera used in calls when no other camera has been provided. * @@ -826,11 +837,10 @@ var WebGLRenderer = new Class({ var multi = this.pipelines.get(PIPELINE_CONST.MULTI_PIPELINE); - var blank = game.textures.getFrame('__DEFAULT'); + this.blankTexture = game.textures.getFrame('__DEFAULT'); + this.whiteTexture = game.textures.getFrame('__WHITE'); - multi.currentFrame = blank; - - this.blankTexture = blank; + multi.currentFrame = this.whiteTexture; var gl = this.gl; From e368c479a04cf5b9364e2a292560d88f8524107d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 14:54:58 +0100 Subject: [PATCH 093/153] The `TextureManager` now generates a new texture with the key `__WHITE` durings its boot process. This is a pure white 4x4 texture used by the Graphics pipelines. --- src/textures/TextureManager.js | 57 ++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/src/textures/TextureManager.js b/src/textures/TextureManager.js index da04abff5..c676be456 100644 --- a/src/textures/TextureManager.js +++ b/src/textures/TextureManager.js @@ -123,13 +123,16 @@ var TextureManager = new Class({ */ boot: function () { - this._pending = 2; - this.on(Events.LOAD, this.updatePending, this); this.on(Events.ERROR, this.updatePending, this); - this.addBase64('__DEFAULT', this.game.config.defaultImage); - this.addBase64('__MISSING', this.game.config.missingImage); + var config = this.game.config; + + this.addBase64('__DEFAULT', config.defaultImage); + this.addBase64('__MISSING', config.missingImage); + this.addBase64('__WHITE', config.whiteImage); + + this._pending = 3; this.game.events.once(GameEvents.DESTROY, this.destroy, this); }, @@ -252,7 +255,7 @@ var TextureManager = new Class({ * * @param {string} key - The unique string-based key of the Texture. * @param {*} data - The Base64 encoded data. - * + * * @return {this} This Texture Manager instance. */ addBase64: function (key, data) @@ -287,9 +290,9 @@ var TextureManager = new Class({ /** * Gets an existing texture frame and converts it into a base64 encoded image and returns the base64 data. - * + * * You can also provide the image type and encoder options. - * + * * This will only work with bitmap based texture frames, such as those created from Texture Atlases. * It will not work with GL Texture objects, such as Shaders, or Render Textures. For those please * see the WebGL Snapshot function instead. @@ -301,7 +304,7 @@ var TextureManager = new Class({ * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture. * @param {string} [type='image/png'] - A DOMString indicating the image format. The default format type is image/png. * @param {number} [encoderOptions=0.92] - A Number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp. If this argument is anything else, the default value for image quality is used. The default value is 0.92. Other arguments are ignored. - * + * * @return {string} The base64 encoded data, or an empty string if the texture frame could not be found. */ getBase64: function (key, frame, type, encoderOptions) @@ -374,15 +377,15 @@ var TextureManager = new Class({ this.emit(Events.ADD, key, texture); } - + return texture; }, /** * Takes a WebGL Texture and creates a Phaser Texture from it, which is added to the Texture Manager using the given key. - * + * * This allows you to then use the Texture as a normal texture for texture based Game Objects like Sprites. - * + * * This is a WebGL only feature. * * @method Phaser.Textures.TextureManager#addGLTexture @@ -408,7 +411,7 @@ var TextureManager = new Class({ this.emit(Events.ADD, key, texture); } - + return texture; }, @@ -437,17 +440,17 @@ var TextureManager = new Class({ this.emit(Events.ADD, key, texture); } - + return texture; }, /** * Creates a new Texture using the given config values. - * + * * Generated textures consist of a Canvas element to which the texture data is drawn. - * + * * Generates a texture based on the given Create configuration object. - * + * * The texture is drawn using a fixed-size indexed palette of 16 colors, where the hex value in the * data cells map to a single color. For example, if the texture config looked like this: * @@ -466,14 +469,14 @@ var TextureManager = new Class({ * '.27887.78872.', * '.787.....787.' * ]; - * + * * this.textures.generate('star', { data: star, pixelWidth: 4 }); * ``` - * + * * Then it would generate a texture that is 52 x 48 pixels in size, because each cell of the data array * represents 1 pixel multiplied by the `pixelWidth` value. The cell values, such as `8`, maps to color * number 8 in the palette. If a cell contains a period character `.` then it is transparent. - * + * * The default palette is Arne16, but you can specify your own using the `palette` property. * * @method Phaser.Textures.TextureManager#generate @@ -717,7 +720,7 @@ var TextureManager = new Class({ if (this.checkKey(key)) { texture = this.create(key, source); - + Parser.AtlasXML(texture, 0, data); if (dataSource) @@ -899,11 +902,11 @@ var TextureManager = new Class({ /** * Returns a Texture from the Texture Manager that matches the given key. - * + * * If the key is `undefined` it will return the `__DEFAULT` Texture. - * + * * If the key is an instance of a Texture, it will return the key directly. - * + * * Finally. if the key is given, but not found and not a Texture instance, it will return the `__MISSING` Texture. * * @method Phaser.Textures.TextureManager#get @@ -1076,9 +1079,9 @@ var TextureManager = new Class({ ctx.clearRect(0, 0, 1, 1); ctx.drawImage(textureFrame.source.image, x, y, 1, 1, 0, 0, 1, 1); - + var rgb = ctx.getImageData(0, 0, 1, 1); - + return rgb.data[3]; } } @@ -1112,9 +1115,9 @@ var TextureManager = new Class({ /** * Changes the key being used by a Texture to the new key provided. - * + * * The old key is removed, allowing it to be re-used. - * + * * Game Objects are linked to Textures by a reference to the Texture object, so * all existing references will be retained. * From 4795c56d79b9c0e0020f2c10b9e30c86434a135c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 14:57:08 +0100 Subject: [PATCH 094/153] `Config.images.white` is a new Game Config property that specifies the 4x4 white PNG texture used by Graphics rendering. You can override this via the config, but only do so if needed. --- src/core/Config.js | 5 +++++ src/core/typedefs/ImagesConfig.js | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/Config.js b/src/core/Config.js index e4f287529..38d861e1f 100644 --- a/src/core/Config.js +++ b/src/core/Config.js @@ -566,6 +566,11 @@ var Config = new Class({ */ this.missingImage = GetValue(config, 'images.missing', pngPrefix + 'CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=='); + /** + * @const {string} Phaser.Core.Config#whiteImage - A base64 encoded PNG that will be used as the default texture when a texture is assigned that is white or not loaded. + */ + this.whiteImage = GetValue(config, 'images.white', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC'); + if (window) { if (window.FORCE_WEBGL) diff --git a/src/core/typedefs/ImagesConfig.js b/src/core/typedefs/ImagesConfig.js index 81051f396..3879e02e9 100644 --- a/src/core/typedefs/ImagesConfig.js +++ b/src/core/typedefs/ImagesConfig.js @@ -2,6 +2,7 @@ * @typedef {object} Phaser.Types.Core.ImagesConfig * @since 3.0.0 * - * @property {string} [default] - URL to use for the 'default' texture. - * @property {string} [missing] - URL to use for the 'missing' texture. + * @property {string} [default] - A base64 encoded image file to use as the 'default' texture. + * @property {string} [missing] - A base64 encoded image file to use as the 'missing' texture. + * @property {string} [white] - A base64 encoded image file to use as the 'white' texture. */ From 8d25510b61956074b09a2ef966247335f69d7ac9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:01:40 +0100 Subject: [PATCH 095/153] `GameObjects.GetCalcMatrix` is a new function that is used to calculate the transformed Game Object matrix, based on the given Game Object, Camera and Parent. This function is now used by the following Game Objects: `BitmapText` (Static and Dynamic), `Graphics`, `Mesh`, `Rope`, `Shader`, `Arc`, `Curve`, `Ellipse`, `Grid`, `IsoBox`, `IsoTriangle`, `Line`, `Polygon`, `Rectangle`, `Star` and `Triangle`. This dramatically reduces the amount of duplicate code across the API. --- src/gameobjects/GetCalcMatrix.js | 65 +++++++++++++++++++ .../dynamic/DynamicBitmapTextWebGLRenderer.js | 34 ++-------- .../static/BitmapTextWebGLRenderer.js | 30 +-------- .../graphics/GraphicsWebGLRenderer.js | 4 +- src/gameobjects/mesh/MeshWebGLRenderer.js | 60 ++++------------- src/gameobjects/rope/RopeWebGLRenderer.js | 32 +-------- src/gameobjects/shader/ShaderWebGLRenderer.js | 27 +------- src/gameobjects/shape/FillPathWebGL.js | 2 +- src/gameobjects/shape/StrokePathWebGL.js | 2 +- src/gameobjects/shape/arc/ArcWebGLRenderer.js | 26 +------- .../shape/curve/CurveWebGLRenderer.js | 26 +------- .../shape/ellipse/EllipseWebGLRenderer.js | 26 +------- .../shape/grid/GridWebGLRenderer.js | 32 ++------- .../shape/isobox/IsoBoxWebGLRenderer.js | 38 +++-------- .../isotriangle/IsoTriangleWebGLRenderer.js | 38 +++-------- .../shape/line/LineWebGLRenderer.js | 29 ++------- .../shape/polygon/PolygonWebGLRenderer.js | 26 +------- .../shape/rectangle/RectangleWebGLRenderer.js | 28 ++------ .../shape/star/StarWebGLRenderer.js | 26 +------- .../shape/triangle/TriangleWebGLRenderer.js | 32 ++------- 20 files changed, 150 insertions(+), 433 deletions(-) create mode 100644 src/gameobjects/GetCalcMatrix.js diff --git a/src/gameobjects/GetCalcMatrix.js b/src/gameobjects/GetCalcMatrix.js new file mode 100644 index 000000000..be5500b72 --- /dev/null +++ b/src/gameobjects/GetCalcMatrix.js @@ -0,0 +1,65 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var TransformMatrix = require('./components/TransformMatrix'); + +var tempMatrix1 = new TransformMatrix(); +var tempMatrix2 = new TransformMatrix(); +var tempMatrix3 = new TransformMatrix(); + +var result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 }; + +/** + * Calculates the Transform Matrix of the given Game Object and Camera, factoring in + * the parent matrix if provided. + * + * Note that the object this results contains _references_ to the Transform Matrices, + * not new instances of them. Therefore, you should use their values immediately, or + * copy them to your own matrix, as they will be replaced as soon as another Game + * Object is rendered. + * + * @function Phaser.GameObjects.GetCalcMatrix + * @memberof Phaser.GameObjects + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any. + * + * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices. + */ +var GetCalcMatrix = function (src, camera, parentMatrix) +{ + var camMatrix = tempMatrix1; + var spriteMatrix = tempMatrix2; + var calcMatrix = tempMatrix3; + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); + + camMatrix.copyFrom(camera.matrix); + + if (parentMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = src.x; + spriteMatrix.f = src.y; + } + else + { + spriteMatrix.e -= camera.scrollX * src.scrollFactorX; + spriteMatrix.f -= camera.scrollY * src.scrollFactorY; + } + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + + return result; +}; + +module.exports = GetCalcMatrix; diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js index c6318c1c9..a9f30285c 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../../GetCalcMatrix'); var Utils = require('../../../renderer/webgl/Utils'); /** @@ -33,36 +34,13 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, src, interpolationPerce var pipeline = renderer.pipelines.set(this.pipeline, src); - var camMatrix = pipeline._tempMatrix1; - var spriteMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; + var result = GetCalcMatrix(src, camera, parentMatrix); + + var spriteMatrix = result.sprite; + var calcMatrix = result.calc; + var fontMatrix = pipeline._tempMatrix4; - spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - spriteMatrix.e = src.x; - spriteMatrix.f = src.y; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - else - { - spriteMatrix.e -= camera.scrollX * src.scrollFactorX; - spriteMatrix.f -= camera.scrollY * src.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - var crop = (src.cropWidth > 0 || src.cropHeight > 0); if (crop) diff --git a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js index 495f32bb0..de7801448 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js @@ -5,6 +5,7 @@ */ var BatchChar = require('../BatchChar'); +var GetCalcMatrix = require('../../GetCalcMatrix'); var Utils = require('../../../renderer/webgl/Utils'); /** @@ -34,34 +35,7 @@ var BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, var pipeline = renderer.pipelines.set(this.pipeline, src); - var camMatrix = pipeline._tempMatrix1; - var spriteMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; - - spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - spriteMatrix.e = src.x; - spriteMatrix.f = src.y; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - else - { - spriteMatrix.e -= camera.scrollX * src.scrollFactorX; - spriteMatrix.f -= camera.scrollY * src.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } + var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; var roundPixels = camera.roundPixels; diff --git a/src/gameobjects/graphics/GraphicsWebGLRenderer.js b/src/gameobjects/graphics/GraphicsWebGLRenderer.js index 29e64f028..e6852ab3f 100644 --- a/src/gameobjects/graphics/GraphicsWebGLRenderer.js +++ b/src/gameobjects/graphics/GraphicsWebGLRenderer.js @@ -100,10 +100,10 @@ var GraphicsWebGLRenderer = function (renderer, src, interpolationPercentage, ca var pathOpen = false; var lastPath = null; - var getTint = Utils.getTintAppendFloatAlphaAndSwap; + var getTint = Utils.getTintAppendFloatAlpha; // Set to a white texture, not a blank one, so Lights2D works too! - var currentTexture = renderer.tempTextures[0]; + var currentTexture = renderer.whiteTexture; for (var cmdIndex = 0; cmdIndex < commands.length; cmdIndex++) { diff --git a/src/gameobjects/mesh/MeshWebGLRenderer.js b/src/gameobjects/mesh/MeshWebGLRenderer.js index 4060d4699..59e16c1f4 100644 --- a/src/gameobjects/mesh/MeshWebGLRenderer.js +++ b/src/gameobjects/mesh/MeshWebGLRenderer.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../GetCalcMatrix'); var Utils = require('../../renderer/webgl/Utils'); /** @@ -25,42 +26,10 @@ var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera { var pipeline = renderer.pipelines.set(this.pipeline, src); - var camMatrix = pipeline._tempMatrix1; - var spriteMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; - - spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - spriteMatrix.e = src.x; - spriteMatrix.f = src.y; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - else - { - spriteMatrix.e -= camera.scrollX * src.scrollFactorX; - spriteMatrix.f -= camera.scrollY * src.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } + var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; var vertices = src.vertices; - var uvs = src.uv; - var colors = src.colors; - var alphas = src.alphas; - - var meshVerticesLength = vertices.length; - var vertexCount = Math.floor(meshVerticesLength * 0.5); + var vertexCount = Math.floor(vertices.length); if (pipeline.vertexCount + vertexCount > pipeline.vertexCapacity) { @@ -74,19 +43,17 @@ var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera var vertexOffset = (pipeline.vertexCount * pipeline.vertexComponentCount) - 1; - var colorIndex = 0; var tintEffect = src.tintFill; var debugCallback = src.debugCallback; var debugVerts = []; - for (var i = 0; i < meshVerticesLength; i += 2) + for (var i = 0; i < vertexCount; i++) { - var x = vertices[i + 0]; - var y = vertices[i + 1]; + var vertex = vertices[i]; - var tx = x * calcMatrix.a + y * calcMatrix.c + calcMatrix.e; - var ty = x * calcMatrix.b + y * calcMatrix.d + calcMatrix.f; + var tx = vertex.x * calcMatrix.a + vertex.y * calcMatrix.c + calcMatrix.e; + var ty = vertex.x * calcMatrix.b + vertex.y * calcMatrix.d + calcMatrix.f; if (camera.roundPixels) { @@ -96,26 +63,23 @@ var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera if (debugCallback) { - debugVerts[i + 0] = tx; - debugVerts[i + 1] = ty; + debugVerts.push(tx, ty); } vertexViewF32[++vertexOffset] = tx; vertexViewF32[++vertexOffset] = ty; - vertexViewF32[++vertexOffset] = uvs[i + 0]; - vertexViewF32[++vertexOffset] = uvs[i + 1]; + vertexViewF32[++vertexOffset] = vertex.u; + vertexViewF32[++vertexOffset] = vertex.v; vertexViewF32[++vertexOffset] = textureUnit; vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = Utils.getTintAppendFloatAlpha(colors[colorIndex], camera.alpha * src.alpha * alphas[colorIndex]); - - colorIndex++; + vertexViewU32[++vertexOffset] = Utils.getTintAppendFloatAlpha(vertex.color, camera.alpha * src.alpha * vertex.alpha); } pipeline.vertexCount += vertexCount; if (debugCallback) { - debugCallback.call(src, src, meshVerticesLength, debugVerts); + debugCallback.call(src, src, vertexCount * 2, debugVerts); } }; diff --git a/src/gameobjects/rope/RopeWebGLRenderer.js b/src/gameobjects/rope/RopeWebGLRenderer.js index 57266cb20..34ba5fc83 100644 --- a/src/gameobjects/rope/RopeWebGLRenderer.js +++ b/src/gameobjects/rope/RopeWebGLRenderer.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../GetCalcMatrix'); var Utils = require('../../renderer/webgl/Utils'); /** @@ -25,41 +26,14 @@ var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera { var pipeline = renderer.pipelines.set(src.pipeline, src); - var camMatrix = pipeline._tempMatrix1; - var spriteMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; - - spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - spriteMatrix.e = src.x; - spriteMatrix.f = src.y; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - else - { - spriteMatrix.e -= camera.scrollX * src.scrollFactorX; - spriteMatrix.f -= camera.scrollY * src.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } + var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; var vertices = src.vertices; var uvs = src.uv; var colors = src.colors; var alphas = src.alphas; var alpha = src.alpha; - var getTint = Utils.getTintAppendFloatAlphaAndSwap; + var getTint = Utils.getTintAppendFloatAlpha; var roundPixels = camera.roundPixels; var meshVerticesLength = vertices.length; diff --git a/src/gameobjects/shader/ShaderWebGLRenderer.js b/src/gameobjects/shader/ShaderWebGLRenderer.js index 441a1fed6..47637dcd1 100644 --- a/src/gameobjects/shader/ShaderWebGLRenderer.js +++ b/src/gameobjects/shader/ShaderWebGLRenderer.js @@ -4,6 +4,8 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../GetCalcMatrix'); + /** * Renders this Game Object with the WebGL Renderer to the given Camera. * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. @@ -35,30 +37,7 @@ var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, came } else { - var camMatrix = src._tempMatrix1; - var shapeMatrix = src._tempMatrix2; - var calcMatrix = src._tempMatrix3; - - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - camMatrix.multiply(shapeMatrix, calcMatrix); + var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; // Renderer size changed? if (renderer.width !== src._rendererWidth || renderer.height !== src._rendererHeight) diff --git a/src/gameobjects/shape/FillPathWebGL.js b/src/gameobjects/shape/FillPathWebGL.js index c1eb0c106..47161624f 100644 --- a/src/gameobjects/shape/FillPathWebGL.js +++ b/src/gameobjects/shape/FillPathWebGL.js @@ -22,7 +22,7 @@ var Utils = require('../../renderer/webgl/Utils'); */ var FillPathWebGL = function (pipeline, calcMatrix, src, alpha, dx, dy) { - var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha); + var fillTintColor = Utils.getTintAppendFloatAlpha(src.fillColor, src.fillAlpha * alpha); var path = src.pathData; var pathIndexes = src.pathIndexes; diff --git a/src/gameobjects/shape/StrokePathWebGL.js b/src/gameobjects/shape/StrokePathWebGL.js index 88c12f546..7c3f5942e 100644 --- a/src/gameobjects/shape/StrokePathWebGL.js +++ b/src/gameobjects/shape/StrokePathWebGL.js @@ -22,7 +22,7 @@ var Utils = require('../../renderer/webgl/Utils'); var StrokePathWebGL = function (pipeline, src, alpha, dx, dy) { var strokeTint = pipeline.strokeTint; - var strokeTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.strokeColor, src.strokeAlpha * alpha); + var strokeTintColor = Utils.getTintAppendFloatAlpha(src.strokeColor, src.strokeAlpha * alpha); strokeTint.TL = strokeTintColor; strokeTint.TR = strokeTintColor; diff --git a/src/gameobjects/shape/arc/ArcWebGLRenderer.js b/src/gameobjects/shape/arc/ArcWebGLRenderer.js index 104aad9d3..4f5a755c2 100644 --- a/src/gameobjects/shape/arc/ArcWebGLRenderer.js +++ b/src/gameobjects/shape/arc/ArcWebGLRenderer.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../../GetCalcMatrix'); var FillPathWebGL = require('../FillPathWebGL'); var StrokePathWebGL = require('../StrokePathWebGL'); @@ -26,30 +27,9 @@ var ArcWebGLRenderer = function (renderer, src, interpolationPercentage, camera, { var pipeline = renderer.pipelines.set(this.pipeline); - var camMatrix = pipeline._tempMatrix1; - var shapeMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; + var result = GetCalcMatrix(src, camera, parentMatrix); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - camMatrix.multiply(shapeMatrix, calcMatrix); + var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc); var dx = src._displayOriginX; var dy = src._displayOriginY; diff --git a/src/gameobjects/shape/curve/CurveWebGLRenderer.js b/src/gameobjects/shape/curve/CurveWebGLRenderer.js index 374183a41..4e2689044 100644 --- a/src/gameobjects/shape/curve/CurveWebGLRenderer.js +++ b/src/gameobjects/shape/curve/CurveWebGLRenderer.js @@ -5,6 +5,7 @@ */ var FillPathWebGL = require('../FillPathWebGL'); +var GetCalcMatrix = require('../../GetCalcMatrix'); var StrokePathWebGL = require('../StrokePathWebGL'); /** @@ -26,30 +27,9 @@ var CurveWebGLRenderer = function (renderer, src, interpolationPercentage, camer { var pipeline = renderer.pipelines.set(this.pipeline); - var camMatrix = pipeline._tempMatrix1; - var shapeMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; + var result = GetCalcMatrix(src, camera, parentMatrix); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - camMatrix.multiply(shapeMatrix, calcMatrix); + var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc); var dx = src._displayOriginX + src._curveBounds.x; var dy = src._displayOriginY + src._curveBounds.y; diff --git a/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js b/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js index 601758d1c..6b3137fe8 100644 --- a/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js +++ b/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js @@ -5,6 +5,7 @@ */ var FillPathWebGL = require('../FillPathWebGL'); +var GetCalcMatrix = require('../../GetCalcMatrix'); var StrokePathWebGL = require('../StrokePathWebGL'); /** @@ -26,30 +27,9 @@ var EllipseWebGLRenderer = function (renderer, src, interpolationPercentage, cam { var pipeline = renderer.pipelines.set(this.pipeline); - var camMatrix = pipeline._tempMatrix1; - var shapeMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; + var result = GetCalcMatrix(src, camera, parentMatrix); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - camMatrix.multiply(shapeMatrix, calcMatrix); + var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc); var dx = src._displayOriginX; var dy = src._displayOriginY; diff --git a/src/gameobjects/shape/grid/GridWebGLRenderer.js b/src/gameobjects/shape/grid/GridWebGLRenderer.js index 1b02ab90f..2ba435f50 100644 --- a/src/gameobjects/shape/grid/GridWebGLRenderer.js +++ b/src/gameobjects/shape/grid/GridWebGLRenderer.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../../GetCalcMatrix'); var Utils = require('../../../renderer/webgl/Utils'); /** @@ -25,30 +26,9 @@ var GridWebGLRenderer = function (renderer, src, interpolationPercentage, camera { var pipeline = renderer.pipelines.set(this.pipeline); - var camMatrix = pipeline._tempMatrix1; - var shapeMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; + var result = GetCalcMatrix(src, camera, parentMatrix); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - camMatrix.multiply(shapeMatrix, calcMatrix); + var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc); calcMatrix.translate(-src._displayOriginX, -src._displayOriginY); @@ -106,7 +86,7 @@ var GridWebGLRenderer = function (renderer, src, interpolationPercentage, camera if (showCells && src.fillAlpha > 0) { fillTint = pipeline.fillTint; - fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha); + fillTintColor = Utils.getTintAppendFloatAlpha(src.fillColor, src.fillAlpha * alpha); fillTint.TL = fillTintColor; fillTint.TR = fillTintColor; @@ -146,7 +126,7 @@ var GridWebGLRenderer = function (renderer, src, interpolationPercentage, camera if (showAltCells && src.altFillAlpha > 0) { fillTint = pipeline.fillTint; - fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.altFillColor, src.altFillAlpha * alpha); + fillTintColor = Utils.getTintAppendFloatAlpha(src.altFillColor, src.altFillAlpha * alpha); fillTint.TL = fillTintColor; fillTint.TR = fillTintColor; @@ -186,7 +166,7 @@ var GridWebGLRenderer = function (renderer, src, interpolationPercentage, camera if (showOutline && src.outlineFillAlpha > 0) { var strokeTint = pipeline.strokeTint; - var color = Utils.getTintAppendFloatAlphaAndSwap(src.outlineFillColor, src.outlineFillAlpha * alpha); + var color = Utils.getTintAppendFloatAlpha(src.outlineFillColor, src.outlineFillAlpha * alpha); strokeTint.TL = color; strokeTint.TR = color; diff --git a/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js b/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js index 7e9c832ce..f1158d67b 100644 --- a/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js +++ b/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../../GetCalcMatrix'); var Utils = require('../../../renderer/webgl/Utils'); /** @@ -25,30 +26,9 @@ var IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, came { var pipeline = renderer.pipelines.set(this.pipeline); - var camMatrix = pipeline._tempMatrix1; - var shapeMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; + var result = GetCalcMatrix(src, camera, parentMatrix); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - camMatrix.multiply(shapeMatrix, calcMatrix); + var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc); var size = src.width; var height = src.height; @@ -83,7 +63,7 @@ var IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, came if (src.showTop) { - tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillTop, alpha); + tint = Utils.getTintAppendFloatAlpha(src.fillTop, alpha); x0 = calcMatrix.getX(-sizeA, -height); y0 = calcMatrix.getY(-sizeA, -height); @@ -97,14 +77,14 @@ var IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, came x3 = calcMatrix.getX(0, sizeB - height); y3 = calcMatrix.getY(0, sizeB - height); - pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2); + pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 1); } // Left Face if (src.showLeft) { - tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillLeft, alpha); + tint = Utils.getTintAppendFloatAlpha(src.fillLeft, alpha); x0 = calcMatrix.getX(-sizeA, 0); y0 = calcMatrix.getY(-sizeA, 0); @@ -118,14 +98,14 @@ var IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, came x3 = calcMatrix.getX(-sizeA, -height); y3 = calcMatrix.getY(-sizeA, -height); - pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2); + pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 1); } // Right Face if (src.showRight) { - tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillRight, alpha); + tint = Utils.getTintAppendFloatAlpha(src.fillRight, alpha); x0 = calcMatrix.getX(sizeA, 0); y0 = calcMatrix.getY(sizeA, 0); @@ -139,7 +119,7 @@ var IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, came x3 = calcMatrix.getX(sizeA, -height); y3 = calcMatrix.getY(sizeA, -height); - pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2); + pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 1); } }; diff --git a/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js b/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js index 42e346ff3..0bf35c9e5 100644 --- a/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js +++ b/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../../GetCalcMatrix'); var Utils = require('../../../renderer/webgl/Utils'); /** @@ -25,30 +26,9 @@ var IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, { var pipeline = renderer.pipelines.set(this.pipeline); - var camMatrix = pipeline._tempMatrix1; - var shapeMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; + var result = GetCalcMatrix(src, camera, parentMatrix); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - camMatrix.multiply(shapeMatrix, calcMatrix); + var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc); var size = src.width; var height = src.height; @@ -82,7 +62,7 @@ var IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, if (src.showTop && reversed) { - tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillTop, alpha); + tint = Utils.getTintAppendFloatAlpha(src.fillTop, alpha); x0 = calcMatrix.getX(-sizeA, -height); y0 = calcMatrix.getY(-sizeA, -height); @@ -96,14 +76,14 @@ var IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, var x3 = calcMatrix.getX(0, sizeB - height); var y3 = calcMatrix.getY(0, sizeB - height); - pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2); + pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 1); } // Left Face if (src.showLeft) { - tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillLeft, alpha); + tint = Utils.getTintAppendFloatAlpha(src.fillLeft, alpha); if (reversed) { @@ -128,14 +108,14 @@ var IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, y2 = calcMatrix.getY(0, sizeB - height); } - pipeline.batchTri(x0, y0, x1, y1, x2, y2, 0, 0, 1, 1, tint, tint, tint, 2); + pipeline.batchTri(x0, y0, x1, y1, x2, y2, 0, 0, 1, 1, tint, tint, tint, 1); } // Right Face if (src.showRight) { - tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillRight, alpha); + tint = Utils.getTintAppendFloatAlpha(src.fillRight, alpha); if (reversed) { @@ -160,7 +140,7 @@ var IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, y2 = calcMatrix.getY(0, sizeB - height); } - pipeline.batchTri(x0, y0, x1, y1, x2, y2, 0, 0, 1, 1, tint, tint, tint, 2); + pipeline.batchTri(x0, y0, x1, y1, x2, y2, 0, 0, 1, 1, tint, tint, tint, 1); } }; diff --git a/src/gameobjects/shape/line/LineWebGLRenderer.js b/src/gameobjects/shape/line/LineWebGLRenderer.js index c6cb63b06..89979d144 100644 --- a/src/gameobjects/shape/line/LineWebGLRenderer.js +++ b/src/gameobjects/shape/line/LineWebGLRenderer.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../../GetCalcMatrix'); var Utils = require('../../../renderer/webgl/Utils'); /** @@ -25,27 +26,9 @@ var LineWebGLRenderer = function (renderer, src, interpolationPercentage, camera { var pipeline = renderer.pipelines.set(this.pipeline); - var camMatrix = pipeline._tempMatrix1; - var shapeMatrix = pipeline._tempMatrix2; + var result = GetCalcMatrix(src, camera, parentMatrix); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } + pipeline._tempMatrix3.copyFrom(result.calc); var dx = src._displayOriginX; var dy = src._displayOriginY; @@ -54,7 +37,7 @@ var LineWebGLRenderer = function (renderer, src, interpolationPercentage, camera if (src.isStroked) { var strokeTint = pipeline.strokeTint; - var color = Utils.getTintAppendFloatAlphaAndSwap(src.strokeColor, src.strokeAlpha * alpha); + var color = Utils.getTintAppendFloatAlpha(src.strokeColor, src.strokeAlpha * alpha); strokeTint.TL = color; strokeTint.TR = color; @@ -76,8 +59,8 @@ var LineWebGLRenderer = function (renderer, src, interpolationPercentage, camera 1, 0, false, - shapeMatrix, - camMatrix + result.sprite, + result.camera ); } }; diff --git a/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js b/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js index e4b674254..d39efd146 100644 --- a/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js +++ b/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js @@ -5,6 +5,7 @@ */ var FillPathWebGL = require('../FillPathWebGL'); +var GetCalcMatrix = require('../../GetCalcMatrix'); var StrokePathWebGL = require('../StrokePathWebGL'); /** @@ -26,30 +27,9 @@ var PolygonWebGLRenderer = function (renderer, src, interpolationPercentage, cam { var pipeline = renderer.pipelines.set(this.pipeline); - var camMatrix = pipeline._tempMatrix1; - var shapeMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; + var result = GetCalcMatrix(src, camera, parentMatrix); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - camMatrix.multiply(shapeMatrix, calcMatrix); + var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc); var dx = src._displayOriginX; var dy = src._displayOriginY; diff --git a/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js b/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js index ce9b5c032..fcd2277a7 100644 --- a/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js +++ b/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../../GetCalcMatrix'); var StrokePathWebGL = require('../StrokePathWebGL'); var Utils = require('../../../renderer/webgl/Utils'); @@ -26,30 +27,9 @@ var RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, c { var pipeline = renderer.pipelines.set(this.pipeline); - var camMatrix = pipeline._tempMatrix1; - var shapeMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; + var result = GetCalcMatrix(src, camera, parentMatrix); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - camMatrix.multiply(shapeMatrix, calcMatrix); + pipeline._tempMatrix3.copyFrom(result.calc); var dx = src._displayOriginX; var dy = src._displayOriginY; @@ -58,7 +38,7 @@ var RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, c if (src.isFilled) { var fillTint = pipeline.fillTint; - var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha); + var fillTintColor = Utils.getTintAppendFloatAlpha(src.fillColor, src.fillAlpha * alpha); fillTint.TL = fillTintColor; fillTint.TR = fillTintColor; diff --git a/src/gameobjects/shape/star/StarWebGLRenderer.js b/src/gameobjects/shape/star/StarWebGLRenderer.js index 3ee086f02..7da1b9d6c 100644 --- a/src/gameobjects/shape/star/StarWebGLRenderer.js +++ b/src/gameobjects/shape/star/StarWebGLRenderer.js @@ -5,6 +5,7 @@ */ var FillPathWebGL = require('../FillPathWebGL'); +var GetCalcMatrix = require('../../GetCalcMatrix'); var StrokePathWebGL = require('../StrokePathWebGL'); /** @@ -26,30 +27,9 @@ var StarWebGLRenderer = function (renderer, src, interpolationPercentage, camera { var pipeline = renderer.pipelines.set(this.pipeline); - var camMatrix = pipeline._tempMatrix1; - var shapeMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; + var result = GetCalcMatrix(src, camera, parentMatrix); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - camMatrix.multiply(shapeMatrix, calcMatrix); + var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc); var dx = src._displayOriginX; var dy = src._displayOriginY; diff --git a/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js b/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js index e1293e650..91cb985ae 100644 --- a/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js +++ b/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../../GetCalcMatrix'); var StrokePathWebGL = require('../StrokePathWebGL'); var Utils = require('../../../renderer/webgl/Utils'); @@ -26,30 +27,9 @@ var TriangleWebGLRenderer = function (renderer, src, interpolationPercentage, ca { var pipeline = renderer.pipelines.set(this.pipeline); - var camMatrix = pipeline._tempMatrix1; - var shapeMatrix = pipeline._tempMatrix2; - var calcMatrix = pipeline._tempMatrix3; + var result = GetCalcMatrix(src, camera, parentMatrix); - shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - shapeMatrix.e = src.x; - shapeMatrix.f = src.y; - } - else - { - shapeMatrix.e -= camera.scrollX * src.scrollFactorX; - shapeMatrix.f -= camera.scrollY * src.scrollFactorY; - } - - camMatrix.multiply(shapeMatrix, calcMatrix); + pipeline._tempMatrix3.copyFrom(result.calc); var dx = src._displayOriginX; var dy = src._displayOriginY; @@ -58,7 +38,7 @@ var TriangleWebGLRenderer = function (renderer, src, interpolationPercentage, ca if (src.isFilled) { var fillTint = pipeline.fillTint; - var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha); + var fillTintColor = Utils.getTintAppendFloatAlpha(src.fillColor, src.fillAlpha * alpha); fillTint.TL = fillTintColor; fillTint.TR = fillTintColor; @@ -81,8 +61,8 @@ var TriangleWebGLRenderer = function (renderer, src, interpolationPercentage, ca y2, x3, y3, - shapeMatrix, - camMatrix + result.sprite, + result.camera ); } From 194257d1991b8f61c3ee94a44f633d9d37eea8bd Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:01:45 +0100 Subject: [PATCH 096/153] Create GetCalcMatrixResults.js --- src/gameobjects/typedefs/GetCalcMatrixResults.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/gameobjects/typedefs/GetCalcMatrixResults.js diff --git a/src/gameobjects/typedefs/GetCalcMatrixResults.js b/src/gameobjects/typedefs/GetCalcMatrixResults.js new file mode 100644 index 000000000..107089cf6 --- /dev/null +++ b/src/gameobjects/typedefs/GetCalcMatrixResults.js @@ -0,0 +1,8 @@ +/** + * @typedef {object} Phaser.Types.GameObjects.GetCalcMatrixResults + * @since 3.50.0 + * + * @property {Phaser.GameObjects.Components.TransformMatrix} camera - The calculated Camera matrix. + * @property {Phaser.GameObjects.Components.TransformMatrix} sprite - The calculated Sprite (Game Object) matrix. + * @property {Phaser.GameObjects.Components.TransformMatrix} calc - The calculated results matrix, factoring all others in. + */ From 951457c8813f34fa643623311bbee1ccae0b5557 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:02:13 +0100 Subject: [PATCH 097/153] As a result of the change to the shader, all uses of the WebGL Util function `getTintAppendFloatAlphaAndSwap` have been replaced with `getTintAppendFloatAlpha` instead. --- src/gameobjects/particles/ParticleManagerWebGLRenderer.js | 2 +- src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gameobjects/particles/ParticleManagerWebGLRenderer.js b/src/gameobjects/particles/ParticleManagerWebGLRenderer.js index 01c19feb7..54dbabfb2 100644 --- a/src/gameobjects/particles/ParticleManagerWebGLRenderer.js +++ b/src/gameobjects/particles/ParticleManagerWebGLRenderer.js @@ -42,7 +42,7 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpola var roundPixels = camera.roundPixels; var texture = emitterManager.defaultFrame.glTexture; - var getTint = Utils.getTintAppendFloatAlphaAndSwap; + var getTint = Utils.getTintAppendFloatAlpha; var textureUnit = pipeline.setGameObject(emitterManager, emitterManager.defaultFrame); diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js index 3ff323586..fb73be46d 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js @@ -36,7 +36,7 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer var gidMap = src.gidMap; var pipeline = renderer.pipelines.set(src.pipeline); - var getTint = Utils.getTintAppendFloatAlphaAndSwap; + var getTint = Utils.getTintAppendFloatAlpha; var scrollFactorX = src.scrollFactorX; var scrollFactorY = src.scrollFactorY; From 87c8e75eced5c082c611fadc73fe697655df6037 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:02:21 +0100 Subject: [PATCH 098/153] Updated JSDocs --- src/gameobjects/rope/Rope.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/rope/Rope.js b/src/gameobjects/rope/Rope.js index 3def2fe74..1312f62b8 100644 --- a/src/gameobjects/rope/Rope.js +++ b/src/gameobjects/rope/Rope.js @@ -948,9 +948,10 @@ var Rope = new Class({ /** * This method enables rendering of the Rope vertices to the given Graphics instance. * - * If you enable this feature, you must call `Graphics.clear()` in your Scene `update`, - * otherwise the Graphics instance will fill-in with draw calls. This is not done automatically - * to allow for you to debug render multiple Rope objects to a single Graphics instance. + * If you enable this feature, you **must** call `Graphics.clear()` in your Scene `update`, + * otherwise the Graphics instance you provide to debug will fill-up with draw calls, + * eventually crashing the browser. This is not done automatically to allow you to debug + * draw multiple Rope objects to a single Graphics instance. * * The Rope class has a built-in debug rendering callback `Rope.renderDebugVerts`, however * you can also provide your own callback to be used instead. Do this by setting the `callback` parameter. From 3fa0070e50a570a8d084569da3a6cc76f502ba55 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:03:04 +0100 Subject: [PATCH 099/153] Now uses white texture and tintEffect mode 1 --- src/renderer/webgl/pipelines/MultiPipeline.js | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/renderer/webgl/pipelines/MultiPipeline.js b/src/renderer/webgl/pipelines/MultiPipeline.js index 3b7ac0f2d..8c34b22e2 100644 --- a/src/renderer/webgl/pipelines/MultiPipeline.js +++ b/src/renderer/webgl/pipelines/MultiPipeline.js @@ -362,7 +362,7 @@ var MultiPipeline = new Class({ */ setTexture2D: function (texture) { - if (texture === undefined) { texture = this.renderer.blankTexture.glTexture; } + if (texture === undefined) { texture = this.renderer.whiteTexture.glTexture; } this.currentUnit = this.renderer.setTexture2D(texture); @@ -500,19 +500,16 @@ var MultiPipeline = new Class({ // Undo the camera scroll spriteMatrix.e = sprite.x; spriteMatrix.f = sprite.y; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); } else { spriteMatrix.e -= camera.scrollX * sprite.scrollFactorX; spriteMatrix.f -= camera.scrollY * sprite.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); } + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + var xw = x + frameWidth; var yh = y + frameHeight; @@ -733,6 +730,8 @@ var MultiPipeline = new Class({ var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; + tintEffect = 1; + vertexViewF32[++vertexOffset] = x1; vertexViewF32[++vertexOffset] = y1; vertexViewF32[++vertexOffset] = u0; @@ -1038,13 +1037,13 @@ var MultiPipeline = new Class({ var xw = Math.floor(x + width); var yh = Math.floor(y + height); - var blank = this.renderer.blankTexture.glTexture; + var white = this.renderer.whiteTexture.glTexture; - var unit = this.renderer.setTexture2D(blank); + var unit = this.renderer.setTexture2D(white); - var tint = Utils.getTintAppendFloatAlphaAndSwap(color, alpha); + var tint = Utils.getTintAppendFloatAlpha(color, alpha); - this.batchQuad(x, y, x, yh, xw, yh, xw, y, 0, 0, 1, 1, tint, tint, tint, tint, 2, blank, unit); + this.batchQuad(x, y, x, yh, xw, yh, xw, y, 0, 0, 1, 1, tint, tint, tint, tint, 1, white, unit); }, /** From 8fc969088c5d104fc75259bea9d13b74d0305891 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:08:25 +0100 Subject: [PATCH 100/153] `GameObject.Vertex` is a new micro class that encapsulates all of the data required for a single vertex, such as position, uv, color and alpha. This class is now created internally by the Mesh Game Object. --- src/gameobjects/mesh/Vertex.js | 91 ++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 src/gameobjects/mesh/Vertex.js diff --git a/src/gameobjects/mesh/Vertex.js b/src/gameobjects/mesh/Vertex.js new file mode 100644 index 000000000..60f90901d --- /dev/null +++ b/src/gameobjects/mesh/Vertex.js @@ -0,0 +1,91 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = require('../../utils/Class'); + +/** + * @classdesc + * A Vertex Game Object. + * + * This tiny class consists of all the information for a single vertex within a Mesh + * Game Object. + * + * @class Vertex + * @memberof Phaser.GameObjects + * @constructor + * @since 3.50.0 + * + * @param {number} x - The x coordinate of this vertex. + * @param {number} y - The y coordinate of this vertex. + * @param {number} u - The UV u coordinate of this vertex. + * @param {number} v - The UV v coordinate of this vertex. + * @param {number} color - The color value of this vertex. + * @param {number} alpha - The alpha value of this vertex. + */ +var Vertex = new Class({ + + initialize: + + function Vertex (x, y, u, v, color, alpha) + { + /** + * The x coordinate of this vertex. + * + * @name Phaser.GameObjects.Vertex#x + * @type {number} + * @since 3.50.0 + */ + this.x = x; + + /** + * The y coordinate of this vertex. + * + * @name Phaser.GameObjects.Vertex#y + * @type {number} + * @since 3.50.0 + */ + this.y = y; + + /** + * UV u coordinate of this vertex. + * + * @name Phaser.GameObjects.Vertex#u + * @type {number} + * @since 3.50.0 + */ + this.u = u; + + /** + * UV v coordinate of this vertex. + * + * @name Phaser.GameObjects.Vertex#v + * @type {number} + * @since 3.50.0 + */ + this.v = v; + + /** + * The color value of this vertex. + * + * @name Phaser.GameObjects.Vertex#color + * @type {number} + * @since 3.50.0 + */ + this.color = color; + + /** + * The alpha value of this vertex. + * + * @name Phaser.GameObjects.Vertex#alpha + * @type {number} + * @since 3.50.0 + */ + this.alpha = alpha; + } + +}); + +module.exports = Vertex; From 6a3ce217025ec0ade09f637d2c46571ae51f33a4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:08:36 +0100 Subject: [PATCH 101/153] `GameObject.Face` is a new micro class that consists of references to the three `Vertex` instances that construct the single Face. --- src/gameobjects/mesh/Face.js | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/gameobjects/mesh/Face.js diff --git a/src/gameobjects/mesh/Face.js b/src/gameobjects/mesh/Face.js new file mode 100644 index 000000000..2a39ce16e --- /dev/null +++ b/src/gameobjects/mesh/Face.js @@ -0,0 +1,60 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = require('../../utils/Class'); + +/** + * @classdesc + * A Face Game Object. + * + * This class consists of 3 Vertex instances, for the 3 corners of the face. + * + * @class Face + * @memberof Phaser.GameObjects + * @constructor + * @since 3.50.0 + * + * @param {Phaser.GameObjects.Vertex} vertex1 - The first vertex in this Face. + * @param {Phaser.GameObjects.Vertex} vertex2 - The second vertex in this Face. + * @param {Phaser.GameObjects.Vertex} vertex3 - The third vertex in this Face. + */ +var Face = new Class({ + + initialize: + + function Face (vertex1, vertex2, vertex3) + { + /** + * The first vertex in this Face. + * + * @name Phaser.GameObjects.Face#vertex1 + * @type {Phaser.GameObjects.Vertex} + * @since 3.50.0 + */ + this.vertex1 = vertex1; + + /** + * The second vertex in this Face. + * + * @name Phaser.GameObjects.Face#vertex2 + * @type {Phaser.GameObjects.Vertex} + * @since 3.50.0 + */ + this.vertex2 = vertex2; + + /** + * The third vertex in this Face. + * + * @name Phaser.GameObjects.Face#vertex3 + * @type {Phaser.GameObjects.Vertex} + * @since 3.50.0 + */ + this.vertex3 = vertex3; + } + +}); + +module.exports = Face; From 36a33745b60c673d9527833286ef65c0eb651c4c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:09:12 +0100 Subject: [PATCH 102/153] Expose Vertex and Face --- src/gameobjects/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gameobjects/index.js b/src/gameobjects/index.js index 85559637a..5380c6351 100644 --- a/src/gameobjects/index.js +++ b/src/gameobjects/index.js @@ -125,6 +125,8 @@ if (typeof WEBGL_RENDERER) GameObjects.Mesh = require('./mesh/Mesh'); GameObjects.Quad = require('./quad/Quad'); GameObjects.Shader = require('./shader/Shader'); + GameObjects.Vertex = require('./mesh/Vertex'); + GameObjects.Face = require('./mesh/Face'); GameObjects.Factories.Mesh = require('./mesh/MeshFactory'); GameObjects.Factories.Quad = require('./quad/QuadFactory'); From 1057ead114363fbf0e67d21fd5878dd73247699f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:09:34 +0100 Subject: [PATCH 103/153] Dump all of the old mega arrays and replace with an array of Vertex instances. --- src/gameobjects/mesh/Mesh.js | 160 ++++++++++++++++++++--------------- 1 file changed, 92 insertions(+), 68 deletions(-) diff --git a/src/gameobjects/mesh/Mesh.js b/src/gameobjects/mesh/Mesh.js index 62add6a53..243a45942 100644 --- a/src/gameobjects/mesh/Mesh.js +++ b/src/gameobjects/mesh/Mesh.js @@ -7,9 +7,11 @@ var AnimationState = require('../../animations/AnimationState'); var Class = require('../../utils/Class'); var Components = require('../components'); +var Face = require('./Face'); var GameObject = require('../GameObject'); var GameObjectEvents = require('../events'); var MeshRender = require('./MeshRender'); +var Vertex = require('./Vertex'); /** * @classdesc @@ -82,53 +84,41 @@ var Mesh = new Class({ this.anims = new AnimationState(this); /** - * An array containing the vertices data for this Mesh. + * An array containing the Face instances belonging to this Mesh. + * + * A Face consists of 3 Vertex objects. + * + * This array is populated during the `setVertices` method. + * + * @name Phaser.GameObjects.Mesh#faces + * @type {Phaser.GameObjects.Face[]} + * @since 3.50.0 + */ + this.faces; + + /** + * An array containing Vertex instances. One instance per vertex in this Mesh. + * + * This array is populated during the `setVertices` method. * * @name Phaser.GameObjects.Mesh#vertices - * @type {Float32Array} - * @since 3.0.0 + * @type {Phaser.GameObjects.Vertex[]} + * @since 3.50.0 */ this.vertices; - /** - * An array containing the uv data for this Mesh. - * - * @name Phaser.GameObjects.Mesh#uv - * @type {Float32Array} - * @since 3.0.0 - */ - this.uv; - - /** - * An array containing the color data for this Mesh. - * - * @name Phaser.GameObjects.Mesh#colors - * @type {Uint32Array} - * @since 3.0.0 - */ - this.colors; - - /** - * An array containing the alpha data for this Mesh. - * - * @name Phaser.GameObjects.Mesh#alphas - * @type {Float32Array} - * @since 3.0.0 - */ - this.alphas; - /** * The tint fill mode. * - * 0 = An additive tint (the default), where vertices colors are blended with the texture. - * 1 = A fill tint, where the vertices colors replace the texture, but respects texture alpha. - * 2 = A complete tint, where the vertices colors replace the texture, including alpha, entirely. + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. * * @name Phaser.GameObjects.Mesh#tintFill - * @type {integer} - * @since 3.11.0 + * @type {boolean} + * @default false + * @since 3.50.0 */ - this.tintFill = 0; + this.tintFill = false; /** * You can optionally choose to render the vertices of this Mesh to a Graphics instance. @@ -195,57 +185,93 @@ var Mesh = new Class({ throw new Error('Mesh - vertices and uv count not equal'); } + var i; + var vert; + var verts = []; + var faces = []; + + var isColorArray = Array.isArray(colors); + var isAlphaArray = Array.isArray(alphas); + if (Array.isArray(indicies)) { - var verticesFull = []; - var uvsFull = []; - - for (var i = 0; i < indicies.length; i++) + for (i = 0; i < indicies.length; i++) { var index = indicies[i] * 2; - verticesFull.push(vertices[index], vertices[index + 1]); - uvsFull.push(uvs[index], uvs[index + 1]); + vert = new Vertex( + vertices[index], + vertices[index + 1], + uvs[index], + uvs[index + 1], + (isColorArray) ? colors[i] : colors, + (isAlphaArray) ? alphas[i] : alphas + ); + + verts.push(vert); } - - vertices = verticesFull; - uvs = uvsFull; } - - var halfVerts = Math.floor(vertices.length / 2); - - if (!Array.isArray(colors)) + else { - var tempColor = colors; + var colorIndex = 0; - colors = []; - - for (var c = 0; c < halfVerts; c++) + for (i = 0; i < vertices.length; i += 2) { - colors.push(tempColor); + vert = new Vertex( + vertices[i], + vertices[i + 1], + uvs[i], + uvs[i + 1], + (isColorArray) ? colors[colorIndex] : colors, + (isAlphaArray) ? alphas[colorIndex] : alphas + ); + + verts.push(vert); + + colorIndex++; } } - if (!Array.isArray(alphas)) + for (i = 0; i < verts.length; i += 3) { - var tempAlpha = alphas; + var vert1 = verts[i]; + var vert2 = verts[i + 1]; + var vert3 = verts[i + 2]; - alphas = []; + var face = new Face(vert1, vert2, vert3); - for (var a = 0; a < halfVerts; a++) - { - alphas.push(tempAlpha); - } + faces.push(face); } - this.vertices = new Float32Array(vertices); - this.uv = new Float32Array(uvs); - this.colors = new Uint32Array(colors); - this.alphas = new Float32Array(alphas); + this.vertices = verts; + this.faces = faces; return this; }, + getFaceCount: function () + { + return this.faces.length; + }, + + getVertexCount: function () + { + return this.vertices.length; + }, + + getFace: function (index) + { + return this.faces[index]; + }, + + getFaceAt: function (x, y, camera) + { + if (camera === undefined) { camera = this.scene.sys.cameras.main; } + + + + }, + /** * This method enables rendering of the Mesh vertices to the given Graphics instance. * @@ -356,9 +382,7 @@ var Mesh = new Class({ this.anims = undefined; this.vertices = null; - this.uv = null; - this.colors = null; - this.alphas = null; + this.faces = null; this.debugCallback = null; this.debugGraphic = null; From 3dbc547402cc65be3a68f8f266b6e9145abdf8e6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:09:37 +0100 Subject: [PATCH 104/153] Update CHANGELOG-v3.50.md --- CHANGELOG-v3.50.md | 78 ++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 31 deletions(-) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index 9af0de643..f92b59ee8 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -350,6 +350,12 @@ The Animation API has had a significant overhaul to improve playback handling. I ### Mesh Game Object New Features and Updates +The Mesh Game Object has been rewritten in v3.50 with a lot of internal changes to make it more useful: + +* `GameObject.Vertex` is a new micro class that encapsulates all of the data required for a single vertex, such as position, uv, color and alpha. This class is now created internally by the Mesh Game Object. +* `GameObject.Face` is a new micro class that consists of references to the three `Vertex` instances that construct the single Face. +* `Mesh.vertices` is now an array of `GameObject.Vertex` instances, not a Float32Array. +* `Mesh.faces` is a new array of `GameObject.Face` instances, which is populated during a call to `setVertices`. * `Mesh.setVertices` is a new method that allows you to set the verts of a Mesh Game Object from the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage. * The Mesh constructor signature has changed to `scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame`, where `indicies` is the new parameter added to the list. It allows you to provide indexed vertex data to create the Mesh from, where the `indicies` array holds the vertex index information. The final list of vertices is built from this index along with the provided vertices and uvs arrays. * You can now supply just a single numerical value as the `color` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the color for all vertices created. @@ -361,37 +367,10 @@ The Animation API has had a significant overhaul to improve playback handling. I * `Mesh.debugCallback` is a new property that holds the debug render callback. * `Mesh.renderDebugVerts` is a new method that acts as the default render callback for `setDebug` if none is provided. * `Mesh.preDestroy` is a new method that will clean-up the Mesh arrays and debug references on destruction. - -### New Features - -* `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value. -* `Geom.Intersects.GetLineToPolygon` is a new function that checks for the closest point of intersection between a line segment and an array of polygons. -* `Geom.Intersects.GetLineToPoints` is a new function that checks for the closest point of intersection between a line segment and an array of points, where each pair of points form a line segment. -* `Geom.Intersects.GetRaysFromPointToPolygon` is a new function that emits rays out from the given point and detects for intersection against all given polygons, returning the points of intersection in the results array. -* `Geom.Polygon.Translate` is a new function that allows you to translate all the points of a polygon by the given values. -* `Geom.Polygon.Simplify` is a new function that takes a polygon and simplifies the points by running them through a combination of Douglas-Peucker and Radial Distance algorithms, potentially dramatically reducing the number of points while retaining its shape. -* `WebGLRenderer.setInt1iv` will allow you to look-up and set a 1iv uniform on the given shader. -* `Phaser.Types.Math.Vector3Like` is a new data type representing as Vector 3 like object. -* `Phaser.Types.Math.Vector4Like` is a new data type representing as Vector 4 like object. -* `Transform.getLocalPoint` is a new method, available on all Game Objects, that takes an `x` / `y` pair and translates them into the local space of the Game Object, factoring in parent transforms and display origins. -* The `KeyboardPlugin` will now track the key code and timestamp of the previous key pressed and compare it to the current event. If they match, it will skip the event. On some systems, if you were to type quickly, you would sometimes get duplicate key events firing (the exact same event firing more than once). This is now prevented from happening. -* `Display.Color.GetColorFromValue` is a new function that will take a hex color value and return it as an integer, for use in WebGL. This is now used internally by the Tint component and other classes. -* `Utils.String.RemoveAt` is a new function that will remove a character from the given index in a string and return the new string. -* `Frame.setUVs` is a new method that allows you to directly set the canvas and UV data for a frame. Use this if you need to override the values set automatically during frame creation. -* `TweenManager.getTweensOf` has a new parameter `includePending`. If set, it will also check the pending tweens for the given targets and return those in the results as well. Fix #5260 (thanks @pcharest2000) -* `WebGLPipeline.hasBooted` is a new boolean property that tracks if the pipeline has been booted or not, which is now far more important in 3.5 than in previous versions. This is checked in the `WebGLRenderer.addPipeline` method, and if not set, the pipeline is booted. Fix #5251 #5255 (thanks @telinc1 @rexrainbow) -* The WebGL Renderer will now add the pipelines during the `boot` method, instead of `init`. -* You can now use `this.renderer` from within a Scene, as it's now a Scene-level property and part of the Injection Map. -* `Clock.addEvent` can now take an existing `TimerEvent` object, as well as a config object. If a `TimerEvent` is given it will be removed from the Clock, reset and then added. This allows you to pool TimerEvents rather than constantly create and delete them. Fix #4115 (thanks @jcyuan) -* `Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock. -* `Group.getMatching` is a new method that will return any members of the Group that match the given criteria, such as `getMatching('visible', true)` (thanks @atursams) -* `ArcadePhysics.disableUpdate` is a new method that will prevent the Arcade Physics World `update` method from being called when the Scene updates. By disabling it, you're free to call the update method yourself, passing in your own delta and time values. -* `ArcadePhysics.enableUpdate` is a new method that will make the Arcade Physics World update in time with the Scene update. This is the default, so only call this if you have specifically disabled it previously. -* `ArcadeWorldConfig.customUpdate` is a new boolean property you can set in the Arcade Physics config object, either in the Scene or in the Game Config. If `true` the World update will never be called, allowing you to call it yourself from your own component. Close #5190 (thanks @cfortuner) -* `Utils.Array.SortByDigits` is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits. -* `GroupCreateConfig`, which is used when calling `Group.createMultiple` or `Group.createFromConfig`, can now accept the following new properties: `setOrigin: { x, y, stepX, stepY }` which are applied to the items created by the Group. -* `Transform.copyPosition` is a new method that will copy the position from the given object to the Game Object (thanks @samme) -* The `Text.MeasureText` function, which is used to calculate the ascent and descent of Text Game Objects whenever the style, or font size, is changed, has been updated to use the new `actualBoundingBoxAscent` functions present in modern browsers. This allows for significantly faster ascent calculations than previously. Older browsers, such as IE, will still fall back (thanks @rexrainbow) +* The `Mesh.uv` array has been removed. All UV data is now bound in the Vertex instances. +* The `Mesh.colors` array has been removed. All color data is now bound in the Vertex instances. +* The `Mesh.alphas` array has been removed. All color data is now bound in the Vertex instances. +* The `Mesh.tintFill` property is now a `boolean` and defaults to `false`. ### Input / Mouse Updates and API Changes @@ -424,7 +403,44 @@ This has all changed in 3.50, as outlined below. Tint values are now used direct * The `Single.frag`, `Light.frag` and `Multi.frag` shaders have all been updated so they no longer have a 3-way check on the `outTintEffect` value. * The `Multi Pipeline`, `Bitmap Text`, `Render Texture`, `Text`, `TileSprite` and `Camera` now all read the tint values from the public properties instead of the private `_tintTL` etc ones. They also now set the `tintEffect` value directly from the `tintFill` property, removing another conditional check. * The function `GetColorFromValue` has been removed as it's no longer used internally. +* The `Rope.tintFill` property is now a boolean, not an integer, and can no longer take `2` as a value for a complete fill. Instead, you should provide a solid color texture with no alpha. +* As a result of the change to the shader, all uses of the WebGL Util function `getTintAppendFloatAlphaAndSwap` have been replaced with `getTintAppendFloatAlpha` instead. +* As a result of the change to the shader, the Multi Pipeline now uses the `WebGLRenderer.whiteTexture` and `tintEffect` mode of 1 by default, instead of mode 2 (which has been removed) and a transparent texture. This ensures Graphics and Shapes objects still render correctly under the new smaller shader code. +* `WebGLRenderer.whiteTexture` is a new property that is a reference to a pure white 4x4 texture that is created during Boot by the Texture Manager. The Multi Pipeline uses this internally for all Graphic, Shape and fill rendering. +* The `TextureManager` now generates a new texture with the key `__WHITE` durings its boot process. This is a pure white 4x4 texture used by the Graphics pipelines. +* `Config.images.white` is a new Game Config property that specifies the 4x4 white PNG texture used by Graphics rendering. You can override this via the config, but only do so if needed. +### New Features + +* `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value. +* `Geom.Intersects.GetLineToPolygon` is a new function that checks for the closest point of intersection between a line segment and an array of polygons. +* `Geom.Intersects.GetLineToPoints` is a new function that checks for the closest point of intersection between a line segment and an array of points, where each pair of points form a line segment. +* `Geom.Intersects.GetRaysFromPointToPolygon` is a new function that emits rays out from the given point and detects for intersection against all given polygons, returning the points of intersection in the results array. +* `Geom.Polygon.Translate` is a new function that allows you to translate all the points of a polygon by the given values. +* `Geom.Polygon.Simplify` is a new function that takes a polygon and simplifies the points by running them through a combination of Douglas-Peucker and Radial Distance algorithms, potentially dramatically reducing the number of points while retaining its shape. +* `WebGLRenderer.setInt1iv` will allow you to look-up and set a 1iv uniform on the given shader. +* `Phaser.Types.Math.Vector3Like` is a new data type representing as Vector 3 like object. +* `Phaser.Types.Math.Vector4Like` is a new data type representing as Vector 4 like object. +* `Transform.getLocalPoint` is a new method, available on all Game Objects, that takes an `x` / `y` pair and translates them into the local space of the Game Object, factoring in parent transforms and display origins. +* The `KeyboardPlugin` will now track the key code and timestamp of the previous key pressed and compare it to the current event. If they match, it will skip the event. On some systems, if you were to type quickly, you would sometimes get duplicate key events firing (the exact same event firing more than once). This is now prevented from happening. +* `Display.Color.GetColorFromValue` is a new function that will take a hex color value and return it as an integer, for use in WebGL. This is now used internally by the Tint component and other classes. +* `Utils.String.RemoveAt` is a new function that will remove a character from the given index in a string and return the new string. +* `Frame.setUVs` is a new method that allows you to directly set the canvas and UV data for a frame. Use this if you need to override the values set automatically during frame creation. +* `TweenManager.getTweensOf` has a new parameter `includePending`. If set, it will also check the pending tweens for the given targets and return those in the results as well. Fix #5260 (thanks @pcharest2000) +* `WebGLPipeline.hasBooted` is a new boolean property that tracks if the pipeline has been booted or not, which is now far more important in 3.5 than in previous versions. This is checked in the `WebGLRenderer.addPipeline` method, and if not set, the pipeline is booted. Fix #5251 #5255 (thanks @telinc1 @rexrainbow) +* The WebGL Renderer will now add the pipelines during the `boot` method, instead of `init`. +* You can now use `this.renderer` from within a Scene, as it's now a Scene-level property and part of the Injection Map. +* `Clock.addEvent` can now take an existing `TimerEvent` object, as well as a config object. If a `TimerEvent` is given it will be removed from the Clock, reset and then added. This allows you to pool TimerEvents rather than constantly create and delete them. Fix #4115 (thanks @jcyuan) +* `Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock. +* `Group.getMatching` is a new method that will return any members of the Group that match the given criteria, such as `getMatching('visible', true)` (thanks @atursams) +* `ArcadePhysics.disableUpdate` is a new method that will prevent the Arcade Physics World `update` method from being called when the Scene updates. By disabling it, you're free to call the update method yourself, passing in your own delta and time values. +* `ArcadePhysics.enableUpdate` is a new method that will make the Arcade Physics World update in time with the Scene update. This is the default, so only call this if you have specifically disabled it previously. +* `ArcadeWorldConfig.customUpdate` is a new boolean property you can set in the Arcade Physics config object, either in the Scene or in the Game Config. If `true` the World update will never be called, allowing you to call it yourself from your own component. Close #5190 (thanks @cfortuner) +* `Utils.Array.SortByDigits` is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits. +* `GroupCreateConfig`, which is used when calling `Group.createMultiple` or `Group.createFromConfig`, can now accept the following new properties: `setOrigin: { x, y, stepX, stepY }` which are applied to the items created by the Group. +* `Transform.copyPosition` is a new method that will copy the position from the given object to the Game Object (thanks @samme) +* The `Text.MeasureText` function, which is used to calculate the ascent and descent of Text Game Objects whenever the style, or font size, is changed, has been updated to use the new `actualBoundingBoxAscent` functions present in modern browsers. This allows for significantly faster ascent calculations than previously. Older browsers, such as IE, will still fall back (thanks @rexrainbow) +* `GameObjects.GetCalcMatrix` is a new function that is used to calculate the transformed Game Object matrix, based on the given Game Object, Camera and Parent. This function is now used by the following Game Objects: `BitmapText` (Static and Dynamic), `Graphics`, `Mesh`, `Rope`, `Shader`, `Arc`, `Curve`, `Ellipse`, `Grid`, `IsoBox`, `IsoTriangle`, `Line`, `Polygon`, `Rectangle`, `Star` and `Triangle`. This dramatically reduces the amount of duplicate code across the API. ### Updates and API Changes From 83f8f007d115852212f72a72c07cd15ef648c265 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:22:16 +0100 Subject: [PATCH 105/153] Now uses GetCalcMatrix --- src/gameobjects/extern/ExternWebGLRenderer.js | 35 +++---------------- 1 file changed, 4 insertions(+), 31 deletions(-) diff --git a/src/gameobjects/extern/ExternWebGLRenderer.js b/src/gameobjects/extern/ExternWebGLRenderer.js index 65f33d1f1..c433691d8 100644 --- a/src/gameobjects/extern/ExternWebGLRenderer.js +++ b/src/gameobjects/extern/ExternWebGLRenderer.js @@ -4,6 +4,8 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var GetCalcMatrix = require('../GetCalcMatrix'); + /** * Renders this Game Object with the WebGL Renderer to the given Camera. * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. @@ -15,44 +17,15 @@ * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Extern} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ExternWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var ExternWebGLRenderer = function (renderer, src, camera, parentMatrix) { renderer.pipelines.clear(); - var camMatrix = renderer._tempMatrix1; - var spriteMatrix = renderer._tempMatrix2; - var calcMatrix = renderer._tempMatrix3; + var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; - spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - spriteMatrix.e = src.x; - spriteMatrix.f = src.y; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - else - { - spriteMatrix.e -= camera.scrollX * src.scrollFactorX; - spriteMatrix.f -= camera.scrollY * src.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - - // Callback src.render.call(src, renderer, camera, calcMatrix); renderer.pipelines.rebind(); From 6a966e3f3b88a14c5e510f5ec05c84d4980a13c2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:33:58 +0100 Subject: [PATCH 106/153] Removed `interpolationPercentage` parameter from all render methods, as it has never been used. --- src/cameras/2d/CameraManager.js | 5 ++--- .../dynamic/DynamicBitmapTextCanvasRenderer.js | 5 ++--- .../dynamic/DynamicBitmapTextWebGLRenderer.js | 3 +-- .../bitmaptext/static/BitmapTextCanvasRenderer.js | 5 ++--- .../bitmaptext/static/BitmapTextWebGLRenderer.js | 3 +-- src/gameobjects/blitter/BlitterCanvasRenderer.js | 7 +++---- src/gameobjects/blitter/BlitterWebGLRenderer.js | 3 +-- .../container/ContainerCanvasRenderer.js | 5 ++--- .../container/ContainerWebGLRenderer.js | 7 +++---- .../domelement/DOMElementCSSRenderer.js | 9 ++++----- src/gameobjects/graphics/Graphics.js | 4 ++-- .../graphics/GraphicsCanvasRenderer.js | 3 +-- src/gameobjects/graphics/GraphicsWebGLRenderer.js | 3 +-- src/gameobjects/image/ImageCanvasRenderer.js | 3 +-- src/gameobjects/image/ImageWebGLRenderer.js | 3 +-- src/gameobjects/mesh/MeshCanvasRenderer.js | 1 - src/gameobjects/mesh/MeshWebGLRenderer.js | 3 +-- .../particles/ParticleManagerCanvasRenderer.js | 5 ++--- .../particles/ParticleManagerWebGLRenderer.js | 3 +-- .../rendertexture/RenderTextureCanvasRenderer.js | 3 +-- .../rendertexture/RenderTextureWebGLRenderer.js | 3 +-- src/gameobjects/rope/RopeCanvasRenderer.js | 1 - src/gameobjects/rope/RopeWebGLRenderer.js | 3 +-- src/gameobjects/shader/ShaderCanvasRenderer.js | 1 - src/gameobjects/shader/ShaderWebGLRenderer.js | 3 +-- src/gameobjects/shape/arc/ArcCanvasRenderer.js | 3 +-- src/gameobjects/shape/arc/ArcWebGLRenderer.js | 3 +-- .../shape/curve/CurveCanvasRenderer.js | 13 ++++++------- src/gameobjects/shape/curve/CurveWebGLRenderer.js | 3 +-- .../shape/ellipse/EllipseCanvasRenderer.js | 11 +++++------ .../shape/ellipse/EllipseWebGLRenderer.js | 3 +-- src/gameobjects/shape/grid/GridCanvasRenderer.js | 3 +-- src/gameobjects/shape/grid/GridWebGLRenderer.js | 3 +-- .../shape/isobox/IsoBoxCanvasRenderer.js | 7 +++---- .../shape/isobox/IsoBoxWebGLRenderer.js | 3 +-- .../isotriangle/IsoTriangleCanvasRenderer.js | 5 ++--- .../shape/isotriangle/IsoTriangleWebGLRenderer.js | 3 +-- src/gameobjects/shape/line/LineCanvasRenderer.js | 5 ++--- src/gameobjects/shape/line/LineWebGLRenderer.js | 3 +-- .../shape/polygon/PolygonCanvasRenderer.js | 11 +++++------ .../shape/polygon/PolygonWebGLRenderer.js | 3 +-- .../shape/rectangle/RectangleCanvasRenderer.js | 5 ++--- .../shape/rectangle/RectangleWebGLRenderer.js | 3 +-- src/gameobjects/shape/star/StarCanvasRenderer.js | 11 +++++------ src/gameobjects/shape/star/StarWebGLRenderer.js | 3 +-- .../shape/triangle/TriangleCanvasRenderer.js | 3 +-- .../shape/triangle/TriangleWebGLRenderer.js | 3 +-- src/gameobjects/sprite/SpriteCanvasRenderer.js | 3 +-- src/gameobjects/sprite/SpriteWebGLRenderer.js | 3 +-- src/gameobjects/text/static/TextCanvasRenderer.js | 5 ++--- src/gameobjects/text/static/TextWebGLRenderer.js | 3 +-- .../tilesprite/TileSpriteCanvasRenderer.js | 3 +-- .../tilesprite/TileSpriteWebGLRenderer.js | 3 +-- src/gameobjects/video/VideoCanvasRenderer.js | 3 +-- src/gameobjects/video/VideoWebGLRenderer.js | 3 +-- src/renderer/canvas/CanvasRenderer.js | 5 ++--- src/renderer/webgl/WebGLRenderer.js | 5 ++--- .../DynamicTilemapLayerCanvasRenderer.js | 15 +++++++-------- .../DynamicTilemapLayerWebGLRenderer.js | 3 +-- .../StaticTilemapLayerCanvasRenderer.js | 11 +++++------ .../StaticTilemapLayerWebGLRenderer.js | 3 +-- 61 files changed, 106 insertions(+), 166 deletions(-) diff --git a/src/cameras/2d/CameraManager.js b/src/cameras/2d/CameraManager.js index 098251f12..27c6a739a 100644 --- a/src/cameras/2d/CameraManager.js +++ b/src/cameras/2d/CameraManager.js @@ -584,9 +584,8 @@ var CameraManager = new Class({ * * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Renderer that will render the children to this camera. * @param {Phaser.GameObjects.GameObject[]} children - An array of renderable Game Objects. - * @param {number} interpolation - Interpolation value. Reserved for future use. */ - render: function (renderer, children, interpolation) + render: function (renderer, children) { var scene = this.scene; var cameras = this.cameras; @@ -600,7 +599,7 @@ var CameraManager = new Class({ // Hard-coded to 1 for now camera.preRender(1); - renderer.render(scene, children, interpolation, camera); + renderer.render(scene, children, camera); } } }, diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js index c42997bd3..5cb6a6178 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js @@ -17,11 +17,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.DynamicBitmapText} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var DynamicBitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var DynamicBitmapTextCanvasRenderer = function (renderer, src, camera, parentMatrix) { var text = src._text; var textLength = text.length; @@ -32,7 +31,7 @@ var DynamicBitmapTextCanvasRenderer = function (renderer, src, interpolationPerc { return; } - + var textureFrame = src.frame; var displayCallback = src.displayCallback; diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js index a9f30285c..66a3c1135 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js @@ -18,11 +18,10 @@ var Utils = require('../../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.DynamicBitmapText} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var DynamicBitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var DynamicBitmapTextWebGLRenderer = function (renderer, src, camera, parentMatrix) { var text = src.text; var textLength = text.length; diff --git a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js index 571203019..8b98ce95d 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js @@ -17,11 +17,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.BitmapText} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var BitmapTextCanvasRenderer = function (renderer, src, camera, parentMatrix) { var text = src._text; var textLength = text.length; @@ -32,7 +31,7 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, { return; } - + var textureFrame = src.frame; var chars = src.fontData.chars; diff --git a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js index de7801448..eb5350f17 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js @@ -19,11 +19,10 @@ var Utils = require('../../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.BitmapText} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var BitmapTextWebGLRenderer = function (renderer, src, camera, parentMatrix) { var text = src._text; var textLength = text.length; diff --git a/src/gameobjects/blitter/BlitterCanvasRenderer.js b/src/gameobjects/blitter/BlitterCanvasRenderer.js index 029f747fe..3b12e3597 100644 --- a/src/gameobjects/blitter/BlitterCanvasRenderer.js +++ b/src/gameobjects/blitter/BlitterCanvasRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Blitter} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var BlitterCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var BlitterCanvasRenderer = function (renderer, src, camera, parentMatrix) { var list = src.getRenderList(); @@ -75,7 +74,7 @@ var BlitterCanvasRenderer = function (renderer, src, interpolationPercentage, ca } ctx.globalAlpha = bobAlpha; - + if (!flip) { if (roundPixels) @@ -117,7 +116,7 @@ var BlitterCanvasRenderer = function (renderer, src, interpolationPercentage, ca ctx.restore(); } } - + ctx.restore(); }; diff --git a/src/gameobjects/blitter/BlitterWebGLRenderer.js b/src/gameobjects/blitter/BlitterWebGLRenderer.js index 44c50d2ed..7bebcdb56 100644 --- a/src/gameobjects/blitter/BlitterWebGLRenderer.js +++ b/src/gameobjects/blitter/BlitterWebGLRenderer.js @@ -17,11 +17,10 @@ var Utils = require('../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Blitter} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var BlitterWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var BlitterWebGLRenderer = function (renderer, src, camera, parentMatrix) { var list = src.getRenderList(); diff --git a/src/gameobjects/container/ContainerCanvasRenderer.js b/src/gameobjects/container/ContainerCanvasRenderer.js index 75d1b50e4..6014ed3f4 100644 --- a/src/gameobjects/container/ContainerCanvasRenderer.js +++ b/src/gameobjects/container/ContainerCanvasRenderer.js @@ -16,11 +16,10 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +var ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix) { var children = container.list; @@ -85,7 +84,7 @@ var ContainerCanvasRenderer = function (renderer, container, interpolationPercen child.setAlpha(childAlpha * alpha); // Render - child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix); + child.renderCanvas(renderer, child, camera, transformMatrix); // Restore original values child.setAlpha(childAlpha); diff --git a/src/gameobjects/container/ContainerWebGLRenderer.js b/src/gameobjects/container/ContainerWebGLRenderer.js index 6e41ffb19..89c2aacac 100644 --- a/src/gameobjects/container/ContainerWebGLRenderer.js +++ b/src/gameobjects/container/ContainerWebGLRenderer.js @@ -16,11 +16,10 @@ * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +var ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix) { var children = container.list; @@ -30,7 +29,7 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent } var transformMatrix = container.localTransform; - + if (parentMatrix) { transformMatrix.loadIdentity(); @@ -123,7 +122,7 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha); // Render - child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix); + child.renderWebGL(renderer, child, camera, transformMatrix); // Restore original values diff --git a/src/gameobjects/domelement/DOMElementCSSRenderer.js b/src/gameobjects/domelement/DOMElementCSSRenderer.js index b229ce187..24caf8ee3 100644 --- a/src/gameobjects/domelement/DOMElementCSSRenderer.js +++ b/src/gameobjects/domelement/DOMElementCSSRenderer.js @@ -18,11 +18,10 @@ var GameObject = require('../GameObject'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active renderer. * @param {Phaser.GameObjects.DOMElement} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var DOMElementCSSRenderer = function (renderer, src, camera, parentMatrix) { var node = src.node; var style = node.style; @@ -34,7 +33,7 @@ var DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, ca { style.display = 'none'; } - + return; } @@ -79,9 +78,9 @@ var DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, ca { dx = (src.width) * src.originX; dy = (src.height) * src.originY; - + srcMatrix.applyITRS(src.x - dx, src.y - dy, src.rotation, src.scaleX, src.scaleY); - + camMatrix.copyFrom(camera.matrix); tx = (100 * src.originX) + '%'; diff --git a/src/gameobjects/graphics/Graphics.js b/src/gameobjects/graphics/Graphics.js index 63e399024..bd206df13 100644 --- a/src/gameobjects/graphics/Graphics.js +++ b/src/gameobjects/graphics/Graphics.js @@ -1510,8 +1510,8 @@ var Graphics = new Class({ if (ctx) { - // var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix, renderTargetCtx, allowClip) - this.renderCanvas(renderer, this, 0, Graphics.TargetCamera, null, ctx, false); + // var GraphicsCanvasRenderer = function (renderer, src, camera, parentMatrix, renderTargetCtx, allowClip) + this.renderCanvas(renderer, this, Graphics.TargetCamera, null, ctx, false); if (texture) { diff --git a/src/gameobjects/graphics/GraphicsCanvasRenderer.js b/src/gameobjects/graphics/GraphicsCanvasRenderer.js index fad524de4..a4cd6e0e6 100644 --- a/src/gameobjects/graphics/GraphicsCanvasRenderer.js +++ b/src/gameobjects/graphics/GraphicsCanvasRenderer.js @@ -18,13 +18,12 @@ var SetTransform = require('../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Graphics} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested * @param {CanvasRenderingContext2D} [renderTargetCtx] - The target rendering context. * @param {boolean} allowClip - If `true` then path operations will be used instead of fill operations. */ -var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix, renderTargetCtx, allowClip) +var GraphicsCanvasRenderer = function (renderer, src, camera, parentMatrix, renderTargetCtx, allowClip) { var commandBuffer = src.commandBuffer; var commandBufferLength = commandBuffer.length; diff --git a/src/gameobjects/graphics/GraphicsWebGLRenderer.js b/src/gameobjects/graphics/GraphicsWebGLRenderer.js index e6852ab3f..6c7f3b832 100644 --- a/src/gameobjects/graphics/GraphicsWebGLRenderer.js +++ b/src/gameobjects/graphics/GraphicsWebGLRenderer.js @@ -36,11 +36,10 @@ var matrixStack = []; * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Graphics} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var GraphicsWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var GraphicsWebGLRenderer = function (renderer, src, camera, parentMatrix) { if (src.commandBuffer.length === 0) { diff --git a/src/gameobjects/image/ImageCanvasRenderer.js b/src/gameobjects/image/ImageCanvasRenderer.js index 1c044bded..fa849fbec 100644 --- a/src/gameobjects/image/ImageCanvasRenderer.js +++ b/src/gameobjects/image/ImageCanvasRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ImageCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var ImageCanvasRenderer = function (renderer, src, camera, parentMatrix) { renderer.batchSprite(src, src.frame, camera, parentMatrix); }; diff --git a/src/gameobjects/image/ImageWebGLRenderer.js b/src/gameobjects/image/ImageWebGLRenderer.js index 95170b109..ba4dbea7e 100644 --- a/src/gameobjects/image/ImageWebGLRenderer.js +++ b/src/gameobjects/image/ImageWebGLRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ImageWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var ImageWebGLRenderer = function (renderer, src, camera, parentMatrix) { this.pipeline.batchSprite(src, camera, parentMatrix); }; diff --git a/src/gameobjects/mesh/MeshCanvasRenderer.js b/src/gameobjects/mesh/MeshCanvasRenderer.js index 09cf824f5..e97b7eb03 100644 --- a/src/gameobjects/mesh/MeshCanvasRenderer.js +++ b/src/gameobjects/mesh/MeshCanvasRenderer.js @@ -13,7 +13,6 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Mesh} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. */ var MeshCanvasRenderer = function () diff --git a/src/gameobjects/mesh/MeshWebGLRenderer.js b/src/gameobjects/mesh/MeshWebGLRenderer.js index 59e16c1f4..e2be58523 100644 --- a/src/gameobjects/mesh/MeshWebGLRenderer.js +++ b/src/gameobjects/mesh/MeshWebGLRenderer.js @@ -18,11 +18,10 @@ var Utils = require('../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Mesh} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline, src); diff --git a/src/gameobjects/particles/ParticleManagerCanvasRenderer.js b/src/gameobjects/particles/ParticleManagerCanvasRenderer.js index 8ff328033..24a60eef5 100644 --- a/src/gameobjects/particles/ParticleManagerCanvasRenderer.js +++ b/src/gameobjects/particles/ParticleManagerCanvasRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ParticleManagerCanvasRenderer = function (renderer, emitterManager, interpolationPercentage, camera, parentMatrix) +var ParticleManagerCanvasRenderer = function (renderer, emitterManager, camera, parentMatrix) { var emitters = emitterManager.emitters.list; var emittersLength = emitters.length; @@ -92,7 +91,7 @@ var ParticleManagerCanvasRenderer = function (renderer, emitterManager, interpol camMatrix.multiply(particleMatrix, calcMatrix); ctx.globalAlpha = alpha; - + ctx.save(); calcMatrix.copyToContext(ctx); diff --git a/src/gameobjects/particles/ParticleManagerWebGLRenderer.js b/src/gameobjects/particles/ParticleManagerWebGLRenderer.js index 54dbabfb2..493c36bef 100644 --- a/src/gameobjects/particles/ParticleManagerWebGLRenderer.js +++ b/src/gameobjects/particles/ParticleManagerWebGLRenderer.js @@ -17,11 +17,10 @@ var Utils = require('../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpolationPercentage, camera, parentMatrix) +var ParticleManagerWebGLRenderer = function (renderer, emitterManager, camera, parentMatrix) { var emitters = emitterManager.emitters.list; var emittersLength = emitters.length; diff --git a/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js b/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js index 19a93466e..1d0d7f77e 100644 --- a/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js +++ b/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.RenderTexture} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var RenderTextureCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var RenderTextureCanvasRenderer = function (renderer, src, camera, parentMatrix) { renderer.batchSprite(src, src.frame, camera, parentMatrix); }; diff --git a/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js b/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js index e39f1d997..fe354aa34 100644 --- a/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js +++ b/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js @@ -17,11 +17,10 @@ var Utils = require('../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.RenderTexture} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var RenderTextureWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var RenderTextureWebGLRenderer = function (renderer, src, camera, parentMatrix) { var frame = src.frame; var width = frame.width; diff --git a/src/gameobjects/rope/RopeCanvasRenderer.js b/src/gameobjects/rope/RopeCanvasRenderer.js index 509a7b9d3..4e0d6d3a0 100644 --- a/src/gameobjects/rope/RopeCanvasRenderer.js +++ b/src/gameobjects/rope/RopeCanvasRenderer.js @@ -13,7 +13,6 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Rope} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. */ var RopeCanvasRenderer = function () diff --git a/src/gameobjects/rope/RopeWebGLRenderer.js b/src/gameobjects/rope/RopeWebGLRenderer.js index 34ba5fc83..d7432be08 100644 --- a/src/gameobjects/rope/RopeWebGLRenderer.js +++ b/src/gameobjects/rope/RopeWebGLRenderer.js @@ -18,11 +18,10 @@ var Utils = require('../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Rope} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var RopeWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var RopeWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(src.pipeline, src); diff --git a/src/gameobjects/shader/ShaderCanvasRenderer.js b/src/gameobjects/shader/ShaderCanvasRenderer.js index 8dc97d372..764e4aca4 100644 --- a/src/gameobjects/shader/ShaderCanvasRenderer.js +++ b/src/gameobjects/shader/ShaderCanvasRenderer.js @@ -13,7 +13,6 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Shader} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. */ var ShaderCanvasRenderer = function () diff --git a/src/gameobjects/shader/ShaderWebGLRenderer.js b/src/gameobjects/shader/ShaderWebGLRenderer.js index 47637dcd1..3f6395daf 100644 --- a/src/gameobjects/shader/ShaderWebGLRenderer.js +++ b/src/gameobjects/shader/ShaderWebGLRenderer.js @@ -17,11 +17,10 @@ var GetCalcMatrix = require('../GetCalcMatrix'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Shader} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var ShaderWebGLRenderer = function (renderer, src, camera, parentMatrix) { if (!src.shader) { diff --git a/src/gameobjects/shape/arc/ArcCanvasRenderer.js b/src/gameobjects/shape/arc/ArcCanvasRenderer.js index 4048fae88..fc395ac9a 100644 --- a/src/gameobjects/shape/arc/ArcCanvasRenderer.js +++ b/src/gameobjects/shape/arc/ArcCanvasRenderer.js @@ -20,11 +20,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Arc} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ArcCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var ArcCanvasRenderer = function (renderer, src, camera, parentMatrix) { var ctx = renderer.currentContext; diff --git a/src/gameobjects/shape/arc/ArcWebGLRenderer.js b/src/gameobjects/shape/arc/ArcWebGLRenderer.js index 4f5a755c2..3f317ada5 100644 --- a/src/gameobjects/shape/arc/ArcWebGLRenderer.js +++ b/src/gameobjects/shape/arc/ArcWebGLRenderer.js @@ -19,11 +19,10 @@ var StrokePathWebGL = require('../StrokePathWebGL'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Arc} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ArcWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var ArcWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline); diff --git a/src/gameobjects/shape/curve/CurveCanvasRenderer.js b/src/gameobjects/shape/curve/CurveCanvasRenderer.js index 639c85b63..717ed5c83 100644 --- a/src/gameobjects/shape/curve/CurveCanvasRenderer.js +++ b/src/gameobjects/shape/curve/CurveCanvasRenderer.js @@ -19,11 +19,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Curve} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var CurveCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var CurveCanvasRenderer = function (renderer, src, camera, parentMatrix) { var ctx = renderer.currentContext; @@ -31,27 +30,27 @@ var CurveCanvasRenderer = function (renderer, src, interpolationPercentage, came { var dx = src._displayOriginX + src._curveBounds.x; var dy = src._displayOriginY + src._curveBounds.y; - + var path = src.pathData; var pathLength = path.length - 1; - + var px1 = path[0] - dx; var py1 = path[1] - dy; ctx.beginPath(); ctx.moveTo(px1, py1); - + if (!src.closePath) { pathLength -= 2; } - + for (var i = 2; i < pathLength; i += 2) { var px2 = path[i] - dx; var py2 = path[i + 1] - dy; - + ctx.lineTo(px2, py2); } diff --git a/src/gameobjects/shape/curve/CurveWebGLRenderer.js b/src/gameobjects/shape/curve/CurveWebGLRenderer.js index 4e2689044..f085d7612 100644 --- a/src/gameobjects/shape/curve/CurveWebGLRenderer.js +++ b/src/gameobjects/shape/curve/CurveWebGLRenderer.js @@ -19,11 +19,10 @@ var StrokePathWebGL = require('../StrokePathWebGL'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Curve} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var CurveWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var CurveWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline); diff --git a/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js b/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js index c8b8487fa..c481377bf 100644 --- a/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js +++ b/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js @@ -19,11 +19,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Ellipse} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var EllipseCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var EllipseCanvasRenderer = function (renderer, src, camera, parentMatrix) { var ctx = renderer.currentContext; @@ -34,24 +33,24 @@ var EllipseCanvasRenderer = function (renderer, src, interpolationPercentage, ca var path = src.pathData; var pathLength = path.length - 1; - + var px1 = path[0] - dx; var py1 = path[1] - dy; ctx.beginPath(); ctx.moveTo(px1, py1); - + if (!src.closePath) { pathLength -= 2; } - + for (var i = 2; i < pathLength; i += 2) { var px2 = path[i] - dx; var py2 = path[i + 1] - dy; - + ctx.lineTo(px2, py2); } diff --git a/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js b/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js index 6b3137fe8..cef73da39 100644 --- a/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js +++ b/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js @@ -19,11 +19,10 @@ var StrokePathWebGL = require('../StrokePathWebGL'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Ellipse} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var EllipseWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var EllipseWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline); diff --git a/src/gameobjects/shape/grid/GridCanvasRenderer.js b/src/gameobjects/shape/grid/GridCanvasRenderer.js index c797aebd7..9183af8d2 100644 --- a/src/gameobjects/shape/grid/GridCanvasRenderer.js +++ b/src/gameobjects/shape/grid/GridCanvasRenderer.js @@ -19,11 +19,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Grid} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var GridCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var GridCanvasRenderer = function (renderer, src, camera, parentMatrix) { var ctx = renderer.currentContext; diff --git a/src/gameobjects/shape/grid/GridWebGLRenderer.js b/src/gameobjects/shape/grid/GridWebGLRenderer.js index 2ba435f50..e566cc386 100644 --- a/src/gameobjects/shape/grid/GridWebGLRenderer.js +++ b/src/gameobjects/shape/grid/GridWebGLRenderer.js @@ -18,11 +18,10 @@ var Utils = require('../../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Grid} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var GridWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var GridWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline); diff --git a/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js b/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js index 651da129e..1b791f559 100644 --- a/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js +++ b/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js @@ -18,11 +18,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.IsoBox} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var IsoBoxCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var IsoBoxCanvasRenderer = function (renderer, src, camera, parentMatrix) { var ctx = renderer.currentContext; @@ -30,7 +29,7 @@ var IsoBoxCanvasRenderer = function (renderer, src, interpolationPercentage, cam { var size = src.width; var height = src.height; - + var sizeA = size / 2; var sizeB = size / src.projection; @@ -60,7 +59,7 @@ var IsoBoxCanvasRenderer = function (renderer, src, interpolationPercentage, cam FillStyleCanvas(ctx, src, src.fillLeft); ctx.beginPath(); - + ctx.moveTo(-sizeA, 0); ctx.lineTo(0, sizeB); ctx.lineTo(0, sizeB - height); diff --git a/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js b/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js index f1158d67b..a1891f998 100644 --- a/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js +++ b/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js @@ -18,11 +18,10 @@ var Utils = require('../../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.IsoBox} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var IsoBoxWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline); diff --git a/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js b/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js index 866b28ae8..5a1369cc8 100644 --- a/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js +++ b/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js @@ -18,11 +18,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.IsoTriangle} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var IsoTriangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var IsoTriangleCanvasRenderer = function (renderer, src, camera, parentMatrix) { var ctx = renderer.currentContext; @@ -30,7 +29,7 @@ var IsoTriangleCanvasRenderer = function (renderer, src, interpolationPercentage { var size = src.width; var height = src.height; - + var sizeA = size / 2; var sizeB = size / src.projection; diff --git a/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js b/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js index 0bf35c9e5..f475b060c 100644 --- a/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js +++ b/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js @@ -18,11 +18,10 @@ var Utils = require('../../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.IsoTriangle} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var IsoTriangleWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline); diff --git a/src/gameobjects/shape/line/LineCanvasRenderer.js b/src/gameobjects/shape/line/LineCanvasRenderer.js index 01a504f74..0e4181b32 100644 --- a/src/gameobjects/shape/line/LineCanvasRenderer.js +++ b/src/gameobjects/shape/line/LineCanvasRenderer.js @@ -18,11 +18,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Line} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var LineCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var LineCanvasRenderer = function (renderer, src, camera, parentMatrix) { var ctx = renderer.currentContext; @@ -39,7 +38,7 @@ var LineCanvasRenderer = function (renderer, src, interpolationPercentage, camer ctx.moveTo(src.geom.x1 - dx, src.geom.y1 - dy); ctx.lineTo(src.geom.x2 - dx, src.geom.y2 - dy); - + ctx.stroke(); } diff --git a/src/gameobjects/shape/line/LineWebGLRenderer.js b/src/gameobjects/shape/line/LineWebGLRenderer.js index 89979d144..b5b350cf7 100644 --- a/src/gameobjects/shape/line/LineWebGLRenderer.js +++ b/src/gameobjects/shape/line/LineWebGLRenderer.js @@ -18,11 +18,10 @@ var Utils = require('../../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Line} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var LineWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var LineWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline); diff --git a/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js b/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js index 2662b4fa7..eef272c68 100644 --- a/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js +++ b/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js @@ -19,11 +19,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Polygon} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var PolygonCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var PolygonCanvasRenderer = function (renderer, src, camera, parentMatrix) { var ctx = renderer.currentContext; @@ -34,24 +33,24 @@ var PolygonCanvasRenderer = function (renderer, src, interpolationPercentage, ca var path = src.pathData; var pathLength = path.length - 1; - + var px1 = path[0] - dx; var py1 = path[1] - dy; ctx.beginPath(); ctx.moveTo(px1, py1); - + if (!src.closePath) { pathLength -= 2; } - + for (var i = 2; i < pathLength; i += 2) { var px2 = path[i] - dx; var py2 = path[i + 1] - dy; - + ctx.lineTo(px2, py2); } diff --git a/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js b/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js index d39efd146..f4503897c 100644 --- a/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js +++ b/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js @@ -19,11 +19,10 @@ var StrokePathWebGL = require('../StrokePathWebGL'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Polygon} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var PolygonWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var PolygonWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline); diff --git a/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js b/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js index 02a3e52d4..8bd5d15ef 100644 --- a/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js +++ b/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js @@ -19,11 +19,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Rectangle} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var RectangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var RectangleCanvasRenderer = function (renderer, src, camera, parentMatrix) { var ctx = renderer.currentContext; @@ -35,7 +34,7 @@ var RectangleCanvasRenderer = function (renderer, src, interpolationPercentage, if (src.isFilled) { FillStyleCanvas(ctx, src); - + ctx.fillRect( -dx, -dy, diff --git a/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js b/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js index fcd2277a7..4664eed57 100644 --- a/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js +++ b/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js @@ -19,11 +19,10 @@ var Utils = require('../../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Rectangle} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var RectangleWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline); diff --git a/src/gameobjects/shape/star/StarCanvasRenderer.js b/src/gameobjects/shape/star/StarCanvasRenderer.js index 834be1bab..91d8affcb 100644 --- a/src/gameobjects/shape/star/StarCanvasRenderer.js +++ b/src/gameobjects/shape/star/StarCanvasRenderer.js @@ -19,11 +19,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Star} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var StarCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var StarCanvasRenderer = function (renderer, src, camera, parentMatrix) { var ctx = renderer.currentContext; @@ -34,24 +33,24 @@ var StarCanvasRenderer = function (renderer, src, interpolationPercentage, camer var path = src.pathData; var pathLength = path.length - 1; - + var px1 = path[0] - dx; var py1 = path[1] - dy; ctx.beginPath(); ctx.moveTo(px1, py1); - + if (!src.closePath) { pathLength -= 2; } - + for (var i = 2; i < pathLength; i += 2) { var px2 = path[i] - dx; var py2 = path[i + 1] - dy; - + ctx.lineTo(px2, py2); } diff --git a/src/gameobjects/shape/star/StarWebGLRenderer.js b/src/gameobjects/shape/star/StarWebGLRenderer.js index 7da1b9d6c..e8aa708f9 100644 --- a/src/gameobjects/shape/star/StarWebGLRenderer.js +++ b/src/gameobjects/shape/star/StarWebGLRenderer.js @@ -19,11 +19,10 @@ var StrokePathWebGL = require('../StrokePathWebGL'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Star} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var StarWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var StarWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline); diff --git a/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js b/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js index dd577aafa..4ebf2f479 100644 --- a/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js +++ b/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js @@ -19,11 +19,10 @@ var SetTransform = require('../../../renderer/canvas/utils/SetTransform'); * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Triangle} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var TriangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var TriangleCanvasRenderer = function (renderer, src, camera, parentMatrix) { var ctx = renderer.currentContext; diff --git a/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js b/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js index 91cb985ae..88317db16 100644 --- a/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js +++ b/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js @@ -19,11 +19,10 @@ var Utils = require('../../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Triangle} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var TriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var TriangleWebGLRenderer = function (renderer, src, camera, parentMatrix) { var pipeline = renderer.pipelines.set(this.pipeline); diff --git a/src/gameobjects/sprite/SpriteCanvasRenderer.js b/src/gameobjects/sprite/SpriteCanvasRenderer.js index 39d8f05c7..bf81ca1a4 100644 --- a/src/gameobjects/sprite/SpriteCanvasRenderer.js +++ b/src/gameobjects/sprite/SpriteCanvasRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var SpriteCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var SpriteCanvasRenderer = function (renderer, src, camera, parentMatrix) { renderer.batchSprite(src, src.frame, camera, parentMatrix); }; diff --git a/src/gameobjects/sprite/SpriteWebGLRenderer.js b/src/gameobjects/sprite/SpriteWebGLRenderer.js index 93ed5ee9d..4923a9c2b 100644 --- a/src/gameobjects/sprite/SpriteWebGLRenderer.js +++ b/src/gameobjects/sprite/SpriteWebGLRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var SpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var SpriteWebGLRenderer = function (renderer, src, camera, parentMatrix) { this.pipeline.batchSprite(src, camera, parentMatrix); }; diff --git a/src/gameobjects/text/static/TextCanvasRenderer.js b/src/gameobjects/text/static/TextCanvasRenderer.js index 87cb99856..c0d7a1748 100644 --- a/src/gameobjects/text/static/TextCanvasRenderer.js +++ b/src/gameobjects/text/static/TextCanvasRenderer.js @@ -15,13 +15,12 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Text} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var TextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var TextCanvasRenderer = function (renderer, src, camera, parentMatrix) { - if ((src.width === 0) || (src.height === 0)) + if (src.width === 0 || src.height === 0) { return; } diff --git a/src/gameobjects/text/static/TextWebGLRenderer.js b/src/gameobjects/text/static/TextWebGLRenderer.js index e94ea3d8c..7bfb562b1 100644 --- a/src/gameobjects/text/static/TextWebGLRenderer.js +++ b/src/gameobjects/text/static/TextWebGLRenderer.js @@ -17,11 +17,10 @@ var Utils = require('../../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Text} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var TextWebGLRenderer = function (renderer, src, camera, parentMatrix) { if (src.width === 0 || src.height === 0) { diff --git a/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js b/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js index cf5012867..7b45ad89a 100644 --- a/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js +++ b/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.TileSprite} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var TileSpriteCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var TileSpriteCanvasRenderer = function (renderer, src, camera, parentMatrix) { src.updateCanvas(); diff --git a/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js b/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js index e44ad9d0c..c274178f1 100644 --- a/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js +++ b/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js @@ -17,11 +17,10 @@ var Utils = require('../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.TileSprite} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var TileSpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var TileSpriteWebGLRenderer = function (renderer, src, camera, parentMatrix) { src.updateCanvas(); diff --git a/src/gameobjects/video/VideoCanvasRenderer.js b/src/gameobjects/video/VideoCanvasRenderer.js index d5b1e979d..838b0fca3 100644 --- a/src/gameobjects/video/VideoCanvasRenderer.js +++ b/src/gameobjects/video/VideoCanvasRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.GameObjects.Video} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var VideoCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var VideoCanvasRenderer = function (renderer, src, camera, parentMatrix) { if (src.videoTexture) { diff --git a/src/gameobjects/video/VideoWebGLRenderer.js b/src/gameobjects/video/VideoWebGLRenderer.js index 5b13e5fd7..f92ba7cc9 100644 --- a/src/gameobjects/video/VideoWebGLRenderer.js +++ b/src/gameobjects/video/VideoWebGLRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.GameObjects.Video} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var VideoWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var VideoWebGLRenderer = function (renderer, src, camera, parentMatrix) { if (src.videoTexture) { diff --git a/src/renderer/canvas/CanvasRenderer.js b/src/renderer/canvas/CanvasRenderer.js index 8663f69c1..e9f5b6e64 100644 --- a/src/renderer/canvas/CanvasRenderer.js +++ b/src/renderer/canvas/CanvasRenderer.js @@ -357,10 +357,9 @@ var CanvasRenderer = new Class({ * * @param {Phaser.Scene} scene - The Scene to render. * @param {Phaser.GameObjects.DisplayList} children - The Game Objects within the Scene to be rendered. - * @param {number} interpolationPercentage - The interpolation percentage to apply. Currently unused. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera to render with. */ - render: function (scene, children, interpolationPercentage, camera) + render: function (scene, children, camera) { var list = children.list; var childCount = list.length; @@ -424,7 +423,7 @@ var CanvasRenderer = new Class({ child.mask.preRenderCanvas(this, child, camera); } - child.renderCanvas(this, child, interpolationPercentage, camera); + child.renderCanvas(this, child, camera); if (child.mask) { diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 33ac17bf2..1c6a95d00 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -2210,10 +2210,9 @@ var WebGLRenderer = new Class({ * * @param {Phaser.Scene} scene - The Scene to render. * @param {Phaser.GameObjects.GameObject} children - The Game Object's within the Scene to be rendered. - * @param {number} interpolationPercentage - The interpolation percentage to apply. Currently un-used. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera to render with. */ - render: function (scene, children, interpolationPercentage, camera) + render: function (scene, children, camera) { if (this.contextLost) { return; } @@ -2282,7 +2281,7 @@ var WebGLRenderer = new Class({ this.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === this.currentType) : false; - child.renderWebGL(this, child, interpolationPercentage, camera); + child.renderWebGL(this, child, camera); this.newType = false; } diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js index faad36f12..fb78d987d 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.Tilemaps.DynamicTilemapLayer} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var DynamicTilemapLayerCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var DynamicTilemapLayerCanvasRenderer = function (renderer, src, camera, parentMatrix) { src.cull(camera); @@ -91,23 +90,23 @@ var DynamicTilemapLayerCanvasRenderer = function (renderer, src, interpolationPe { var halfWidth = tile.width / 2; var halfHeight = tile.height / 2; - + ctx.save(); ctx.translate(tile.pixelX + halfWidth, tile.pixelY + halfHeight); - + if (tile.rotation !== 0) { ctx.rotate(tile.rotation); } - + if (tile.flipX || tile.flipY) { ctx.scale((tile.flipX) ? -1 : 1, (tile.flipY) ? -1 : 1); } - + ctx.globalAlpha = alpha * tile.alpha; - + ctx.drawImage( image, tileTexCoords.x, tileTexCoords.y, @@ -115,7 +114,7 @@ var DynamicTilemapLayerCanvasRenderer = function (renderer, src, interpolationPe -halfWidth, -halfHeight, tile.width, tile.height ); - + ctx.restore(); } } diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js index fb73be46d..a42ceb85c 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js @@ -17,10 +17,9 @@ var Utils = require('../../renderer/webgl/Utils'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.Tilemaps.DynamicTilemapLayer} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. */ -var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera) +var DynamicTilemapLayerWebGLRenderer = function (renderer, src, camera) { src.cull(camera); diff --git a/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js b/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js index 2f2400f09..a33068847 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js @@ -15,11 +15,10 @@ * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. * @param {Phaser.Tilemaps.StaticTilemapLayer} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var StaticTilemapLayerCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +var StaticTilemapLayerCanvasRenderer = function (renderer, src, camera, parentMatrix) { src.cull(camera); @@ -93,7 +92,7 @@ var StaticTilemapLayerCanvasRenderer = function (renderer, src, interpolationPer var tileHeight = tileset.tileHeight; var halfWidth = tileWidth / 2; var halfHeight = tileHeight / 2; - + ctx.save(); ctx.translate(tile.pixelX + halfWidth, tile.pixelY + halfHeight); @@ -102,14 +101,14 @@ var StaticTilemapLayerCanvasRenderer = function (renderer, src, interpolationPer { ctx.rotate(tile.rotation); } - + if (tile.flipX || tile.flipY) { ctx.scale((tile.flipX) ? -1 : 1, (tile.flipY) ? -1 : 1); } ctx.globalAlpha = alpha * tile.alpha; - + ctx.drawImage( image, tileTexCoords.x, tileTexCoords.y, @@ -117,7 +116,7 @@ var StaticTilemapLayerCanvasRenderer = function (renderer, src, interpolationPer -halfWidth, -halfHeight, tileWidth, tileHeight ); - + ctx.restore(); } } diff --git a/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js b/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js index 75e168db6..64e9b5164 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js @@ -23,10 +23,9 @@ var ViewLoad2D = require('../../renderer/webgl/mvp/ViewLoad2D'); * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. * @param {Phaser.Tilemaps.StaticTilemapLayer} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. */ -var StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera) +var StaticTilemapLayerWebGLRenderer = function (renderer, src, camera) { var gl = renderer.gl; var pipeline = src.pipeline; From 99d1c76b84d11f4193cb045aa481ab1271f38dfa Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:34:01 +0100 Subject: [PATCH 107/153] Update CHANGELOG-v3.50.md --- CHANGELOG-v3.50.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index f92b59ee8..fddc019f5 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -178,6 +178,10 @@ If you used any of them in your code, please update to the new function names be * `projOrtho` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ProjectOrtho` * `Phaser.Renderer.WebGL.MVP.SetIdentity` is a new function the others use, to save on space. +### Removed 'interpolationPercentage' parameter from all render functions + +Since v3.0.0 the Game Object `render` functions have received a parameter called `interpolationPercentage` that was never used. The renderers do not calculate this value and no Game Objects apply it, so for the sake of clairty, reducing code and removing complexity from the API it has been removed from every single function that either sent or expected the parameter. This touches every single Game Object and changes the parameter order as a result, so please be aware of this if you have your own custom Game Objects that implement their own render methods. + ### BitmapText New Features, Updates and API Changes * `BitmapText.setCharacterTint` is a new method that allows you to set a tint color (either additive or fill) on a specific range of characters within a static Bitmap Text. You can specify the start and length offsets and per-corner tint colors. @@ -440,7 +444,7 @@ This has all changed in 3.50, as outlined below. Tint values are now used direct * `GroupCreateConfig`, which is used when calling `Group.createMultiple` or `Group.createFromConfig`, can now accept the following new properties: `setOrigin: { x, y, stepX, stepY }` which are applied to the items created by the Group. * `Transform.copyPosition` is a new method that will copy the position from the given object to the Game Object (thanks @samme) * The `Text.MeasureText` function, which is used to calculate the ascent and descent of Text Game Objects whenever the style, or font size, is changed, has been updated to use the new `actualBoundingBoxAscent` functions present in modern browsers. This allows for significantly faster ascent calculations than previously. Older browsers, such as IE, will still fall back (thanks @rexrainbow) -* `GameObjects.GetCalcMatrix` is a new function that is used to calculate the transformed Game Object matrix, based on the given Game Object, Camera and Parent. This function is now used by the following Game Objects: `BitmapText` (Static and Dynamic), `Graphics`, `Mesh`, `Rope`, `Shader`, `Arc`, `Curve`, `Ellipse`, `Grid`, `IsoBox`, `IsoTriangle`, `Line`, `Polygon`, `Rectangle`, `Star` and `Triangle`. This dramatically reduces the amount of duplicate code across the API. +* `GameObjects.GetCalcMatrix` is a new function that is used to calculate the transformed Game Object matrix, based on the given Game Object, Camera and Parent. This function is now used by the following Game Objects: `BitmapText` (Static and Dynamic), `Graphics`, `Extern`, `Mesh`, `Rope`, `Shader`, `Arc`, `Curve`, `Ellipse`, `Grid`, `IsoBox`, `IsoTriangle`, `Line`, `Polygon`, `Rectangle`, `Star` and `Triangle`. This dramatically reduces the amount of duplicate code across the API. ### Updates and API Changes From f97042193f6d46a6ad5f061004a2b095da6573f8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 15:35:00 +0100 Subject: [PATCH 108/153] Beta 7 tag --- package.json | 2 +- src/const.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e89220043..be157a6d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "phaser", - "version": "3.50.0-beta.6", + "version": "3.50.0-beta.7", "release": "Subaru", "description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.", "author": "Richard Davey (http://www.photonstorm.com)", diff --git a/src/const.js b/src/const.js index 348fcd433..40d15caed 100644 --- a/src/const.js +++ b/src/const.js @@ -20,7 +20,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.50.0-beta.6', + VERSION: '3.50.0-beta.7', BlendModes: require('./renderer/BlendModes'), From 52d5b00fe5adf67acb608560a0d45291c0c17eaa Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 17:34:47 +0100 Subject: [PATCH 109/153] Added `setPosition` and `translate` methods --- src/gameobjects/mesh/Vertex.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/gameobjects/mesh/Vertex.js b/src/gameobjects/mesh/Vertex.js index 60f90901d..b007617e2 100644 --- a/src/gameobjects/mesh/Vertex.js +++ b/src/gameobjects/mesh/Vertex.js @@ -84,6 +84,22 @@ var Vertex = new Class({ * @since 3.50.0 */ this.alpha = alpha; + }, + + setPosition: function (x, y) + { + this.x = x; + this.y = y; + + return this; + }, + + translate: function (x, y) + { + if (y === undefined) { y = 0; } + + this.x += x; + this.y += y; } }); From 92982d810b6f17dbbbbd42645f6a8db221c3d4d4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 14 Sep 2020 17:35:06 +0100 Subject: [PATCH 110/153] Added ability to get InCenter. translate and rotate Face --- src/gameobjects/mesh/Face.js | 131 +++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) diff --git a/src/gameobjects/mesh/Face.js b/src/gameobjects/mesh/Face.js index 2a39ce16e..86f6ae39d 100644 --- a/src/gameobjects/mesh/Face.js +++ b/src/gameobjects/mesh/Face.js @@ -5,6 +5,16 @@ */ var Class = require('../../utils/Class'); +var Vector2 = require('../../math/Vector2'); + +function GetLength (x1, y1, x2, y2) +{ + var x = x1 - x2; + var y = y1 - y2; + var magnitude = (x * x) + (y * y); + + return Math.sqrt(magnitude); +} /** * @classdesc @@ -53,6 +63,127 @@ var Face = new Class({ * @since 3.50.0 */ this.vertex3 = vertex3; + + /** + * The face inCenter. Do not access directly, instead use the `getInCenter` method. + * + * @name Phaser.GameObjects.Face#_inCenter + * @type {Phaser.Math.Vector2} + * @private + * @since 3.50.0 + */ + this._inCenter = new Vector2(); + }, + + getInCenter: function () + { + var v1 = this.vertex1; + var v2 = this.vertex2; + var v3 = this.vertex3; + + var d1 = GetLength(v3.x, v3.y, v2.x, v2.y); + var d2 = GetLength(v1.x, v1.y, v3.x, v3.y); + var d3 = GetLength(v2.x, v2.y, v1.x, v1.y); + + var p = d1 + d2 + d3; + + return this._inCenter.set( + (v1.x * d1 + v2.x * d2 + v3.x * d3) / p, + (v1.y * d1 + v2.y * d2 + v3.y * d3) / p + ); + }, + + translate: function (x, y) + { + if (y === undefined) { y = 0; } + + var v1 = this.vertex1; + var v2 = this.vertex2; + var v3 = this.vertex3; + + v1.translate(x, y); + v2.translate(x, y); + v3.translate(x, y); + + return this; + }, + + rotate: function (angle, cx, cy) + { + var x; + var y; + + // No point of rotation? Use the inCenter instead, then. + if (cx === undefined && cy === undefined) + { + var inCenter = this.getInCenter(); + + x = inCenter.x; + y = inCenter.y; + } + + var c = Math.cos(angle); + var s = Math.sin(angle); + + var v1 = this.vertex1; + var v2 = this.vertex2; + var v3 = this.vertex3; + + var tx = v1.x - x; + var ty = v1.y - y; + + v1.setPosition(tx * c - ty * s + x, tx * s + ty * c + y); + + tx = v2.x - x; + ty = v2.y - y; + + v2.setPosition(tx * c - ty * s + x, tx * s + ty * c + y); + + tx = v3.x - x; + ty = v3.y - y; + + v3.setPosition(tx * c - ty * s + x, tx * s + ty * c + y); + + return this; + }, + + x: { + + get: function () + { + return this.getInCenter().x; + }, + + set: function (value) + { + var current = this.getInCenter(); + + this.translate(value - current.x, 0); + } + + }, + + y: { + + get: function () + { + return this.getInCenter().y; + }, + + set: function (value) + { + var current = this.getInCenter(); + + this.translate(0, value - current.y); + } + + }, + + destroy: function () + { + this.vertex1 = null; + this.vertex2 = null; + this.vertex3 = null; } }); From ece3043908415410f09603a3d489eea8835b2f46 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 09:32:43 +0100 Subject: [PATCH 111/153] Deps update --- package-lock.json | 81 ++++++++++++++++++++++++++++------------------- package.json | 4 +-- 2 files changed, 51 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index fa34058a0..68c0be24d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "phaser", - "version": "3.50.0-beta.3", + "version": "3.50.0-beta.7", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -68,9 +68,9 @@ }, "dependencies": { "ajv": { - "version": "6.12.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", - "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", + "version": "6.12.5", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz", + "integrity": "sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -408,15 +408,15 @@ "dev": true }, "acorn-jsx": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", - "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", "dev": true }, "aggregate-error": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", - "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "requires": { "clean-stack": "^2.0.0", @@ -1659,9 +1659,9 @@ "dev": true }, "eslint": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.8.1.tgz", - "integrity": "sha512-/2rX2pfhyUG0y+A123d0ccXtMm7DV7sH1m3lk9nk2DZ2LReq39FXHueR9xZwshE5MdfSf0xunSaMWRqyIA6M1w==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.9.0.tgz", + "integrity": "sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1710,13 +1710,32 @@ "dev": true }, "eslint-scope": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", - "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" + }, + "dependencies": { + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + } } }, "eslint-utils": { @@ -3871,19 +3890,19 @@ "dev": true }, "remove-files-webpack-plugin": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/remove-files-webpack-plugin/-/remove-files-webpack-plugin-1.4.3.tgz", - "integrity": "sha512-NOqO5gB4uMeflnnKmouTcRWHPKCI2a3Ft44vQ7Os7avn/N3pK/TEPyCtja3W2A82BlWELXbueRUwPNhc+qNnag==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/remove-files-webpack-plugin/-/remove-files-webpack-plugin-1.4.4.tgz", + "integrity": "sha512-vCtIPQRA9Sf6yn90qepj0A8zEMZK4oHxGH+rTG74ELPprDbhJ9Phe74fj9FM6Jc5I11Q5Ah6EogqJDzSqJ6mEA==", "dev": true, "requires": { - "@types/webpack": "4.41.12", + "@types/webpack": "4.41.22", "trash": "6.1.1" }, "dependencies": { "@types/webpack": { - "version": "4.41.12", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.12.tgz", - "integrity": "sha512-BpCtM4NnBen6W+KEhrL9jKuZCXVtiH6+0b6cxdvNt2EwU949Al334PjQSl2BeAyvAX9mgoNNG21wvjP3xZJJ5w==", + "version": "4.41.22", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.22.tgz", + "integrity": "sha512-JQDJK6pj8OMV9gWOnN1dcLCyU9Hzs6lux0wBO4lr1+gyEhIBR9U3FMrz12t2GPkg110XAxEAw2WHF6g7nZIbRQ==", "dev": true, "requires": { "@types/anymatch": "*", @@ -3892,15 +3911,13 @@ "@types/uglify-js": "*", "@types/webpack-sources": "*", "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, diff --git a/package.json b/package.json index be157a6d4..3b3226cb9 100644 --- a/package.json +++ b/package.json @@ -65,12 +65,12 @@ "@types/source-map": "^0.5.7", "clean-webpack-plugin": "^3.0.0", "dts-dom": "^3.6.0", - "eslint": "^7.8.1", + "eslint": "^7.9.0", "eslint-plugin-es5": "^1.5.0", "fs-extra": "^9.0.1", "jsdoc": "^3.6.5", "node-sloc": "^0.1.12", - "remove-files-webpack-plugin": "^1.4.3", + "remove-files-webpack-plugin": "^1.4.4", "typescript": "^4.0.2", "uglifyjs-webpack-plugin": "^2.2.0", "vivid-cli": "^1.1.2", From 99c12540f77363e881a3c6061b15d5a3045fdceb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 10:35:53 +0100 Subject: [PATCH 112/153] `Utils.Array.Matrix.Translate` is a new function that will translate an Array Matrix by horizontally and vertically by the given amounts. --- src/utils/array/matrix/TranslateMatrix.js | 83 +++++++++++++++++++++++ src/utils/array/matrix/index.js | 1 + 2 files changed, 84 insertions(+) create mode 100644 src/utils/array/matrix/TranslateMatrix.js diff --git a/src/utils/array/matrix/TranslateMatrix.js b/src/utils/array/matrix/TranslateMatrix.js new file mode 100644 index 000000000..daae10ea5 --- /dev/null +++ b/src/utils/array/matrix/TranslateMatrix.js @@ -0,0 +1,83 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateLeft = require('../RotateLeft'); +var RotateRight = require('../RotateRight'); + +/** + * Translates the given Array Matrix by shifting each column and row the + * amount specified. + * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) + * have the same length. There must be at least two rows. This is an example matrix: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * + * @function Phaser.Utils.Array.Matrix.Translate + * @since 3.50.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to translate. + * @param {number} [x=0] - The amount to horizontally translate the matrix by. + * @param {number} [y=0] - The amount to vertically translate the matrix by. + * + * @return {T[][]} The translated matrix. + */ +var TranslateMatrix = function (matrix, x, y) +{ + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + // Vertical translation + + if (y !== 0) + { + if (y < 0) + { + // Shift Up + RotateLeft(matrix, Math.abs(y)); + } + else + { + // Shift Down + RotateRight(matrix, y); + } + } + + // Horizontal translation + + if (x !== 0) + { + for (var i = 0; i < matrix.length; i++) + { + var row = matrix[i]; + + if (x < 0) + { + RotateLeft(row, Math.abs(x)); + } + else + { + RotateRight(row, x); + } + } + } + + return matrix; +}; + +module.exports = TranslateMatrix; diff --git a/src/utils/array/matrix/index.js b/src/utils/array/matrix/index.js index 85ce156f8..91bd253c4 100644 --- a/src/utils/array/matrix/index.js +++ b/src/utils/array/matrix/index.js @@ -18,6 +18,7 @@ module.exports = { RotateLeft: require('./RotateLeft'), RotateMatrix: require('./RotateMatrix'), RotateRight: require('./RotateRight'), + Translate: require('./TranslateMatrix'), TransposeMatrix: require('./TransposeMatrix') }; From 08b4597b72d3e4808915d41ad337c8b7faf02283 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 10:37:19 +0100 Subject: [PATCH 113/153] Improved JSDocs --- src/utils/array/matrix/CheckMatrix.js | 21 +++++++++++---------- src/utils/array/matrix/MatrixToString.js | 14 ++++++++++++++ src/utils/array/matrix/ReverseColumns.js | 14 ++++++++++++++ src/utils/array/matrix/ReverseRows.js | 14 ++++++++++++++ src/utils/array/matrix/Rotate180.js | 14 ++++++++++++++ src/utils/array/matrix/RotateLeft.js | 14 ++++++++++++++ src/utils/array/matrix/RotateMatrix.js | 14 ++++++++++++++ src/utils/array/matrix/RotateRight.js | 14 ++++++++++++++ src/utils/array/matrix/TransposeMatrix.js | 18 ++++++++++++++++-- 9 files changed, 125 insertions(+), 12 deletions(-) diff --git a/src/utils/array/matrix/CheckMatrix.js b/src/utils/array/matrix/CheckMatrix.js index 82b63ac6a..bea1e7fd1 100644 --- a/src/utils/array/matrix/CheckMatrix.js +++ b/src/utils/array/matrix/CheckMatrix.js @@ -7,22 +7,23 @@ /** * Checks if an array can be used as a matrix. * - * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows: + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) + * have the same length. There must be at least two rows. This is an example matrix: * * ``` - * [ - * [ 1, 1, 1, 1, 1, 1 ], - * [ 2, 0, 0, 0, 0, 4 ], - * [ 2, 0, 1, 2, 0, 4 ], - * [ 2, 0, 3, 4, 0, 4 ], - * [ 2, 0, 0, 0, 0, 4 ], - * [ 3, 3, 3, 3, 3, 3 ] - * ] + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] * ``` * * @function Phaser.Utils.Array.Matrix.CheckMatrix * @since 3.0.0 - * + * * @generic T * @genericUse {T[][]} - [matrix] * diff --git a/src/utils/array/matrix/MatrixToString.js b/src/utils/array/matrix/MatrixToString.js index 0b2602cd0..a9b79a489 100644 --- a/src/utils/array/matrix/MatrixToString.js +++ b/src/utils/array/matrix/MatrixToString.js @@ -10,6 +10,20 @@ var CheckMatrix = require('./CheckMatrix'); /** * Generates a string (which you can pass to console.log) from the given Array Matrix. * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) + * have the same length. There must be at least two rows. This is an example matrix: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * * @function Phaser.Utils.Array.Matrix.MatrixToString * @since 3.0.0 * diff --git a/src/utils/array/matrix/ReverseColumns.js b/src/utils/array/matrix/ReverseColumns.js index b9aebed49..ed2de076d 100644 --- a/src/utils/array/matrix/ReverseColumns.js +++ b/src/utils/array/matrix/ReverseColumns.js @@ -7,6 +7,20 @@ /** * Reverses the columns in the given Array Matrix. * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) + * have the same length. There must be at least two rows. This is an example matrix: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * * @function Phaser.Utils.Array.Matrix.ReverseColumns * @since 3.0.0 * diff --git a/src/utils/array/matrix/ReverseRows.js b/src/utils/array/matrix/ReverseRows.js index 7488ed5c1..ec839ce5b 100644 --- a/src/utils/array/matrix/ReverseRows.js +++ b/src/utils/array/matrix/ReverseRows.js @@ -7,6 +7,20 @@ /** * Reverses the rows in the given Array Matrix. * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) + * have the same length. There must be at least two rows. This is an example matrix: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * * @function Phaser.Utils.Array.Matrix.ReverseRows * @since 3.0.0 * diff --git a/src/utils/array/matrix/Rotate180.js b/src/utils/array/matrix/Rotate180.js index 88455978f..099102f39 100644 --- a/src/utils/array/matrix/Rotate180.js +++ b/src/utils/array/matrix/Rotate180.js @@ -9,6 +9,20 @@ var RotateMatrix = require('./RotateMatrix'); /** * Rotates the array matrix 180 degrees. * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) + * have the same length. There must be at least two rows. This is an example matrix: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * * @function Phaser.Utils.Array.Matrix.Rotate180 * @since 3.0.0 * diff --git a/src/utils/array/matrix/RotateLeft.js b/src/utils/array/matrix/RotateLeft.js index d42599ec0..c404d357a 100644 --- a/src/utils/array/matrix/RotateLeft.js +++ b/src/utils/array/matrix/RotateLeft.js @@ -9,6 +9,20 @@ var RotateMatrix = require('./RotateMatrix'); /** * Rotates the array matrix to the left (or 90 degrees) * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) + * have the same length. There must be at least two rows. This is an example matrix: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * * @function Phaser.Utils.Array.Matrix.RotateLeft * @since 3.0.0 * diff --git a/src/utils/array/matrix/RotateMatrix.js b/src/utils/array/matrix/RotateMatrix.js index 696b32bcd..841594b13 100644 --- a/src/utils/array/matrix/RotateMatrix.js +++ b/src/utils/array/matrix/RotateMatrix.js @@ -15,6 +15,20 @@ var TransposeMatrix = require('./TransposeMatrix'); * * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) + * have the same length. There must be at least two rows. This is an example matrix: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * * @function Phaser.Utils.Array.Matrix.RotateMatrix * @since 3.0.0 * diff --git a/src/utils/array/matrix/RotateRight.js b/src/utils/array/matrix/RotateRight.js index f88a16eec..fcb8e3b2b 100644 --- a/src/utils/array/matrix/RotateRight.js +++ b/src/utils/array/matrix/RotateRight.js @@ -9,6 +9,20 @@ var RotateMatrix = require('./RotateMatrix'); /** * Rotates the array matrix to the left (or -90 degrees) * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) + * have the same length. There must be at least two rows. This is an example matrix: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * * @function Phaser.Utils.Array.Matrix.RotateRight * @since 3.0.0 * diff --git a/src/utils/array/matrix/TransposeMatrix.js b/src/utils/array/matrix/TransposeMatrix.js index ec8326995..a6df7fb5f 100644 --- a/src/utils/array/matrix/TransposeMatrix.js +++ b/src/utils/array/matrix/TransposeMatrix.js @@ -9,12 +9,26 @@ * * The transpose of a matrix is a new matrix whose rows are the columns of the original. * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) + * have the same length. There must be at least two rows. This is an example matrix: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * * @function Phaser.Utils.Array.Matrix.TransposeMatrix * @since 3.0.0 - * + * * @generic T * @genericUse {T[][]} - [array,$return] - * + * * @param {T[][]} [array] - The array matrix to transpose. * * @return {T[][]} A new array matrix which is a transposed version of the given array. From 36e675fa42fa1a3587a3b0a7201cc9c2e57de40b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 10:37:22 +0100 Subject: [PATCH 114/153] Update CHANGELOG-v3.50.md --- CHANGELOG-v3.50.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index fddc019f5..87a35ffb6 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -445,6 +445,7 @@ This has all changed in 3.50, as outlined below. Tint values are now used direct * `Transform.copyPosition` is a new method that will copy the position from the given object to the Game Object (thanks @samme) * The `Text.MeasureText` function, which is used to calculate the ascent and descent of Text Game Objects whenever the style, or font size, is changed, has been updated to use the new `actualBoundingBoxAscent` functions present in modern browsers. This allows for significantly faster ascent calculations than previously. Older browsers, such as IE, will still fall back (thanks @rexrainbow) * `GameObjects.GetCalcMatrix` is a new function that is used to calculate the transformed Game Object matrix, based on the given Game Object, Camera and Parent. This function is now used by the following Game Objects: `BitmapText` (Static and Dynamic), `Graphics`, `Extern`, `Mesh`, `Rope`, `Shader`, `Arc`, `Curve`, `Ellipse`, `Grid`, `IsoBox`, `IsoTriangle`, `Line`, `Polygon`, `Rectangle`, `Star` and `Triangle`. This dramatically reduces the amount of duplicate code across the API. +* `Utils.Array.Matrix.Translate` is a new function that will translate an Array Matrix by horizontally and vertically by the given amounts. ### Updates and API Changes From 5e5b8c0938c159a9bb5c8f3c0c5ecceb4aacf19b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 11:54:12 +0100 Subject: [PATCH 115/153] The `WebGLPipeline.shouldFlush` method now accepts an optional parameter `amount`. If given, it will return `true` if when the amount is added to the vertex count it will exceed the vertex capacity. The Multi Pipeline has been updated to now use this method instead of performing the comparison multiple times itself. --- src/renderer/webgl/WebGLPipeline.js | 12 ++++++++++-- src/renderer/webgl/pipelines/MultiPipeline.js | 6 +++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index fa0f21ce4..bc979460c 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -343,14 +343,22 @@ var WebGLPipeline = new Class({ /** * Check if the current batch of vertices is full. * + * You can optionally provide an `amount` parameter. If given, it will check if the batch + * needs to flush _if_ the `amount` is added to it. This allows you to test if you should + * flush before populating the batch. + * * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush * @since 3.0.0 * + * @param {integer} [amount=0] - Will the batch need to flush if this many vertices are added to it? + * * @return {boolean} `true` if the current batch should be flushed, otherwise `false`. */ - shouldFlush: function () + shouldFlush: function (amount) { - return (this.vertexCount >= this.vertexCapacity); + if (amount === undefined) { amount = 0; } + + return (this.vertexCount + amount >= this.vertexCapacity); }, /** diff --git a/src/renderer/webgl/pipelines/MultiPipeline.js b/src/renderer/webgl/pipelines/MultiPipeline.js index 8c34b22e2..efe45025f 100644 --- a/src/renderer/webgl/pipelines/MultiPipeline.js +++ b/src/renderer/webgl/pipelines/MultiPipeline.js @@ -546,7 +546,7 @@ var MultiPipeline = new Class({ } // So batchQuad never assigns a unit to the glTexture, but to the textureSource instead - if (this.vertexCount + 6 > this.vertexCapacity) + if (this.shouldFlush(6)) { this.flush(); } @@ -606,7 +606,7 @@ var MultiPipeline = new Class({ var hasFlushed = false; - if (this.vertexCount + 6 > this.vertexCapacity) + if (this.shouldFlush(6)) { this.flush(); @@ -716,7 +716,7 @@ var MultiPipeline = new Class({ var hasFlushed = false; - if (this.vertexCount + 3 > this.vertexCapacity) + if (this.shouldFlush(3)) { this.flush(); From b763fa0f186c5af87abc19d8c7422676417c09c2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 11:57:22 +0100 Subject: [PATCH 116/153] The Mesh now renders by iterating through the Faces array, not the vertices. This allows you to use Array methods such as `BringToTop` to reposition a Face, thus changing the drawing order without having to repopulate all of the vertices. --- src/gameobjects/mesh/MeshWebGLRenderer.js | 67 ++++++++++++----------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/src/gameobjects/mesh/MeshWebGLRenderer.js b/src/gameobjects/mesh/MeshWebGLRenderer.js index e2be58523..c9ce5ceb9 100644 --- a/src/gameobjects/mesh/MeshWebGLRenderer.js +++ b/src/gameobjects/mesh/MeshWebGLRenderer.js @@ -5,7 +5,6 @@ */ var GetCalcMatrix = require('../GetCalcMatrix'); -var Utils = require('../../renderer/webgl/Utils'); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -27,58 +26,62 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; - var vertices = src.vertices; - var vertexCount = Math.floor(vertices.length); - - if (pipeline.vertexCount + vertexCount > pipeline.vertexCapacity) - { - pipeline.flush(); - } - var textureUnit = pipeline.setGameObject(src); - var vertexViewF32 = pipeline.vertexViewF32; - var vertexViewU32 = pipeline.vertexViewU32; + var F32 = pipeline.vertexViewF32; + var U32 = pipeline.vertexViewU32; var vertexOffset = (pipeline.vertexCount * pipeline.vertexComponentCount) - 1; + var faces = src.faces; var tintEffect = src.tintFill; var debugCallback = src.debugCallback; var debugVerts = []; - for (var i = 0; i < vertexCount; i++) + var a = calcMatrix.a; + var b = calcMatrix.b; + var c = calcMatrix.c; + var d = calcMatrix.d; + var e = calcMatrix.e; + var f = calcMatrix.f; + + var roundPixels = camera.roundPixels; + var alpha = camera.alpha * src.alpha; + + for (var i = 0; i < faces.length; i++) { - var vertex = vertices[i]; - - var tx = vertex.x * calcMatrix.a + vertex.y * calcMatrix.c + calcMatrix.e; - var ty = vertex.x * calcMatrix.b + vertex.y * calcMatrix.d + calcMatrix.f; - - if (camera.roundPixels) + if (pipeline.shouldFlush(3)) { - tx = Math.round(tx); - ty = Math.round(ty); + pipeline.flush(); + + vertexOffset = 0; } + var face = faces[i]; + + vertexOffset = face.vertex1.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f, roundPixels); + vertexOffset = face.vertex2.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f, roundPixels); + vertexOffset = face.vertex3.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f, roundPixels); + + pipeline.vertexCount += 3; + if (debugCallback) { - debugVerts.push(tx, ty); + debugVerts.push( + F32[vertexOffset - 20], + F32[vertexOffset - 19], + F32[vertexOffset - 13], + F32[vertexOffset - 12], + F32[vertexOffset - 6], + F32[vertexOffset - 5] + ); } - - vertexViewF32[++vertexOffset] = tx; - vertexViewF32[++vertexOffset] = ty; - vertexViewF32[++vertexOffset] = vertex.u; - vertexViewF32[++vertexOffset] = vertex.v; - vertexViewF32[++vertexOffset] = textureUnit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = Utils.getTintAppendFloatAlpha(vertex.color, camera.alpha * src.alpha * vertex.alpha); } - pipeline.vertexCount += vertexCount; - if (debugCallback) { - debugCallback.call(src, src, vertexCount * 2, debugVerts); + debugCallback.call(src, src, src.vertices.length * 2, debugVerts); } }; From d8a8aa84480496fdbe7d80f0ebc5195eba418b17 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 11:57:44 +0100 Subject: [PATCH 117/153] Added `clearVertices` and renamed to `addVertices` so you can append on more verts post-creation --- src/gameobjects/mesh/Mesh.js | 47 +++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/src/gameobjects/mesh/Mesh.js b/src/gameobjects/mesh/Mesh.js index 243a45942..4376b3bf5 100644 --- a/src/gameobjects/mesh/Mesh.js +++ b/src/gameobjects/mesh/Mesh.js @@ -10,6 +10,7 @@ var Components = require('../components'); var Face = require('./Face'); var GameObject = require('../GameObject'); var GameObjectEvents = require('../events'); +var GetCalcMatrix = require('../GetCalcMatrix'); var MeshRender = require('./MeshRender'); var Vertex = require('./Vertex'); @@ -94,7 +95,7 @@ var Mesh = new Class({ * @type {Phaser.GameObjects.Face[]} * @since 3.50.0 */ - this.faces; + this.faces = []; /** * An array containing Vertex instances. One instance per vertex in this Mesh. @@ -105,7 +106,7 @@ var Mesh = new Class({ * @type {Phaser.GameObjects.Vertex[]} * @since 3.50.0 */ - this.vertices; + this.vertices = []; /** * The tint fill mode. @@ -156,9 +157,10 @@ var Mesh = new Class({ this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); - this.setVertices(vertices, uvs, indicies, colors, alphas); this.initPipeline(); + this.addVertices(vertices, uvs, indicies, colors, alphas); + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); }, @@ -175,7 +177,20 @@ var Mesh = new Class({ this.scene.sys.updateList.remove(this); }, - setVertices: function (vertices, uvs, indicies, colors, alphas) + clearVertices: function () + { + this.faces.forEach(function (face) + { + face.destroy(); + }); + + this.faces = []; + this.vertices = []; + + return this; + }, + + addVertices: function (vertices, uvs, indicies, colors, alphas) { if (colors === undefined) { colors = 0xffffff; } if (alphas === undefined) { alphas = 1; } @@ -187,8 +202,8 @@ var Mesh = new Class({ var i; var vert; - var verts = []; - var faces = []; + var verts = this.vertices; + var faces = this.faces; var isColorArray = Array.isArray(colors); var isAlphaArray = Array.isArray(alphas); @@ -243,9 +258,6 @@ var Mesh = new Class({ faces.push(face); } - this.vertices = verts; - this.faces = faces; - return this; }, @@ -268,8 +280,22 @@ var Mesh = new Class({ { if (camera === undefined) { camera = this.scene.sys.cameras.main; } + var calcMatrix = GetCalcMatrix(this, camera).calc; + var faces = this.faces; + var results = []; + for (var i = 0; i < faces.length; i++) + { + var face = faces[i]; + + if (face.contains(x, y, calcMatrix)) + { + results.push(face); + } + } + + return results; }, /** @@ -381,8 +407,7 @@ var Mesh = new Class({ this.anims = undefined; - this.vertices = null; - this.faces = null; + this.clearVertices(); this.debugCallback = null; this.debugGraphic = null; From 8ff1c7ca5063039ecd6ca2811c8e9909dd43fd28 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 12:02:45 +0100 Subject: [PATCH 118/153] Update CHANGELOG-v3.50.md --- CHANGELOG-v3.50.md | 63 ++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index 87a35ffb6..66c5e5b73 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -28,6 +28,7 @@ Other pipeline changes are as follows: * All pipelines will now extract the `vertexData` property from the config, allowing you to set it externally. * All pipelines will now extract the `attributes` property from the config, allowing you to set it externally. * All pipelines will now extract the `topology` property from the config, allowing you to set it externally. +* The `WebGLPipeline.shouldFlush` method now accepts an optional parameter `amount`. If given, it will return `true` if when the amount is added to the vertex count it will exceed the vertex capacity. The Multi Pipeline has been updated to now use this method instead of performing the comparison multiple times itself. ### Pipeline Manager @@ -178,11 +179,7 @@ If you used any of them in your code, please update to the new function names be * `projOrtho` is now available as a stand-alone function `Phaser.Renderer.WebGL.MVP.ProjectOrtho` * `Phaser.Renderer.WebGL.MVP.SetIdentity` is a new function the others use, to save on space. -### Removed 'interpolationPercentage' parameter from all render functions - -Since v3.0.0 the Game Object `render` functions have received a parameter called `interpolationPercentage` that was never used. The renderers do not calculate this value and no Game Objects apply it, so for the sake of clairty, reducing code and removing complexity from the API it has been removed from every single function that either sent or expected the parameter. This touches every single Game Object and changes the parameter order as a result, so please be aware of this if you have your own custom Game Objects that implement their own render methods. - -### BitmapText New Features, Updates and API Changes +### BitmapText - New Features, Updates and API Changes * `BitmapText.setCharacterTint` is a new method that allows you to set a tint color (either additive or fill) on a specific range of characters within a static Bitmap Text. You can specify the start and length offsets and per-corner tint colors. * `BitmapText.setWordTint` is a new method that allows you to set a tint color (either additive or fill) on all matching words within a static Bitmap Text. You can specify the word by string, or numeric offset, and the number of replacements to tint. @@ -249,7 +246,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * The Spine Plugin `destroy` method will now no longer remove the Game Objects from the Game Object Factory, or dispose of the Scene Renderer. This means when a Scene is destroyed, it will keep the Game Objects in the factory for other Scene's to use. Fix #5279 (thanks @Racoonacoon) * `SpinePlugin.gameDestroy` is a new method that is called if the Game instance emits a `destroy` event. It removes the Spine Game Objects from the factory and disposes of the Spine scene renderer. -### Animation API New Features and Updates +### Animation API - New Features and Updates If you use Animations in your game, please read the following important API changes in 3.50: @@ -352,18 +349,20 @@ The Animation API has had a significant overhaul to improve playback handling. I * `GenerateFrameNumbers` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. * `GenerateFrameNames` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. -### Mesh Game Object New Features and Updates +### Mesh Game Object - New Features, Updates and API Changes The Mesh Game Object has been rewritten in v3.50 with a lot of internal changes to make it more useful: * `GameObject.Vertex` is a new micro class that encapsulates all of the data required for a single vertex, such as position, uv, color and alpha. This class is now created internally by the Mesh Game Object. * `GameObject.Face` is a new micro class that consists of references to the three `Vertex` instances that construct the single Face. * `Mesh.vertices` is now an array of `GameObject.Vertex` instances, not a Float32Array. -* `Mesh.faces` is a new array of `GameObject.Face` instances, which is populated during a call to `setVertices`. -* `Mesh.setVertices` is a new method that allows you to set the verts of a Mesh Game Object from the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage. +* `Mesh.faces` is a new array of `GameObject.Face` instances, which is populated during a call to `addVertices`. +* `Mesh.addVertices` is a new method that allows you to add vertices to a Mesh Game Object based on the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage. +* `Mesh.clearVertices` is a new method that will destroy all Faces and Vertices and clear the Mesh. +* The Mesh now renders by iterating through the Faces array, not the vertices. This allows you to use Array methods such as `BringToTop` to reposition a Face, thus changing the drawing order without having to repopulate all of the vertices. * The Mesh constructor signature has changed to `scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame`, where `indicies` is the new parameter added to the list. It allows you to provide indexed vertex data to create the Mesh from, where the `indicies` array holds the vertex index information. The final list of vertices is built from this index along with the provided vertices and uvs arrays. -* You can now supply just a single numerical value as the `color` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the color for all vertices created. -* You can now supply just a single numerical value as the `alpha` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created. +* You can now supply just a single numerical value as the `color` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the color for all vertices created. +* You can now supply just a single numerical value as the `alpha` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created. * The `Mesh` Game Object now extends the `SingleAlpha` component and the alpha value is factored into the final alpha value per vertex during rendering. This means you can now set the whole alpha across the Mesh using the standard `setAlpha` methods. But, if you wish to, you can still control the alpha on a per-vertex basis as well. * The `Mesh` Game Object now has the Animation State Component. This allows you to create and play animations across the texture of a Mesh, something that previously wasn't possible. As a result, the Mesh now adds itself to the Update List when added to a Scene. * `Mesh.setDebug` is a new method that allows you to render a debug visualisation of the Mesh vertices to a Graphics Game Object. You can provide your own Graphics instance and optionally callback that is invoked during rendering. This allows you to easily visualise the vertices of your Mesh to help debug UV mapping. @@ -414,6 +413,29 @@ This has all changed in 3.50, as outlined below. Tint values are now used direct * The `TextureManager` now generates a new texture with the key `__WHITE` durings its boot process. This is a pure white 4x4 texture used by the Graphics pipelines. * `Config.images.white` is a new Game Config property that specifies the 4x4 white PNG texture used by Graphics rendering. You can override this via the config, but only do so if needed. +### Removal of 'resolution' property from across the API + +For legacy reasons, Phaser 3 has never properly supported HighDPI devices. It will render happily to them of course, but wouldn't let you set a 'resolution' for the Canvas beyond 1. Earlier versions of 3.x had a resolution property in the Game Config, but it was never fully implemented (for example, it would break zooming cameras). When the Scale Manager was introduced in v3.16 we forced the resolution to be 1 to avoid it breaking anything else internally. + +For a long time, the 'resolution' property has been present - taunting developers and confusing new comers. In this release we have finally gone through and removed all references to it. The Game Config option is now gone, it's removed from the Scale Manager, Base Camera and everywhere else where it matters. As much as we would have liked to implement the feature, we've spent too long without it, and things have been built around the assumption it isn't present. The API just wouldn't cope with having it shoe-horned in at this stage. As frustrating as this is, it's even more annoying to just leave the property there confusing people and wasting CPU cycles. Phaser 4 has been built with HighDPI screens in mind from the very start, but it's too late for v3. The following changes are a result of this removal: + +* The `Phaser.Scale.Events#RESIZE` event no longer sends the `resolution` as a parameter. +* The `BaseCamera.resolution` property has been removed. +* The internal private `BaseCamera._cx`, `_cy`, `_cw` and `_ch` properties has been removed. +* The `BaseCamera.preRender` method no longer receives or uses the `resolution` parameter. +* The `Camera.preRender` method no longer receives or uses the `resolution` parameter. +* The `CameraManager.onResize` method no longer receives or uses the `resolution` parameter. +* The `Core.Config.resolution` property has been removed. +* The `TextStyle.resolution` property is no longer read from the Game Config. You can still set it via the Text Style config to a value other than 1, but it will default to this now. +* The `CanvasRenderer` no longer reads or uses the Game Config resolution property. +* The `PipelineManager.resize` method along with `WebGLPipeline.resize` and anything else that extends them no longer receives or uses the `resolution` parameter. +* The `WebGLRenderer.resize` and `onResize` methods no longer receives or uses the `resolution` parameter. +* The `ScaleManager.resolution` property has been removed and all internal use of it. + +### Removed 'interpolationPercentage' parameter from all render functions + +Since v3.0.0 the Game Object `render` functions have received a parameter called `interpolationPercentage` that was never used. The renderers do not calculate this value and no Game Objects apply it, so for the sake of clairty, reducing code and removing complexity from the API it has been removed from every single function that either sent or expected the parameter. This touches every single Game Object and changes the parameter order as a result, so please be aware of this if you have your own _custom_ Game Objects that implement their own `render` methods. In terms of surface API changes, you shouldn't notice anything at all from this removal. + ### New Features * `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value. @@ -535,25 +557,6 @@ This has all changed in 3.50, as outlined below. Tint values are now used direct * The `Phaser.Tilemaps.Parsers.Tiled` function has now been exposed on the Phaser namespace (thanks @samme) * Every single `Tilemap.Component` function has now been made public. This means you can call the Component functions directly, should you need to, outside of the Tilemap system. -### Removal of 'Resolution' property from across the API - -For legacy reasons, Phaser 3 has never properly supported HighDPI devices. It will render happily to them of course, but wouldn't let you set a 'resolution' for the Canvas beyond 1. Earlier versions of 3.x had a resolution property in the Game Config, but it was never fully implemented (for example, it would break zooming cameras). When the Scale Manager was introduced in v3.16 we forced the resolution to be 1 to avoid it breaking anything else internally. - -For a long time, the 'resolution' property has been present - taunting developers and confusing new comers. In this release we have finally gone through and removed all references to it. The Game Config option is now gone, it's removed from the Scale Manager, Base Camera and everywhere else where it matters. As much as we would have liked to implement the feature, we've spent too long without and things have been built around the assumption it isn't present that just wouldn't cope with having it shoe-horned in at this stage. As frustrating as this is, it's even more annoying to just leave the property there confusing people and wasting CPU cycles. Phaser 4 has been built with HighDPI screens in mind from the very start, but it's just too late for v3. The following changes are a result of this removal: - -* The `Phaser.Scale.Events#RESIZE` event no longer sends the `resolution` as a parameter. -* The `BaseCamera.resolution` property has been removed. -* The internal private `BaseCamera._cx`, `_cy`, `_cw` and `_ch` properties has been removed. -* The `BaseCamera.preRender` method no longer receives or uses the `resolution` parameter. -* The `Camera.preRender` method no longer receives or uses the `resolution` parameter. -* The `CameraManager.onResize` method no longer receives or uses the `resolution` parameter. -* The `Core.Config.resolution` property has been removed. -* The `TextStyle.resolution` property is no longer read from the Game Config. You can still set it via the Text Style config to a value other than 1, but it will default to this now. -* The `CanvasRenderer` no longer reads or uses the Game Config resolution property. -* The `PipelineManager.resize` method along with `WebGLPipeline.resize` and anything else that extends them no longer receives or uses the `resolution` parameter. -* The `WebGLRenderer.resize` and `onResize` methods no longer receives or uses the `resolution` parameter. -* The `ScaleManager.resolution` property has been removed and all internal use of it. - ### 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: From bd2c56e3063c2a887d3266baf37ff0c4050fde0c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 18:04:26 +0100 Subject: [PATCH 119/153] Typo fix --- src/loader/filetypes/HTMLFile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader/filetypes/HTMLFile.js b/src/loader/filetypes/HTMLFile.js index 1793dc99d..a32274c6f 100644 --- a/src/loader/filetypes/HTMLFile.js +++ b/src/loader/filetypes/HTMLFile.js @@ -27,7 +27,7 @@ var IsPlainObject = require('../../utils/object/IsPlainObject'); * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. * @param {(string|Phaser.Types.Loader.FileTypes.HTMLFileConfig)} key - The key to use for this file, or a file configuration object. - * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.html". + * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.html`, i.e. if `key` was "alien" then the URL will be "alien.html". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. */ var HTMLFile = new Class({ From a0b47e8c5f408bde9eaef6861249375348e0cf5c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 18:05:47 +0100 Subject: [PATCH 120/153] `Geom.ParseObj` is a new function that will parse a Wavefront OBJ file into model data that can be consumed by the Mesh Game Object. --- src/geom/ParseObj.js | 301 +++++++++++++++++++++++++++++++++++++++++++ src/geom/index.js | 3 +- 2 files changed, 303 insertions(+), 1 deletion(-) create mode 100644 src/geom/ParseObj.js diff --git a/src/geom/ParseObj.js b/src/geom/ParseObj.js new file mode 100644 index 000000000..975960939 --- /dev/null +++ b/src/geom/ParseObj.js @@ -0,0 +1,301 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var flip = true; + +var defaultModelName = 'untitled'; +var currentGroup = ''; +var currentMaterial = ''; + +/** + * @ignore + */ +function stripComments (line) +{ + var idx = line.indexOf('#'); + + return (idx > -1) ? line.substring(0, idx) : line; +} + +/** + * @ignore + */ +function currentModel (result) +{ + if (result.models.length === 0) + { + result.models.push({ + faces: [], + name: defaultModelName, + textureCoords: [], + vertexNormals: [], + vertices: [] + }); + } + + currentGroup = ''; + + return result.models[result.models.length - 1]; +} + +/** + * @ignore + */ +function parseObject (lineItems, result) +{ + var modelName = lineItems.length >= 2 ? lineItems[1] : defaultModelName; + + result.models.push({ + faces: [], + name: modelName, + textureCoords: [], + vertexNormals: [], + vertices: [] + }); + + currentGroup = ''; +} + +/** + * @ignore + */ +function parseGroup (lineItems) +{ + if (lineItems.length === 2) + { + currentGroup = lineItems[1]; + } +} + +/** + * @ignore + */ +function parseVertexCoords (lineItems, result) +{ + var len = lineItems.length; + + var x = (len >= 2) ? parseFloat(lineItems[1]) : 0; + var y = (len >= 3) ? parseFloat(lineItems[2]) : 0; + var z = (len >= 4) ? parseFloat(lineItems[3]) : 0; + + currentModel(result).vertices.push({ x: x, y: y, z: z }); +} + +/** + * @ignore + */ +function parseTextureCoords (lineItems, result) +{ + var len = lineItems.length; + + var u = (len >= 2) ? parseFloat(lineItems[1]) : 0; + var v = (len >= 3) ? parseFloat(lineItems[2]) : 0; + var w = (len >= 4) ? parseFloat(lineItems[3]) : 0; + + if (isNaN(u)) + { + u = 0; + } + + if (isNaN(v)) + { + v = 0; + } + + if (isNaN(w)) + { + w = 0; + } + + if (flip) + { + v = 1 - v; + } + + currentModel(result).textureCoords.push({ u: u, v: v, w: w }); +} + +/** + * @ignore + */ +function parseVertexNormal (lineItems, result) +{ + var len = lineItems.length; + + var x = (len >= 2) ? parseFloat(lineItems[1]) : 0; + var y = (len >= 3) ? parseFloat(lineItems[2]) : 0; + var z = (len >= 4) ? parseFloat(lineItems[3]) : 0; + + currentModel(result).vertexNormals.push({ x: x, y: y, z: z }); +} + +/** + * @ignore + */ +function parsePolygon (lineItems, result) +{ + var totalVertices = lineItems.length - 1; + + if (totalVertices < 3) + { + return; + } + + var face = { + group: currentGroup, + material: currentMaterial, + vertices: [] + }; + + for (var i = 0; i < totalVertices; i++) + { + var vertexString = lineItems[i + 1]; + var vertexValues = vertexString.split('/'); + var vvLen = vertexValues.length; + + if (vvLen < 1 || vvLen > 3) + { + continue; + } + + var vertexIndex = 0; + var textureCoordsIndex = 0; + var vertexNormalIndex = 0; + + vertexIndex = parseInt(vertexValues[0], 10); + + if (vvLen > 1 && vertexValues[1] !== '') + { + textureCoordsIndex = parseInt(vertexValues[1], 10); + } + + if (vvLen > 2) + { + vertexNormalIndex = parseInt(vertexValues[2], 10); + } + + if (vertexIndex !== 0) + { + // Negative vertex indices refer to the nth last defined vertex + // convert these to postive indices for simplicity + if (vertexIndex < 0) + { + vertexIndex = currentModel(result).vertices.length + 1 + vertexIndex; + } + + textureCoordsIndex -= 1; + vertexIndex -= 1; + vertexNormalIndex -= 1; + + face.vertices.push({ + textureCoordsIndex: textureCoordsIndex, + vertexIndex: vertexIndex, + vertexNormalIndex: vertexNormalIndex + }); + } + } + + currentModel(result).faces.push(face); +} + +/** + * @ignore + */ +function parseMtlLib (lineItems, result) +{ + if (lineItems.length >= 2) + { + result.materialLibraries.push(lineItems[1]); + } +} + +/** + * @ignore + */ +function parseUseMtl (lineItems) +{ + if (lineItems.length >= 2) + { + currentMaterial = lineItems[1]; + } +} + +/** + * Parses a Wavefront OBJ File, extracting the models from it and returning them + * in an array. + * + * @function Phaser.Geom.ParseObj + * @since 3.50.0 + * + * @param {string} data - The OBJ File data as a raw string. + * @param {boolean} [flipUV=true] - + * + * @return {array} An array of model data. + */ +var ParseObj = function (data, flipUV) +{ + if (flipUV === undefined) { flipUV = true; } + + flip = flipUV; + + // Store results in here + var result = { + materialLibraries: [], + models: [] + }; + + currentGroup = ''; + currentMaterial = ''; + + var lines = data.split('\n'); + + for (var i = 0; i < lines.length; i++) + { + var line = stripComments(lines[i]); + + var lineItems = line.replace(/\s\s+/g, ' ').trim().split(' '); + + switch (lineItems[0].toLowerCase()) + { + case 'o': + // Start A New Model + parseObject(lineItems, result); + break; + case 'g': + // Start a new polygon group + parseGroup(lineItems); + break; + case 'v': + // Define a vertex for the current model + parseVertexCoords(lineItems, result); + break; + case 'vt': + // Texture Coords + parseTextureCoords(lineItems, result); + break; + case 'vn': + // Define a vertex normal for the current model + parseVertexNormal(lineItems, result); + break; + case 'f': + // Define a Face/Polygon + parsePolygon(lineItems, result); + break; + case 'mtllib': + // Reference to a material library file (.mtl) + parseMtlLib(lineItems, result); + break; + case 'usemtl': + // Sets the current material to be applied to polygons defined from this point forward + parseUseMtl(lineItems); + break; + } + } + + return result; +}; + +module.exports = ParseObj; diff --git a/src/geom/index.js b/src/geom/index.js index 2208184af..f637bb93d 100644 --- a/src/geom/index.js +++ b/src/geom/index.js @@ -12,11 +12,12 @@ var Extend = require('../utils/object/Extend'); */ var Geom = { - + Circle: require('./circle'), Ellipse: require('./ellipse'), Intersects: require('./intersects'), Line: require('./line'), + ParseObj: require('./ParseObj'), Point: require('./point'), Polygon: require('./polygon'), Rectangle: require('./rectangle'), From dd28a11c93a43ebad6fc4d13cd012b2faabe21e5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 18:06:31 +0100 Subject: [PATCH 121/153] `Loader.OBJFile` is a new File Loader type that can load Wavefront OBJ files, which are then parsed and stored in the OBJ Cache. --- src/loader/filetypes/OBJFile.js | 179 ++++++++++++++++++++++++++++++++ src/loader/filetypes/index.js | 1 + 2 files changed, 180 insertions(+) create mode 100644 src/loader/filetypes/OBJFile.js diff --git a/src/loader/filetypes/OBJFile.js b/src/loader/filetypes/OBJFile.js new file mode 100644 index 000000000..914605948 --- /dev/null +++ b/src/loader/filetypes/OBJFile.js @@ -0,0 +1,179 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = require('../../utils/Class'); +var CONST = require('../const'); +var File = require('../File'); +var FileTypesManager = require('../FileTypesManager'); +var GetFastValue = require('../../utils/object/GetFastValue'); +var IsPlainObject = require('../../utils/object/IsPlainObject'); +var ParseObj = require('../../geom/ParseObj'); + +/** + * @classdesc + * A single Wavefront OBJ File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#obj method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#obj. + * + * @class OBJFile + * @extends Phaser.Loader.File + * @memberof Phaser.Loader.FileTypes + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. + * @param {(string|Phaser.Types.Loader.FileTypes.OBJFileConfig)} key - The key to use for this file, or a file configuration object. + * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.obj`, i.e. if `key` was "alien" then the URL will be "alien.obj". + * @param {boolean} [flipUV=true] - Flip the UV coordinates stored in the texture locations? + * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + */ +var OBJFile = new Class({ + + Extends: File, + + initialize: + + function OBJFile (loader, key, url, flipUV, xhrSettings) + { + var extension = 'obj'; + + if (IsPlainObject(key)) + { + var config = key; + + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + flipUV = GetFastValue(config, 'flipUV'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + } + + var fileConfig = { + type: 'text', + cache: loader.cacheManager.obj, + extension: extension, + responseType: 'text', + key: key, + url: url, + xhrSettings: xhrSettings, + config: { + flipUV: flipUV + } + }; + + File.call(this, loader, fileConfig); + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.HTMLFile#onProcess + * @since 3.50.0 + */ + onProcess: function () + { + this.state = CONST.FILE_PROCESSING; + + this.data = ParseObj(this.xhrLoader.responseText, this.config.flipUV); + + this.onProcessComplete(); + } + +}); + +/** + * Adds a Wavefront OBJ file, or array of OBJ files, to the current load queue. + * + * Note: You should ensure your 3D package has triangulated the OBJ file prior to export. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.obj('ufo', 'files/spaceship.obj'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global OBJ Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the OBJ Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the OBJ Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.obj({ + * key: 'ufo', + * url: 'files/spaceship.obj', + * flipUV: true + * }); + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.OBJFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.obj('ufo', 'files/spaceship.obj'); + * // and later in your game ... + * var data = this.cache.obj.get('ufo'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and + * this is what you would use to retrieve the obj from the OBJ Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "story" + * and no URL is given then the Loader will set the URL to be "story.obj". It will always add `.obj` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * Note: The ability to load this type of file will only be available if the OBJ File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * + * @method Phaser.Loader.LoaderPlugin#obj + * @fires Phaser.Loader.LoaderPlugin#ADD + * @since 3.50.0 + * + * @param {(string|Phaser.Types.Loader.FileTypes.OBJFileConfig|Phaser.Types.Loader.FileTypes.OBJFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. + * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.obj`, i.e. if `key` was "alien" then the URL will be "alien.obj". + * @param {boolean} [flipUVs=true] - Flip the UV coordinates stored in the texture locations? + * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + * + * @return {this} The Loader instance. + */ +FileTypesManager.register('obj', function (key, url, flipUVs, xhrSettings) +{ + if (Array.isArray(key)) + { + for (var i = 0; i < key.length; i++) + { + // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object + this.addFile(new OBJFile(this, key[i])); + } + } + else + { + this.addFile(new OBJFile(this, key, url, flipUVs, xhrSettings)); + } + + return this; +}); + +module.exports = OBJFile; diff --git a/src/loader/filetypes/index.js b/src/loader/filetypes/index.js index 0dcd88de1..7d352a9ed 100644 --- a/src/loader/filetypes/index.js +++ b/src/loader/filetypes/index.js @@ -26,6 +26,7 @@ module.exports = { JSONFile: require('./JSONFile'), MultiAtlasFile: require('./MultiAtlasFile'), MultiScriptFile: require('./MultiScriptFile'), + OBJFile: require('./OBJFile'), PackFile: require('./PackFile'), PluginFile: require('./PluginFile'), SceneFile: require('./SceneFile'), From 229d27dc9e220ae3e1aa2a8bce0d0c49578c6f76 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 18:06:48 +0100 Subject: [PATCH 122/153] Updated docs and added `load` method --- src/gameobjects/mesh/Vertex.js | 53 +++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/src/gameobjects/mesh/Vertex.js b/src/gameobjects/mesh/Vertex.js index b007617e2..60c932e44 100644 --- a/src/gameobjects/mesh/Vertex.js +++ b/src/gameobjects/mesh/Vertex.js @@ -5,6 +5,7 @@ */ var Class = require('../../utils/Class'); +var Utils = require('../../renderer/webgl/Utils'); /** * @classdesc @@ -18,19 +19,23 @@ var Class = require('../../utils/Class'); * @constructor * @since 3.50.0 * - * @param {number} x - The x coordinate of this vertex. - * @param {number} y - The y coordinate of this vertex. - * @param {number} u - The UV u coordinate of this vertex. - * @param {number} v - The UV v coordinate of this vertex. - * @param {number} color - The color value of this vertex. - * @param {number} alpha - The alpha value of this vertex. + * @param {number} x - The x position of the vertex. + * @param {number} y - The y position of the vertex. + * @param {number} z - The z position of the vertex. + * @param {number} u - The UV u coordinate of the vertex. + * @param {number} v - The UV v coordinate of the vertex. + * @param {number} [color=0xffffff] - The color value of the vertex. + * @param {number} [alpha=1] - The alpha value of the vertex. */ var Vertex = new Class({ initialize: - function Vertex (x, y, u, v, color, alpha) + function Vertex (x, y, z, u, v, color, alpha) { + if (color === undefined) { color = 0xffffff; } + if (alpha === undefined) { alpha = 1; } + /** * The x coordinate of this vertex. * @@ -49,6 +54,15 @@ var Vertex = new Class({ */ this.y = y; + /** + * The z coordinate of this vertex. + * + * @name Phaser.GameObjects.Vertex#z + * @type {number} + * @since 3.50.0 + */ + this.z = z; + /** * UV u coordinate of this vertex. * @@ -86,10 +100,11 @@ var Vertex = new Class({ this.alpha = alpha; }, - setPosition: function (x, y) + setPosition: function (x, y, z) { this.x = x; this.y = y; + this.z = z; return this; }, @@ -100,6 +115,28 @@ var Vertex = new Class({ this.x += x; this.y += y; + }, + + load: function (F32, U32, offset, textureUnit, tintEffect, alpha, a, b, c, d, e, f, roundPixels) + { + var tx = this.x * a + this.y * c + e; + var ty = this.x * b + this.y * d + f; + + if (roundPixels) + { + tx = Math.round(tx); + ty = Math.round(ty); + } + + F32[++offset] = tx; + F32[++offset] = ty; + F32[++offset] = this.u; + F32[++offset] = this.v; + F32[++offset] = textureUnit; + F32[++offset] = tintEffect; + U32[++offset] = Utils.getTintAppendFloatAlpha(this.color, alpha * this.alpha); + + return offset; } }); From a2a199818e45205f88a32a5f2ba4032cb9f8428c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 18:07:14 +0100 Subject: [PATCH 123/153] Added `contains` and `isCounterClockwise` methods and `depth` property --- src/gameobjects/mesh/Face.js | 82 ++++++++++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/mesh/Face.js b/src/gameobjects/mesh/Face.js index 86f6ae39d..d39e5daea 100644 --- a/src/gameobjects/mesh/Face.js +++ b/src/gameobjects/mesh/Face.js @@ -27,9 +27,9 @@ function GetLength (x1, y1, x2, y2) * @constructor * @since 3.50.0 * - * @param {Phaser.GameObjects.Vertex} vertex1 - The first vertex in this Face. - * @param {Phaser.GameObjects.Vertex} vertex2 - The second vertex in this Face. - * @param {Phaser.GameObjects.Vertex} vertex3 - The third vertex in this Face. + * @param {Phaser.GameObjects.Vertex} vertex1 - The first vertex of the Face. + * @param {Phaser.GameObjects.Vertex} vertex2 - The second vertex of the Face. + * @param {Phaser.GameObjects.Vertex} vertex3 - The third vertex of the Face. */ var Face = new Class({ @@ -147,6 +147,69 @@ var Face = new Class({ return this; }, + contains: function (x, y, calcMatrix) + { + var v1x = this.vertex1.x; + var v1y = this.vertex1.y; + + var v2x = this.vertex2.x; + var v2y = this.vertex2.y; + + var v3x = this.vertex3.x; + var v3y = this.vertex3.y; + + if (calcMatrix) + { + var a = calcMatrix.a; + var b = calcMatrix.b; + var c = calcMatrix.c; + var d = calcMatrix.d; + var e = calcMatrix.e; + var f = calcMatrix.f; + + v1x = this.vertex1.x * a + this.vertex1.y * c + e; + v1y = this.vertex1.x * b + this.vertex1.y * d + f; + + v2x = this.vertex2.x * a + this.vertex2.y * c + e; + v2y = this.vertex2.x * b + this.vertex2.y * d + f; + + v3x = this.vertex3.x * a + this.vertex3.y * c + e; + v3y = this.vertex3.x * b + this.vertex3.y * d + f; + } + + var t0x = v3x - v1x; + var t0y = v3y - v1y; + + var t1x = v2x - v1x; + var t1y = v2y - v1y; + + var t2x = x - v1x; + var t2y = y - v1y; + + var dot00 = (t0x * t0x) + (t0y * t0y); + var dot01 = (t0x * t1x) + (t0y * t1y); + var dot02 = (t0x * t2x) + (t0y * t2y); + var dot11 = (t1x * t1x) + (t1y * t1y); + var dot12 = (t1x * t2x) + (t1y * t2y); + + // Compute barycentric coordinates + var bc = ((dot00 * dot11) - (dot01 * dot01)); + var inv = (bc === 0) ? 0 : (1 / bc); + var u = ((dot11 * dot02) - (dot01 * dot12)) * inv; + var v = ((dot00 * dot12) - (dot01 * dot02)) * inv; + + return (u >= 0 && v >= 0 && (u + v < 1)); + }, + + isCounterClockwise: function () + { + var v1 = this.vertex1; + var v2 = this.vertex2; + var v3 = this.vertex3; + + return (v2.x - v1.x) * (v3.y - v1.y) - (v2.y - v1.y) * (v3.x - v1.x) >= 0; + }, + x: { get: function () @@ -179,6 +242,19 @@ var Face = new Class({ }, + depth: { + + get: function () + { + var v1 = this.vertex1; + var v2 = this.vertex2; + var v3 = this.vertex3; + + return (v1.z + v2.z + v3.z) / 3; + } + + }, + destroy: function () { this.vertex1 = null; From 3e133c900a78dfe3e6cbe6e616ae74938c3f5280 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 18:07:24 +0100 Subject: [PATCH 124/153] New method signature order --- src/gameobjects/mesh/MeshFactory.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/gameobjects/mesh/MeshFactory.js b/src/gameobjects/mesh/MeshFactory.js index 51324c745..02c4446bf 100644 --- a/src/gameobjects/mesh/MeshFactory.js +++ b/src/gameobjects/mesh/MeshFactory.js @@ -16,22 +16,23 @@ var GameObjectFactory = require('../GameObjectFactory'); * @webglOnly * @since 3.0.0 * - * @param {number} x - The horizontal position of this Game Object in the world. - * @param {number} y - The vertical position of this Game Object in the world. - * @param {number[]} vertices - An array containing the vertices data for this Mesh. - * @param {number[]} uv - An array containing the uv data for this Mesh. - * @param {number[]} colors - An array containing the color data for this Mesh. - * @param {number[]} alphas - An array containing the alpha data for this Mesh. - * @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. + * @param {number} [x] - The horizontal position of this Game Object in the world. + * @param {number} [y] - The vertical position of this Game Object in the world. + * @param {string|Phaser.Textures.Texture} [texture] - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with. + * @param {number[]} [vertices] - An array containing the vertices data for this Mesh. + * @param {number[]} [uvs] - An array containing the uv data for this Mesh. + * @param {number[]} [indicies] - An array containing the vertex indicies for this Mesh. + * @param {number|number[]} [colors=0xffffff] - An array containing the color data for this Mesh. + * @param {number|number[]} [alphas=1] - An array containing the alpha data for this Mesh. * * @return {Phaser.GameObjects.Mesh} The Game Object that was created. */ if (typeof WEBGL_RENDERER) { - GameObjectFactory.register('mesh', function (x, y, vertices, uv, colors, alphas, texture, frame) + GameObjectFactory.register('mesh', function (x, y, texture, frame, vertices, uvs, indicies, colors, alphas) { - return this.displayList.add(new Mesh(this.scene, x, y, vertices, uv, colors, alphas, texture, frame)); + return this.displayList.add(new Mesh(this.scene, x, y, texture, frame, vertices, uvs, indicies, colors, alphas)); }); } From 431eb69b42a64c74c117eb7f5715239d8c4c137d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 18:07:51 +0100 Subject: [PATCH 125/153] Much cleaner rendering function, skipping invalid faces --- src/gameobjects/mesh/MeshWebGLRenderer.js | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/gameobjects/mesh/MeshWebGLRenderer.js b/src/gameobjects/mesh/MeshWebGLRenderer.js index c9ce5ceb9..d6442d264 100644 --- a/src/gameobjects/mesh/MeshWebGLRenderer.js +++ b/src/gameobjects/mesh/MeshWebGLRenderer.js @@ -22,7 +22,15 @@ var GetCalcMatrix = require('../GetCalcMatrix'); */ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) { - var pipeline = renderer.pipelines.set(this.pipeline, src); + var faces = src.faces; + var totalFaces = faces.length; + + if (totalFaces === 0) + { + return; + } + + var pipeline = renderer.pipelines.set(src.pipeline, src); var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; @@ -33,7 +41,6 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) var vertexOffset = (pipeline.vertexCount * pipeline.vertexComponentCount) - 1; - var faces = src.faces; var tintEffect = src.tintFill; var debugCallback = src.debugCallback; @@ -48,9 +55,17 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) var roundPixels = camera.roundPixels; var alpha = camera.alpha * src.alpha; + var hideCCW = src.hideCCW; - for (var i = 0; i < faces.length; i++) + for (var i = 0; i < totalFaces; i++) { + var face = faces[i]; + + if (hideCCW && !face.isCounterClockwise()) + { + continue; + } + if (pipeline.shouldFlush(3)) { pipeline.flush(); @@ -58,8 +73,6 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) vertexOffset = 0; } - var face = faces[i]; - vertexOffset = face.vertex1.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f, roundPixels); vertexOffset = face.vertex2.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f, roundPixels); vertexOffset = face.vertex3.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f, roundPixels); From b74928b2f89d4cb44d61a2ffb59f8dbc80e2cbd1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 18:09:19 +0100 Subject: [PATCH 126/153] Added `hideCCW`, `addOBJ`, `addModel`, `sortByDepth`, `rotateX`, `rotateY`, `rotateZ`, `depthSort`, `addVertex` and `addFace` methods. --- src/gameobjects/mesh/Mesh.js | 403 ++++++++++++++++++++++++++++++++++- 1 file changed, 392 insertions(+), 11 deletions(-) diff --git a/src/gameobjects/mesh/Mesh.js b/src/gameobjects/mesh/Mesh.js index 4376b3bf5..5e7effe75 100644 --- a/src/gameobjects/mesh/Mesh.js +++ b/src/gameobjects/mesh/Mesh.js @@ -12,6 +12,7 @@ var GameObject = require('../GameObject'); var GameObjectEvents = require('../events'); var GetCalcMatrix = require('../GetCalcMatrix'); var MeshRender = require('./MeshRender'); +var StableSort = require('../../utils/array/StableSort'); var Vertex = require('./Vertex'); /** @@ -41,15 +42,15 @@ var Vertex = require('./Vertex'); * @extends Phaser.GameObjects.Components.ScrollFactor * * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. - * @param {number} x - The horizontal position of this Game Object in the world. - * @param {number} y - The vertical position of this Game Object in the world. - * @param {number[]} vertices - An array containing the vertices data for this Mesh. - * @param {number[]} uvs - An array containing the uv data for this Mesh. - * @param {number[]} [indicies] - An array containing the vertex indicies for this Mesh. - * @param {number|number[]} [colors] - An array containing the color data for this Mesh. - * @param {number|number[]} [alphas] - An array containing the alpha data for this Mesh. + * @param {number} [x] - The horizontal position of this Game Object in the world. + * @param {number} [y] - The vertical position of this Game Object in the world. * @param {string|Phaser.Textures.Texture} [texture] - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with. + * @param {number[]} [vertices] - An array containing the vertices data for this Mesh. + * @param {number[]} [uvs] - An array containing the uv data for this Mesh. + * @param {number[]} [indicies] - An array containing the vertex indicies for this Mesh. + * @param {number|number[]} [colors=0xffffff] - An array containing the color data for this Mesh. + * @param {number|number[]} [alphas=1] - An array containing the alpha data for this Mesh. */ var Mesh = new Class({ @@ -71,7 +72,7 @@ var Mesh = new Class({ initialize: - function Mesh (scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame) + function Mesh (scene, x, y, texture, frame, vertices, uvs, indicies, colors, alphas) { GameObject.call(this, scene, 'Mesh'); @@ -154,12 +155,24 @@ var Mesh = new Class({ */ this.debugGraphic = null; + /** + * When rendering, skip any Face that isn't counter clockwise? + * + * @name Phaser.GameObjects.Mesh#hideCCW + * @type {boolean} + * @since 3.50.0 + */ + this.hideCCW = true; + this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); this.initPipeline(); - this.addVertices(vertices, uvs, indicies, colors, alphas); + if (vertices) + { + this.addVertices(vertices, uvs, indicies, colors, alphas); + } this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); @@ -177,6 +190,15 @@ var Mesh = new Class({ this.scene.sys.updateList.remove(this); }, + /** + * Iterates and destroys all current Faces in this Mesh, if any. + * Then resets the Face and Vertices arrays. + * + * @method Phaser.GameObjects.Mesh#clearVertices + * @since 3.50.0 + * + * @return {this} This Mesh Game Object. + */ clearVertices: function () { this.faces.forEach(function (face) @@ -190,6 +212,319 @@ var Mesh = new Class({ return this; }, + /** + * This method will add the model data from a loaded Wavefront OBJ file to this Mesh. + * + * The obj should have been loaded via the OBJFile: + * + * ```javascript + * this.load.obj(key, url); + * ``` + * + * Then use the key it was loaded under in this call. + * + * Multiple Mesh objects can use the same model data without impacting on each other. + * + * Make sure your 3D package has triangulated the model data prior to exporting it. + * + * You may add multiple models to a single Mesh, although they will act as one when + * moved or rotated. You can scale the model data, should it be too small (or large) to visualize. + * You can also offset the model via the `x`, `y` and `z` parameters. + * + * @method Phaser.GameObjects.Mesh#addOBJ + * @since 3.50.0 + * + * @param {string} key - The key of the model data in the OBJ Cache to add to this Mesh. + * @param {number} [scale=1] - An amount to scale the model data by. Use this if the model has exported too small, or large, to see. + * @param {number} [x=0] - Offset the model x position by this amount. + * @param {number} [y=0] - Offset the model y position by this amount. + * @param {number} [z=0] - Offset the model z position by this amount. + * + * @return {this} This Mesh Game Object. + */ + addOBJ: function (key, scale, x, y, z) + { + var data = this.scene.sys.cache.obj.get(key); + + if (data) + { + this.addModel(data, scale, x, y, z); + } + + return this; + }, + + /** + * This method will add parsed OBJ model data to this Mesh. + * + * The obj should have been parsed in advance via the ParseObj function: + * + * ```javascript + * var data = Phaser.Geom.ParseObj(rawData, flipUV); + * + * Mesh.addModel(data); + * ``` + * + * Multiple Mesh objects can use the same model data without impacting on each other. + * + * Make sure your 3D package has triangulated the model data prior to exporting it. + * + * You may add multiple models to a single Mesh, although they will act as one when + * moved or rotated. You can scale the model data, should it be too small (or large) to visualize. + * You can also offset the model via the `x`, `y` and `z` parameters. + * + * @method Phaser.GameObjects.Mesh#addModel + * @since 3.50.0 + * + * @param {array} data - The parsed model data array. + * @param {number} [scale=1] - An amount to scale the model data by. Use this if the model has exported too small, or large, to see. + * @param {number} [x=0] - Offset the model x position by this amount. + * @param {number} [y=0] - Offset the model y position by this amount. + * @param {number} [z=0] - Offset the model z position by this amount. + * + * @return {this} This Mesh Game Object. + */ + addModel: function (data, scale, x, y, z) + { + if (scale === undefined) { scale = 1; } + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (z === undefined) { z = 0; } + + for (var m = 0; m < data.models.length; m++) + { + var model = data.models[m]; + + var vertices = model.vertices; + var textureCoords = model.textureCoords; + var faces = model.faces; + + for (var i = 0; i < faces.length; i++) + { + var face = faces[i]; + + var v1 = face.vertices[0]; + var v2 = face.vertices[1]; + var v3 = face.vertices[2]; + + var m1 = vertices[v1.vertexIndex]; + var m2 = vertices[v2.vertexIndex]; + var m3 = vertices[v3.vertexIndex]; + + var t1 = v1.textureCoordsIndex; + var t2 = v2.textureCoordsIndex; + var t3 = v3.textureCoordsIndex; + + var uv1 = (t1 === -1) ? { u: 0, v: 1 } : textureCoords[t1]; + var uv2 = (t2 === -1) ? { u: 0, v: 0 } : textureCoords[t2]; + var uv3 = (t3 === -1) ? { u: 1, v: 1 } : textureCoords[t3]; + + var vert1 = this.addVertex(x + m1.x * scale, y + m1.y * scale, z + m1.z * scale, uv1.u, uv1.v); + var vert2 = this.addVertex(x + m2.x * scale, y + m2.y * scale, z + m2.z * scale, uv2.u, uv2.v); + var vert3 = this.addVertex(x + m3.x * scale, y + m3.y * scale, z + m3.z * scale, uv3.u, uv3.v); + + this.addFace(vert1, vert2, vert3); + } + } + + return this; + }, + + /** + * Compare the depth of two Faces. + * + * @method Phaser.GameObjects.Mesh#sortByDepth + * @since 3.50.0 + * + * @param {Phaser.GameObjects.Face} faceA - The first Face. + * @param {Phaser.GameObjects.Face} faceB - The second Face. + * + * @return {integer} The difference between the depths of each Face. + */ + sortByDepth: function (faceA, faceB) + { + return faceA.depth - faceB.depth; + }, + + /** + * Rotates all vertices of this Mesh around the X axis by the amount given. + * + * It then runs a depth sort on the faces before returning. + * + * @method Phaser.GameObjects.Mesh#rotateX + * @since 3.50.0 + * + * @param {number} theta - The amount to rotate by in radians. + * + * @return {this} This Mesh Game Object. + */ + rotateX: function (theta) + { + var ts = Math.sin(theta); + var tc = Math.cos(theta); + + var verts = this.vertices; + + for (var n = 0; n < verts.length; n++) + { + var vert = verts[n]; + var y = vert.y; + var z = vert.z; + + vert.y = y * tc - z * ts; + vert.z = z * tc + y * ts; + } + + return this.depthSort(); + }, + + /** + * Rotates all vertices of this Mesh around the Y axis by the amount given. + * + * It then runs a depth sort on the faces before returning. + * + * @method Phaser.GameObjects.Mesh#rotateY + * @since 3.50.0 + * + * @param {number} theta - The amount to rotate by in radians. + * + * @return {this} This Mesh Game Object. + */ + rotateY: function (theta) + { + var ts = Math.sin(theta); + var tc = Math.cos(theta); + + var verts = this.vertices; + + for (var n = 0; n < verts.length; n++) + { + var vert = verts[n]; + var x = vert.x; + var z = vert.z; + + vert.x = x * tc - z * ts; + vert.z = z * tc + x * ts; + } + + return this.depthSort(); + }, + + /** + * Rotates all vertices of this Mesh around the Z axis by the amount given. + * + * It then runs a depth sort on the faces before returning. + * + * @method Phaser.GameObjects.Mesh#rotateZ + * @since 3.50.0 + * + * @param {number} theta - The amount to rotate by in radians. + * + * @return {this} This Mesh Game Object. + */ + rotateZ: function (theta) + { + var ts = Math.sin(theta); + var tc = Math.cos(theta); + + var verts = this.vertices; + + for (var n = 0; n < verts.length; n++) + { + var vert = verts[n]; + var x = vert.x; + var y = vert.y; + + vert.x = x * tc - y * ts; + vert.y = y * tc + x * ts; + } + + return this.depthSort(); + }, + + /** + * Runs a depth sort across all Faces in this Mesh, comparing their averaged depth. + * + * This is called automatically if you use any of the `rotate` methods, but you can + * also invoke it to sort the Faces should you manually position them. + * + * @method Phaser.GameObjects.Mesh#depthSort + * @since 3.50.0 + * + * @return {this} This Mesh Game Object. + */ + depthSort: function () + { + StableSort(this.faces, this.sortByDepth); + + return this; + }, + + /** + * Adds a new Vertex into the vertices array of this Mesh. + * + * Just adding a vertex isn't enough to render it. You need to also + * make it part of a Face, with 3 Vertex instances per Face. + * + * @method Phaser.GameObjects.Mesh#addVertex + * @since 3.50.0 + * + * @param {number} x - The x position of the vertex. + * @param {number} y - The y position of the vertex. + * @param {number} z - The z position of the vertex. + * @param {number} u - The UV u coordinate of the vertex. + * @param {number} v - The UV v coordinate of the vertex. + * @param {number} [color=0xffffff] - The color value of the vertex. + * @param {number} [alpha=1] - The alpha value of the vertex. + * + * @return {this} This Mesh Game Object. + */ + addVertex: function (x, y, z, u, v, color, alpha) + { + var vert = new Vertex(x, y, z, u, v, color, alpha); + + this.vertices.push(vert); + + return vert; + }, + + /** + * Adds a new Face into the faces array of this Mesh. + * + * A Face consists of references to 3 Vertex instances, which must be provided. + * + * @method Phaser.GameObjects.Mesh#addFace + * @since 3.50.0 + * + * @param {Phaser.GameObjects.Vertex} vertex1 - The first vertex of the Face. + * @param {Phaser.GameObjects.Vertex} vertex2 - The second vertex of the Face. + * @param {Phaser.GameObjects.Vertex} vertex3 - The third vertex of the Face. + * + * @return {this} This Mesh Game Object. + */ + addFace: function (vertex1, vertex2, vertex3) + { + var face = new Face(vertex1, vertex2, vertex3); + + this.faces.push(face); + + return face; + }, + + /** + * TODO + * + * @method Phaser.GameObjects.Mesh#addVertices + * @since 3.50.0 + * + * @param {number[]} vertices - The vertices array. + * @param {number[]} uvs - The UVs array. + * @param {number[]} [indicies] - Optional vertex indicies array. + * @param {number|number[]} [colors=0xffffff] - An array of colors, one per vertex, or a single color value applied to all vertices. + * @param {number|number[]} [alphas=1] - An array of alpha values, one per vertex, or a single alpha value applied to all vertices. + * + * @return {this} This Mesh Game Object. + */ addVertices: function (vertices, uvs, indicies, colors, alphas) { if (colors === undefined) { colors = 0xffffff; } @@ -208,7 +543,7 @@ var Mesh = new Class({ var isColorArray = Array.isArray(colors); var isAlphaArray = Array.isArray(alphas); - if (Array.isArray(indicies)) + if (Array.isArray(indicies) && indicies.length > 0) { for (i = 0; i < indicies.length; i++) { @@ -217,6 +552,7 @@ var Mesh = new Class({ vert = new Vertex( vertices[index], vertices[index + 1], + 0, uvs[index], uvs[index + 1], (isColorArray) ? colors[i] : colors, @@ -235,6 +571,7 @@ var Mesh = new Class({ vert = new Vertex( vertices[i], vertices[i + 1], + 0, uvs[i], uvs[i + 1], (isColorArray) ? colors[colorIndex] : colors, @@ -261,21 +598,65 @@ var Mesh = new Class({ return this; }, + /** + * Returns the total number of Faces in this Mesh Game Object. + * + * @method Phaser.GameObjects.Mesh#getFaceCount + * @since 3.50.0 + * + * @return {number} The number of Faces in this Mesh Game Object. + */ getFaceCount: function () { return this.faces.length; }, + /** + * Returns the total number of Vertices in this Mesh Game Object. + * + * @method Phaser.GameObjects.Mesh#getVertexCount + * @since 3.50.0 + * + * @return {number} The number of Vertices in this Mesh Game Object. + */ getVertexCount: function () { return this.vertices.length; }, + /** + * Returns the Face at the given index in this Mesh Game Object. + * + * @method Phaser.GameObjects.Mesh#getFace + * @since 3.50.0 + * + * @param {number} index - The index of the Face to get. + * + * @return {Phaser.GameObjects.Face} The Face at the given index, or `undefined` if index out of range. + */ getFace: function (index) { return this.faces[index]; }, + /** + * Return an array of Face objects from this Mesh that intersect with the given coordinates. + * + * The given position is translated through the matrix of this Mesh and the given Camera, + * before being compared against the vertices. + * + * If more than one Face intersects, they will all be returned in the array, but the array will + * be depth sorted first, so the first element will always be that closest to the camera. + * + * @method Phaser.GameObjects.Mesh#getFaceAt + * @since 3.50.0 + * + * @param {number} x - The x position to check against. + * @param {number} y - The y position to check against. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The camera to pass the coordinates through. If not give, the default Scene Camera is used. + * + * @return {Phaser.GameObjects.Face[]} An array of Face objects that intersect with the given point, ordered by depth. + */ getFaceAt: function (x, y, camera) { if (camera === undefined) { camera = this.scene.sys.cameras.main; } @@ -295,7 +676,7 @@ var Mesh = new Class({ } } - return results; + return StableSort(results, this.sortByDepth); }, /** From cfcfabff26270707c2a14cc8954c49e69f8d2103 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 15 Sep 2020 18:09:43 +0100 Subject: [PATCH 127/153] Update CHANGELOG-v3.50.md --- CHANGELOG-v3.50.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index 66c5e5b73..19ec1d063 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -351,8 +351,12 @@ The Animation API has had a significant overhaul to improve playback handling. I ### Mesh Game Object - New Features, Updates and API Changes -The Mesh Game Object has been rewritten in v3.50 with a lot of internal changes to make it more useful: +The Mesh Game Object has been rewritten in v3.50 with a lot of changes to make it more useful and able to handle 3D objects: +* TODO - addFace, addVertex, addModel, etc. + +* `Geom.ParseObj` is a new function that will parse a Wavefront OBJ file into model data that can be consumed by the Mesh Game Object. +* `Loader.OBJFile` is a new File Loader type that can load Wavefront OBJ files, which are then parsed and stored in the OBJ Cache. * `GameObject.Vertex` is a new micro class that encapsulates all of the data required for a single vertex, such as position, uv, color and alpha. This class is now created internally by the Mesh Game Object. * `GameObject.Face` is a new micro class that consists of references to the three `Vertex` instances that construct the single Face. * `Mesh.vertices` is now an array of `GameObject.Vertex` instances, not a Float32Array. @@ -360,7 +364,8 @@ The Mesh Game Object has been rewritten in v3.50 with a lot of internal changes * `Mesh.addVertices` is a new method that allows you to add vertices to a Mesh Game Object based on the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage. * `Mesh.clearVertices` is a new method that will destroy all Faces and Vertices and clear the Mesh. * The Mesh now renders by iterating through the Faces array, not the vertices. This allows you to use Array methods such as `BringToTop` to reposition a Face, thus changing the drawing order without having to repopulate all of the vertices. -* The Mesh constructor signature has changed to `scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame`, where `indicies` is the new parameter added to the list. It allows you to provide indexed vertex data to create the Mesh from, where the `indicies` array holds the vertex index information. The final list of vertices is built from this index along with the provided vertices and uvs arrays. +* The Mesh renderer will now check to see if the pipeline capacity has been exceeded for every Face added, allowing you to use Meshes with vertex counts that exceed the pipeline capacity without causing runtime errors. +* The Mesh constructor signature has changed to `scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame`, where `indicies` is the new parameter added to the list. It allows you to provide indexed vertex data to create the Mesh from, where the `indicies` array holds the vertex index information. The final list of vertices is built from this index along with the provided vertices and uvs arrays. The `indicies` array is optional. If your data is not indexes, then simply pass `null` or an empty array for this parameter. * You can now supply just a single numerical value as the `color` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the color for all vertices created. * You can now supply just a single numerical value as the `alpha` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created. * The `Mesh` Game Object now extends the `SingleAlpha` component and the alpha value is factored into the final alpha value per vertex during rendering. This means you can now set the whole alpha across the Mesh using the standard `setAlpha` methods. But, if you wish to, you can still control the alpha on a per-vertex basis as well. From 45412157c22fb2c9a5102e3a86b00caea8ed4428 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 09:50:24 +0100 Subject: [PATCH 128/153] Added JSDocs --- src/gameobjects/mesh/Mesh.js | 38 +++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/mesh/Mesh.js b/src/gameobjects/mesh/Mesh.js index 5e7effe75..036b3affa 100644 --- a/src/gameobjects/mesh/Mesh.js +++ b/src/gameobjects/mesh/Mesh.js @@ -158,6 +158,9 @@ var Mesh = new Class({ /** * When rendering, skip any Face that isn't counter clockwise? * + * Enable this to hide backward-facing Faces during rendering. + * Disable it to render all Faces. + * * @name Phaser.GameObjects.Mesh#hideCCW * @type {boolean} * @since 3.50.0 @@ -213,7 +216,7 @@ var Mesh = new Class({ }, /** - * This method will add the model data from a loaded Wavefront OBJ file to this Mesh. + * This method will add the model data from a loaded triangulated Wavefront OBJ file to this Mesh. * * The obj should have been loaded via the OBJFile: * @@ -255,7 +258,7 @@ var Mesh = new Class({ }, /** - * This method will add parsed OBJ model data to this Mesh. + * This method will add parsed triangulated OBJ model data to this Mesh. * * The obj should have been parsed in advance via the ParseObj function: * @@ -512,7 +515,36 @@ var Mesh = new Class({ }, /** - * TODO + * Adds new vertices to this Mesh by parsing the given arrays. + * + * The `vertices` parameter is a numeric array consisting of `x` and `y` pairs. + * The `uvs` parameter is a numeric array consisting of `u` and `v` pairs. + * The `indicies` parameter is an optional array that, if given, is an indexed list of vertices to be added. + * + * The following example will create a 256 x 256 sized quad using an index array: + * + * ```javascript + * const vertices = [ + * -128, 128, + * 128, 128, + * -128, -128, + * 128, -128 + * ]; + * + * const uvs = [ + * 0, 1, + * 1, 1, + * 0, 0, + * 1, 0 + * ]; + * + * const indices = [ 0, 2, 1, 2, 3, 1 ]; + * + * Mesh.addVertices(vertices, uvs, indicies); + * ``` + * + * Vertices must be provided as x/y pairs, there is no `z` component used in this call. For that, please see + * `addModel` instead. * * @method Phaser.GameObjects.Mesh#addVertices * @since 3.50.0 From b08015ac7428c0253a2bac8e6399aa83355d9820 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 09:50:27 +0100 Subject: [PATCH 129/153] Update CHANGELOG-v3.50.md --- CHANGELOG-v3.50.md | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index 19ec1d063..b1f3e535b 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -353,24 +353,35 @@ The Animation API has had a significant overhaul to improve playback handling. I The Mesh Game Object has been rewritten in v3.50 with a lot of changes to make it more useful and able to handle 3D objects: -* TODO - addFace, addVertex, addModel, etc. - -* `Geom.ParseObj` is a new function that will parse a Wavefront OBJ file into model data that can be consumed by the Mesh Game Object. -* `Loader.OBJFile` is a new File Loader type that can load Wavefront OBJ files, which are then parsed and stored in the OBJ Cache. * `GameObject.Vertex` is a new micro class that encapsulates all of the data required for a single vertex, such as position, uv, color and alpha. This class is now created internally by the Mesh Game Object. * `GameObject.Face` is a new micro class that consists of references to the three `Vertex` instances that construct the single Face. -* `Mesh.vertices` is now an array of `GameObject.Vertex` instances, not a Float32Array. -* `Mesh.faces` is a new array of `GameObject.Face` instances, which is populated during a call to `addVertices`. -* `Mesh.addVertices` is a new method that allows you to add vertices to a Mesh Game Object based on the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage. -* `Mesh.clearVertices` is a new method that will destroy all Faces and Vertices and clear the Mesh. -* The Mesh now renders by iterating through the Faces array, not the vertices. This allows you to use Array methods such as `BringToTop` to reposition a Face, thus changing the drawing order without having to repopulate all of the vertices. -* The Mesh renderer will now check to see if the pipeline capacity has been exceeded for every Face added, allowing you to use Meshes with vertex counts that exceed the pipeline capacity without causing runtime errors. -* The Mesh constructor signature has changed to `scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame`, where `indicies` is the new parameter added to the list. It allows you to provide indexed vertex data to create the Mesh from, where the `indicies` array holds the vertex index information. The final list of vertices is built from this index along with the provided vertices and uvs arrays. The `indicies` array is optional. If your data is not indexes, then simply pass `null` or an empty array for this parameter. -* You can now supply just a single numerical value as the `color` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the color for all vertices created. -* You can now supply just a single numerical value as the `alpha` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created. +* The Mesh constructor and `MeshFactory` signatures have changed to `scene, x, y, texture, frame, vertices, uvs, indicies, colors, alphas`. Note the way the Texture and Frame parameters now comes first. `indicies` is a new parameter added to the list. It allows you to provide indexed vertex data to create the Mesh from, where the `indicies` array holds the vertex index information. The final list of vertices is built from this index along with the provided vertices and uvs arrays. The `indicies` array is optional. If your data is not indexed, then simply pass `null` or an empty array for this parameter. * The `Mesh` Game Object now extends the `SingleAlpha` component and the alpha value is factored into the final alpha value per vertex during rendering. This means you can now set the whole alpha across the Mesh using the standard `setAlpha` methods. But, if you wish to, you can still control the alpha on a per-vertex basis as well. * The `Mesh` Game Object now has the Animation State Component. This allows you to create and play animations across the texture of a Mesh, something that previously wasn't possible. As a result, the Mesh now adds itself to the Update List when added to a Scene. +* `Geom.ParseObj` is a new function that will parse a triangulated Wavefront OBJ file into model data that can be consumed by the Mesh Game Object. +* `Loader.OBJFile` is a new File Loader type that can load triangulated Wavefront OBJ files, which are then parsed and stored in the OBJ Cache. +* `Mesh.hideCCW` is a new boolean property that, when enabled, tells a Face to not render if it isn't counter-clockwise. You can use this to hide backward facing Faces. +* `Mesh.addOBJ` is a new method that will add the model data from a loaded Wavefront OBJ file to a Mesh. You load it via the new `OBJFile` with a `this.load.obj` call, then you can use the key with the `addOBJ` method. This method also takes an optional scale and position parameters to control placement of the created model within the Mesh. +* `Mesh.addModel` is a new method that will add the model data to a Mesh. You can prepare the model data yourself, pull it in from a server, or get it by calling `Geom.ParseObj`, or a similar custom function. This method also takes an optional scale and position parameters to control placement of the created model within the Mesh. +* `Mesh.rotateX` is a new method that will rotate all vertices of the Mesh around the x axis, by the amount given. It then depth sorts the faces. +* `Mesh.rotateY` is a new method that will rotate all vertices of the Mesh around the y axis, by the amount given. It then depth sorts the faces. +* `Mesh.rotateZ` is a new method that will rotate all vertices of the Mesh around the z axis, by the amount given. It then depth sorts the faces. +* `Mesh.depthSort` is a new method that will run a depth sort across all Faces in the Mesh by sorting them on their average depth. +* `Mesh.addVertex` is a new method that allows you to add a new single Vertex into the Mesh. +* `Mesh.addFace` is a new method that allows you to add a new Face into the Mesh. A Face must consist of 3 Vertex instances. +* `Mesh.addVertices` is a new method that allows you to add vertices to a Mesh Game Object based on the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage. +* `Mesh.getFaceCount` new is a new method that will return the total number of Faces in the Mesh. +* `Mesh.getVertexCount` new is a new method that will return the total number of Vertices in the Mesh. +* `Mesh.getFace` new is a new method that will return a Face instance from the Mesh based on the given index. +* `Mesh.getFaceAt` new is a new method that will return an array of Face instances from the Mesh based on the given position. The position is checked against each Face, translated through the optional Camera and Mesh matrix. If more than one Face intersects, they will all be returned but the array will be depth sorted first, so the first element will be that closest to the camera. +* `Mesh.vertices` is now an array of `GameObject.Vertex` instances, not a Float32Array. +* `Mesh.faces` is a new array of `GameObject.Face` instances, which is populated during a call to methods like `addVertices` or `addModel`. +* `Mesh.clearVertices` is a new method that will destroy all Faces and Vertices and clear the Mesh. * `Mesh.setDebug` is a new method that allows you to render a debug visualisation of the Mesh vertices to a Graphics Game Object. You can provide your own Graphics instance and optionally callback that is invoked during rendering. This allows you to easily visualise the vertices of your Mesh to help debug UV mapping. +* The Mesh now renders by iterating through the Faces array, not the vertices. This allows you to use Array methods such as `BringToTop` to reposition a Face, thus changing the drawing order without having to repopulate all of the vertices. Or, for a 3D model, you can now depth sort the Faces. +* The Mesh renderer will now check to see if the pipeline capacity has been exceeded for every Face added, allowing you to use Meshes with vertex counts that exceed the pipeline capacity without causing runtime errors. +* You can now supply just a single numerical value as the `colors` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the color for all vertices created. +* You can now supply just a single numerical value as the `alphas` parameter in the constructor, factory method and `addVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created. * `Mesh.debugGraphic` is a new property that holds the debug Graphics instance reference. * `Mesh.debugCallback` is a new property that holds the debug render callback. * `Mesh.renderDebugVerts` is a new method that acts as the default render callback for `setDebug` if none is provided. From a96d380933fa860b58cef5b81be1f0f2e1462f9d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 13:50:36 +0100 Subject: [PATCH 130/153] Created new `Geom.Mesh` namespace for all of the Mesh related functions and classes --- src/gameobjects/index.js | 2 - src/geom/index.js | 2 +- src/{gameobjects => geom}/mesh/Face.js | 12 +- src/geom/mesh/Model.js | 408 +++++++++++++++++++++++ src/geom/{ => mesh}/ParseObj.js | 0 src/{gameobjects => geom}/mesh/Vertex.js | 75 ++--- src/geom/mesh/index.js | 20 ++ 7 files changed, 466 insertions(+), 53 deletions(-) rename src/{gameobjects => geom}/mesh/Face.js (95%) create mode 100644 src/geom/mesh/Model.js rename src/geom/{ => mesh}/ParseObj.js (100%) rename src/{gameobjects => geom}/mesh/Vertex.js (67%) create mode 100644 src/geom/mesh/index.js diff --git a/src/gameobjects/index.js b/src/gameobjects/index.js index 5380c6351..85559637a 100644 --- a/src/gameobjects/index.js +++ b/src/gameobjects/index.js @@ -125,8 +125,6 @@ if (typeof WEBGL_RENDERER) GameObjects.Mesh = require('./mesh/Mesh'); GameObjects.Quad = require('./quad/Quad'); GameObjects.Shader = require('./shader/Shader'); - GameObjects.Vertex = require('./mesh/Vertex'); - GameObjects.Face = require('./mesh/Face'); GameObjects.Factories.Mesh = require('./mesh/MeshFactory'); GameObjects.Factories.Quad = require('./quad/QuadFactory'); diff --git a/src/geom/index.js b/src/geom/index.js index f637bb93d..7e73292cd 100644 --- a/src/geom/index.js +++ b/src/geom/index.js @@ -17,7 +17,7 @@ var Geom = { Ellipse: require('./ellipse'), Intersects: require('./intersects'), Line: require('./line'), - ParseObj: require('./ParseObj'), + Mesh: require('./mesh'), Point: require('./point'), Polygon: require('./polygon'), Rectangle: require('./rectangle'), diff --git a/src/gameobjects/mesh/Face.js b/src/geom/mesh/Face.js similarity index 95% rename from src/gameobjects/mesh/Face.js rename to src/geom/mesh/Face.js index d39e5daea..08f70b3fe 100644 --- a/src/gameobjects/mesh/Face.js +++ b/src/geom/mesh/Face.js @@ -18,12 +18,12 @@ function GetLength (x1, y1, x2, y2) /** * @classdesc - * A Face Game Object. + * A Face Object. * * This class consists of 3 Vertex instances, for the 3 corners of the face. * * @class Face - * @memberof Phaser.GameObjects + * @memberof Phaser.Geom.Mesh * @constructor * @since 3.50.0 * @@ -40,7 +40,7 @@ var Face = new Class({ /** * The first vertex in this Face. * - * @name Phaser.GameObjects.Face#vertex1 + * @name Phaser.Geom.Mesh.Face#vertex1 * @type {Phaser.GameObjects.Vertex} * @since 3.50.0 */ @@ -49,7 +49,7 @@ var Face = new Class({ /** * The second vertex in this Face. * - * @name Phaser.GameObjects.Face#vertex2 + * @name Phaser.Geom.Mesh.Face#vertex2 * @type {Phaser.GameObjects.Vertex} * @since 3.50.0 */ @@ -58,7 +58,7 @@ var Face = new Class({ /** * The third vertex in this Face. * - * @name Phaser.GameObjects.Face#vertex3 + * @name Phaser.Geom.Mesh.Face#vertex3 * @type {Phaser.GameObjects.Vertex} * @since 3.50.0 */ @@ -67,7 +67,7 @@ var Face = new Class({ /** * The face inCenter. Do not access directly, instead use the `getInCenter` method. * - * @name Phaser.GameObjects.Face#_inCenter + * @name Phaser.Geom.Mesh.Face#_inCenter * @type {Phaser.Math.Vector2} * @private * @since 3.50.0 diff --git a/src/geom/mesh/Model.js b/src/geom/mesh/Model.js new file mode 100644 index 000000000..1da684179 --- /dev/null +++ b/src/geom/mesh/Model.js @@ -0,0 +1,408 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = require('../../utils/Class'); +var Face = require('./Face'); +var GetCalcMatrix = require('../../gameobjects/GetCalcMatrix'); +var Matrix4 = require('../../math/Matrix4'); +var StableSort = require('../../utils/array/StableSort'); +var Vector3 = require('../../math/Vector3'); +var Vertex = require('./Vertex'); + +/** + * @classdesc + * A Model Game Object. + * + * @class Model + * @memberof Phaser.Geom.Mesh + * @constructor + * @since 3.50.0 + */ +var Model = new Class({ + + initialize: + + function Model (mesh, x, y, z) + { + this.mesh = mesh; + + /** + * An array containing the Face instances belonging to this Mesh. + * + * A Face consists of 3 Vertex objects. + * + * This array is populated during the `setVertices` method. + * + * @name Phaser.Geom.Mesh.Model#faces + * @type {Phaser.Geom.Mesh.Face[]} + * @since 3.50.0 + */ + this.faces = []; + + /** + * An array containing Vertex instances. One instance per vertex in this Mesh. + * + * This array is populated during the `setVertices` method. + * + * @name Phaser.Geom.Mesh.Model#vertices + * @type {Phaser.Geom.Mesh.Vertex[]} + * @since 3.50.0 + */ + this.vertices = []; + + /** + * The tint fill mode. + * + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * + * @name Phaser.Geom.Mesh.Model#tintFill + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.tintFill = false; + + /** + * When rendering, skip any Face that isn't counter clockwise? + * + * Enable this to hide backward-facing Faces during rendering. + * Disable it to render all Faces. + * + * @name Phaser.Geom.Mesh.Model#hideCCW + * @type {boolean} + * @since 3.50.0 + */ + this.hideCCW = true; + + this.position = new Vector3(x, y, z); + this.rotation = new Vector3(); + this.scale = new Vector3(1, 1, 1); + + this.visible = true; + this.alpha = 1; + + this.transformMatrix = new Matrix4(); + }, + + /** + * Iterates and destroys all current Faces in this Mesh, if any. + * Then resets the Face and Vertices arrays. + * + * @method Phaser.Geom.Mesh.Model#clearVertices + * @since 3.50.0 + * + * @return {this} This Mesh Game Object. + */ + clearVertices: function () + { + this.faces.forEach(function (face) + { + face.destroy(); + }); + + this.faces = []; + this.vertices = []; + + return this; + }, + + update: function (viewMatrix, projectionMatrix, width, height) + { + var transformMatrix = this.transformMatrix; + + transformMatrix.setWorldMatrix(this.rotation, this.position, this.scale, viewMatrix, projectionMatrix); + + var faces = this.faces; + + for (var f = 0; f < faces.length; f++) + { + var face = faces[f]; + + face.vertex1.transformCoordinatesLocal(transformMatrix, width, height); + face.vertex2.transformCoordinatesLocal(transformMatrix, width, height); + face.vertex3.transformCoordinatesLocal(transformMatrix, width, height); + } + + this.depthSort(); + }, + + /** + * Returns the total number of Faces in this Mesh Game Object. + * + * @method Phaser.Geom.Mesh.Model#getFaceCount + * @since 3.50.0 + * + * @return {number} The number of Faces in this Mesh Game Object. + */ + getFaceCount: function () + { + return this.faces.length; + }, + + /** + * Returns the total number of Vertices in this Mesh Game Object. + * + * @method Phaser.Geom.Mesh.Model#getVertexCount + * @since 3.50.0 + * + * @return {number} The number of Vertices in this Mesh Game Object. + */ + getVertexCount: function () + { + return this.vertices.length; + }, + + /** + * Returns the Face at the given index in this Mesh Game Object. + * + * @method Phaser.Geom.Mesh.Model#getFace + * @since 3.50.0 + * + * @param {number} index - The index of the Face to get. + * + * @return {Phaser.Geom.Mesh.Face} The Face at the given index, or `undefined` if index out of range. + */ + getFace: function (index) + { + return this.faces[index]; + }, + + /** + * Return an array of Face objects from this Mesh that intersect with the given coordinates. + * + * The given position is translated through the matrix of this Mesh and the given Camera, + * before being compared against the vertices. + * + * If more than one Face intersects, they will all be returned in the array, but the array will + * be depth sorted first, so the first element will always be that closest to the camera. + * + * @method Phaser.Geom.Mesh.Model#getFaceAt + * @since 3.50.0 + * + * @param {number} x - The x position to check against. + * @param {number} y - The y position to check against. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The camera to pass the coordinates through. If not give, the default Scene Camera is used. + * + * @return {Phaser.Geom.Mesh.Face[]} An array of Face objects that intersect with the given point, ordered by depth. + */ + getFaceAt: function (x, y, camera) + { + if (camera === undefined) { camera = this.scene.sys.cameras.main; } + + var calcMatrix = GetCalcMatrix(this.mesh, camera).calc; + + var faces = this.faces; + var results = []; + + for (var i = 0; i < faces.length; i++) + { + var face = faces[i]; + + if (face.contains(x, y, calcMatrix)) + { + results.push(face); + } + } + + return StableSort(results, this.sortByDepth); + }, + + /** + * Runs a depth sort across all Faces in this Mesh, comparing their averaged depth. + * + * This is called automatically if you use any of the `rotate` methods, but you can + * also invoke it to sort the Faces should you manually position them. + * + * @method Phaser.Geom.Mesh.Model#depthSort + * @since 3.50.0 + * + * @return {this} This Mesh Game Object. + */ + depthSort: function () + { + StableSort(this.faces, this.sortByDepth); + + return this; + }, + + /** + * Compare the depth of two Faces. + * + * @method Phaser.Geom.Mesh.Model#sortByDepth + * @since 3.50.0 + * + * @param {Phaser.Geom.Mesh.Face} faceA - The first Face. + * @param {Phaser.Geom.Mesh.Face} faceB - The second Face. + * + * @return {integer} The difference between the depths of each Face. + */ + sortByDepth: function (faceA, faceB) + { + return faceA.depth - faceB.depth; + }, + + /** + * Adds a new Vertex into the vertices array of this Mesh. + * + * Just adding a vertex isn't enough to render it. You need to also + * make it part of a Face, with 3 Vertex instances per Face. + * + * @method Phaser.Geom.Mesh.Model#addVertex + * @since 3.50.0 + * + * @param {number} x - The x position of the vertex. + * @param {number} y - The y position of the vertex. + * @param {number} z - The z position of the vertex. + * @param {number} u - The UV u coordinate of the vertex. + * @param {number} v - The UV v coordinate of the vertex. + * @param {number} [color=0xffffff] - The color value of the vertex. + * @param {number} [alpha=1] - The alpha value of the vertex. + * + * @return {this} This Mesh Game Object. + */ + addVertex: function (x, y, z, u, v, color, alpha) + { + var vert = new Vertex(x, y, z, u, v, color, alpha); + + this.vertices.push(vert); + + return vert; + }, + + /** + * Adds a new Face into the faces array of this Mesh. + * + * A Face consists of references to 3 Vertex instances, which must be provided. + * + * @method Phaser.Geom.Mesh.Model#addFace + * @since 3.50.0 + * + * @param {Phaser.Geom.Mesh.Vertex} vertex1 - The first vertex of the Face. + * @param {Phaser.Geom.Mesh.Vertex} vertex2 - The second vertex of the Face. + * @param {Phaser.Geom.Mesh.Vertex} vertex3 - The third vertex of the Face. + * + * @return {this} This Mesh Game Object. + */ + addFace: function (vertex1, vertex2, vertex3) + { + var face = new Face(vertex1, vertex2, vertex3); + + this.faces.push(face); + + return face; + }, + + /** + * Rotates all vertices of this Mesh around the X axis by the amount given. + * + * It then runs a depth sort on the faces before returning. + * + * @method Phaser.Geom.Mesh.Model#rotateX + * @since 3.50.0 + * + * @param {number} theta - The amount to rotate by in radians. + * + * @return {this} This Mesh Game Object. + */ + rotateX: function (theta) + { + var ts = Math.sin(theta); + var tc = Math.cos(theta); + + var verts = this.vertices; + + for (var n = 0; n < verts.length; n++) + { + var vert = verts[n]; + var y = vert.y; + var z = vert.z; + + vert.y = y * tc - z * ts; + vert.z = z * tc + y * ts; + } + + return this.depthSort(); + }, + + /** + * Rotates all vertices of this Mesh around the Y axis by the amount given. + * + * It then runs a depth sort on the faces before returning. + * + * @method Phaser.Geom.Mesh.Model#rotateY + * @since 3.50.0 + * + * @param {number} theta - The amount to rotate by in radians. + * + * @return {this} This Mesh Game Object. + */ + rotateY: function (theta) + { + var ts = Math.sin(theta); + var tc = Math.cos(theta); + + var verts = this.vertices; + + for (var n = 0; n < verts.length; n++) + { + var vert = verts[n]; + var x = vert.x; + var z = vert.z; + + vert.x = x * tc - z * ts; + vert.z = z * tc + x * ts; + } + + return this.depthSort(); + }, + + /** + * Rotates all vertices of this Mesh around the Z axis by the amount given. + * + * It then runs a depth sort on the faces before returning. + * + * @method Phaser.Geom.Mesh.Model#rotateZ + * @since 3.50.0 + * + * @param {number} theta - The amount to rotate by in radians. + * + * @return {this} This Mesh Game Object. + */ + rotateZ: function (theta) + { + var ts = Math.sin(theta); + var tc = Math.cos(theta); + + var verts = this.vertices; + + for (var n = 0; n < verts.length; n++) + { + var vert = verts[n]; + var x = vert.x; + var y = vert.y; + + vert.x = x * tc - y * ts; + vert.y = y * tc + x * ts; + } + + return this.depthSort(); + }, + + /** + * Destroys this Model, all of its Faces, Vertices and references. + * + * @method Phaser.Geom.Mesh.Model#destroy + * @since 3.50.0 + */ + destroy: function () + { + // TODO + } + +}); + +module.exports = Model; diff --git a/src/geom/ParseObj.js b/src/geom/mesh/ParseObj.js similarity index 100% rename from src/geom/ParseObj.js rename to src/geom/mesh/ParseObj.js diff --git a/src/gameobjects/mesh/Vertex.js b/src/geom/mesh/Vertex.js similarity index 67% rename from src/gameobjects/mesh/Vertex.js rename to src/geom/mesh/Vertex.js index 60c932e44..e571734da 100644 --- a/src/gameobjects/mesh/Vertex.js +++ b/src/geom/mesh/Vertex.js @@ -5,17 +5,19 @@ */ var Class = require('../../utils/Class'); +var Vector3 = require('../../math/Vector3'); var Utils = require('../../renderer/webgl/Utils'); /** * @classdesc - * A Vertex Game Object. + * A Vertex Object. * - * This tiny class consists of all the information for a single vertex within a Mesh - * Game Object. + * This class consists of all the information needed for a single vertex within + * a Model Game Object. * * @class Vertex - * @memberof Phaser.GameObjects + * @memberof Phaser.Geom.Mesh + * @extends Phaser.Math.Vector3 * @constructor * @since 3.50.0 * @@ -29,39 +31,34 @@ var Utils = require('../../renderer/webgl/Utils'); */ var Vertex = new Class({ + Extends: Vector3, + initialize: function Vertex (x, y, z, u, v, color, alpha) { + Vector3.call(this, x, y, z); + if (color === undefined) { color = 0xffffff; } if (alpha === undefined) { alpha = 1; } /** - * The x coordinate of this vertex. + * The projected x coordinate of this vertex. * - * @name Phaser.GameObjects.Vertex#x + * @name Phaser.GameObjects.Vertex#vx * @type {number} * @since 3.50.0 */ - this.x = x; + this.vx = 0; /** - * The y coordinate of this vertex. + * The projected y coordinate of this vertex. * - * @name Phaser.GameObjects.Vertex#y + * @name Phaser.GameObjects.Vertex#vy * @type {number} * @since 3.50.0 */ - this.y = y; - - /** - * The z coordinate of this vertex. - * - * @name Phaser.GameObjects.Vertex#z - * @type {number} - * @since 3.50.0 - */ - this.z = z; + this.vy = 0; /** * UV u coordinate of this vertex. @@ -100,36 +97,26 @@ var Vertex = new Class({ this.alpha = alpha; }, - setPosition: function (x, y, z) + transformCoordinatesLocal: function (transformMatrix, width, height) { - this.x = x; - this.y = y; - this.z = z; + var x = this.x; + var y = this.y; + var z = this.z; - return this; + var m = transformMatrix.val; + + var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12]; + var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13]; + var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15]; + + this.vx = (tx / tw) * width + width / 2; + this.vy = -(ty / tw) * height + height / 2; }, - translate: function (x, y) + load: function (F32, U32, offset, textureUnit, tintEffect, alpha, a, b, c, d, e, f) { - if (y === undefined) { y = 0; } - - this.x += x; - this.y += y; - }, - - load: function (F32, U32, offset, textureUnit, tintEffect, alpha, a, b, c, d, e, f, roundPixels) - { - var tx = this.x * a + this.y * c + e; - var ty = this.x * b + this.y * d + f; - - if (roundPixels) - { - tx = Math.round(tx); - ty = Math.round(ty); - } - - F32[++offset] = tx; - F32[++offset] = ty; + F32[++offset] = this.vx * a + this.vy * c + e; + F32[++offset] = this.vx * b + this.vy * d + f; F32[++offset] = this.u; F32[++offset] = this.v; F32[++offset] = textureUnit; diff --git a/src/geom/mesh/index.js b/src/geom/mesh/index.js new file mode 100644 index 000000000..a2bb6019a --- /dev/null +++ b/src/geom/mesh/index.js @@ -0,0 +1,20 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Geom.Mesh + */ + +var Mesh = { + + Face: require('./Face'), + Model: require('./Model'), + ParseObj: require('./ParseObj'), + Vertex: require('./Vertex') + +}; + +module.exports = Mesh; From 113ae646e2930aafd18b2e95b2997e5974991c2b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 13:50:44 +0100 Subject: [PATCH 131/153] Updated path ref --- src/loader/filetypes/OBJFile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader/filetypes/OBJFile.js b/src/loader/filetypes/OBJFile.js index 914605948..abb1ffd7d 100644 --- a/src/loader/filetypes/OBJFile.js +++ b/src/loader/filetypes/OBJFile.js @@ -10,7 +10,7 @@ var File = require('../File'); var FileTypesManager = require('../FileTypesManager'); var GetFastValue = require('../../utils/object/GetFastValue'); var IsPlainObject = require('../../utils/object/IsPlainObject'); -var ParseObj = require('../../geom/ParseObj'); +var ParseObj = require('../../geom/mesh/ParseObj'); /** * @classdesc From 4f7442ee96dcfae01ef8c4f46deb87b119584caf Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 13:51:30 +0100 Subject: [PATCH 132/153] Moving all dependencies to the Model object --- src/gameobjects/mesh/Mesh.js | 398 +++++++---------------------------- 1 file changed, 74 insertions(+), 324 deletions(-) diff --git a/src/gameobjects/mesh/Mesh.js b/src/gameobjects/mesh/Mesh.js index 036b3affa..380c185f2 100644 --- a/src/gameobjects/mesh/Mesh.js +++ b/src/gameobjects/mesh/Mesh.js @@ -7,13 +7,14 @@ var AnimationState = require('../../animations/AnimationState'); var Class = require('../../utils/Class'); var Components = require('../components'); -var Face = require('./Face'); +var Face = require('../../geom/mesh/Face'); var GameObject = require('../GameObject'); var GameObjectEvents = require('../events'); -var GetCalcMatrix = require('../GetCalcMatrix'); +var Matrix4 = require('../../math/Matrix4'); var MeshRender = require('./MeshRender'); -var StableSort = require('../../utils/array/StableSort'); -var Vertex = require('./Vertex'); +var Model = require('../../geom/mesh/Model'); +var Vertex = require('../../geom/mesh/Vertex'); +var Vector3 = require('../../math/Vector3'); /** * @classdesc @@ -85,42 +86,18 @@ var Mesh = new Class({ */ this.anims = new AnimationState(this); - /** - * An array containing the Face instances belonging to this Mesh. - * - * A Face consists of 3 Vertex objects. - * - * This array is populated during the `setVertices` method. - * - * @name Phaser.GameObjects.Mesh#faces - * @type {Phaser.GameObjects.Face[]} - * @since 3.50.0 - */ - this.faces = []; + this.camera = { + fov: 0.8, + near: 0.01, + far: 1000, + position: new Vector3(0, 0, -10), + target: new Vector3(0, 0, 0) + }; - /** - * An array containing Vertex instances. One instance per vertex in this Mesh. - * - * This array is populated during the `setVertices` method. - * - * @name Phaser.GameObjects.Mesh#vertices - * @type {Phaser.GameObjects.Vertex[]} - * @since 3.50.0 - */ - this.vertices = []; + this.models = []; - /** - * The tint fill mode. - * - * `false` = An additive tint (the default), where vertices colors are blended with the texture. - * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. - * - * @name Phaser.GameObjects.Mesh#tintFill - * @type {boolean} - * @default false - * @since 3.50.0 - */ - this.tintFill = false; + this.viewMatrix = new Matrix4(); + this.projectionMatrix = new Matrix4(); /** * You can optionally choose to render the vertices of this Mesh to a Graphics instance. @@ -155,18 +132,6 @@ var Mesh = new Class({ */ this.debugGraphic = null; - /** - * When rendering, skip any Face that isn't counter clockwise? - * - * Enable this to hide backward-facing Faces during rendering. - * Disable it to render all Faces. - * - * @name Phaser.GameObjects.Mesh#hideCCW - * @type {boolean} - * @since 3.50.0 - */ - this.hideCCW = true; - this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); @@ -193,26 +158,16 @@ var Mesh = new Class({ this.scene.sys.updateList.remove(this); }, - /** - * Iterates and destroys all current Faces in this Mesh, if any. - * Then resets the Face and Vertices arrays. - * - * @method Phaser.GameObjects.Mesh#clearVertices - * @since 3.50.0 - * - * @return {this} This Mesh Game Object. - */ - clearVertices: function () + clearModels: function () { - this.faces.forEach(function (face) + var models = this.models; + + for (var i = 0; i < models.length; i++) { - face.destroy(); - }); + models[i].destroy(); + } - this.faces = []; - this.vertices = []; - - return this; + this.models = []; }, /** @@ -243,18 +198,28 @@ var Mesh = new Class({ * @param {number} [y=0] - Offset the model y position by this amount. * @param {number} [z=0] - Offset the model z position by this amount. * - * @return {this} This Mesh Game Object. + * @return {Phaser.GameObjects.Model} The Model instance that was created. */ addOBJ: function (key, scale, x, y, z) { + var model; var data = this.scene.sys.cache.obj.get(key); if (data) { - this.addModel(data, scale, x, y, z); + model = this.addModelData(data, scale, x, y, z); } - return this; + return model; + }, + + addModel: function (x, y, z) + { + var model = new Model(x, y, z); + + this.models.push(model); + + return model; }, /** @@ -276,7 +241,7 @@ var Mesh = new Class({ * moved or rotated. You can scale the model data, should it be too small (or large) to visualize. * You can also offset the model via the `x`, `y` and `z` parameters. * - * @method Phaser.GameObjects.Mesh#addModel + * @method Phaser.GameObjects.Mesh#addModelData * @since 3.50.0 * * @param {array} data - The parsed model data array. @@ -287,20 +252,24 @@ var Mesh = new Class({ * * @return {this} This Mesh Game Object. */ - addModel: function (data, scale, x, y, z) + addModelData: function (data, scale, x, y, z) { if (scale === undefined) { scale = 1; } if (x === undefined) { x = 0; } if (y === undefined) { y = 0; } if (z === undefined) { z = 0; } + var results = []; + for (var m = 0; m < data.models.length; m++) { - var model = data.models[m]; + var model = this.addModel(x, y, z); - var vertices = model.vertices; - var textureCoords = model.textureCoords; - var faces = model.faces; + var modelData = data.models[m]; + + var vertices = modelData.vertices; + var textureCoords = modelData.textureCoords; + var faces = modelData.faces; for (var i = 0; i < faces.length; i++) { @@ -322,196 +291,17 @@ var Mesh = new Class({ var uv2 = (t2 === -1) ? { u: 0, v: 0 } : textureCoords[t2]; var uv3 = (t3 === -1) ? { u: 1, v: 1 } : textureCoords[t3]; - var vert1 = this.addVertex(x + m1.x * scale, y + m1.y * scale, z + m1.z * scale, uv1.u, uv1.v); - var vert2 = this.addVertex(x + m2.x * scale, y + m2.y * scale, z + m2.z * scale, uv2.u, uv2.v); - var vert3 = this.addVertex(x + m3.x * scale, y + m3.y * scale, z + m3.z * scale, uv3.u, uv3.v); + var vert1 = model.addVertex(x + m1.x * scale, y + m1.y * scale, z + m1.z * scale, uv1.u, uv1.v); + var vert2 = model.addVertex(x + m2.x * scale, y + m2.y * scale, z + m2.z * scale, uv2.u, uv2.v); + var vert3 = model.addVertex(x + m3.x * scale, y + m3.y * scale, z + m3.z * scale, uv3.u, uv3.v); - this.addFace(vert1, vert2, vert3); + model.addFace(vert1, vert2, vert3); } + + results.push(model); } - return this; - }, - - /** - * Compare the depth of two Faces. - * - * @method Phaser.GameObjects.Mesh#sortByDepth - * @since 3.50.0 - * - * @param {Phaser.GameObjects.Face} faceA - The first Face. - * @param {Phaser.GameObjects.Face} faceB - The second Face. - * - * @return {integer} The difference between the depths of each Face. - */ - sortByDepth: function (faceA, faceB) - { - return faceA.depth - faceB.depth; - }, - - /** - * Rotates all vertices of this Mesh around the X axis by the amount given. - * - * It then runs a depth sort on the faces before returning. - * - * @method Phaser.GameObjects.Mesh#rotateX - * @since 3.50.0 - * - * @param {number} theta - The amount to rotate by in radians. - * - * @return {this} This Mesh Game Object. - */ - rotateX: function (theta) - { - var ts = Math.sin(theta); - var tc = Math.cos(theta); - - var verts = this.vertices; - - for (var n = 0; n < verts.length; n++) - { - var vert = verts[n]; - var y = vert.y; - var z = vert.z; - - vert.y = y * tc - z * ts; - vert.z = z * tc + y * ts; - } - - return this.depthSort(); - }, - - /** - * Rotates all vertices of this Mesh around the Y axis by the amount given. - * - * It then runs a depth sort on the faces before returning. - * - * @method Phaser.GameObjects.Mesh#rotateY - * @since 3.50.0 - * - * @param {number} theta - The amount to rotate by in radians. - * - * @return {this} This Mesh Game Object. - */ - rotateY: function (theta) - { - var ts = Math.sin(theta); - var tc = Math.cos(theta); - - var verts = this.vertices; - - for (var n = 0; n < verts.length; n++) - { - var vert = verts[n]; - var x = vert.x; - var z = vert.z; - - vert.x = x * tc - z * ts; - vert.z = z * tc + x * ts; - } - - return this.depthSort(); - }, - - /** - * Rotates all vertices of this Mesh around the Z axis by the amount given. - * - * It then runs a depth sort on the faces before returning. - * - * @method Phaser.GameObjects.Mesh#rotateZ - * @since 3.50.0 - * - * @param {number} theta - The amount to rotate by in radians. - * - * @return {this} This Mesh Game Object. - */ - rotateZ: function (theta) - { - var ts = Math.sin(theta); - var tc = Math.cos(theta); - - var verts = this.vertices; - - for (var n = 0; n < verts.length; n++) - { - var vert = verts[n]; - var x = vert.x; - var y = vert.y; - - vert.x = x * tc - y * ts; - vert.y = y * tc + x * ts; - } - - return this.depthSort(); - }, - - /** - * Runs a depth sort across all Faces in this Mesh, comparing their averaged depth. - * - * This is called automatically if you use any of the `rotate` methods, but you can - * also invoke it to sort the Faces should you manually position them. - * - * @method Phaser.GameObjects.Mesh#depthSort - * @since 3.50.0 - * - * @return {this} This Mesh Game Object. - */ - depthSort: function () - { - StableSort(this.faces, this.sortByDepth); - - return this; - }, - - /** - * Adds a new Vertex into the vertices array of this Mesh. - * - * Just adding a vertex isn't enough to render it. You need to also - * make it part of a Face, with 3 Vertex instances per Face. - * - * @method Phaser.GameObjects.Mesh#addVertex - * @since 3.50.0 - * - * @param {number} x - The x position of the vertex. - * @param {number} y - The y position of the vertex. - * @param {number} z - The z position of the vertex. - * @param {number} u - The UV u coordinate of the vertex. - * @param {number} v - The UV v coordinate of the vertex. - * @param {number} [color=0xffffff] - The color value of the vertex. - * @param {number} [alpha=1] - The alpha value of the vertex. - * - * @return {this} This Mesh Game Object. - */ - addVertex: function (x, y, z, u, v, color, alpha) - { - var vert = new Vertex(x, y, z, u, v, color, alpha); - - this.vertices.push(vert); - - return vert; - }, - - /** - * Adds a new Face into the faces array of this Mesh. - * - * A Face consists of references to 3 Vertex instances, which must be provided. - * - * @method Phaser.GameObjects.Mesh#addFace - * @since 3.50.0 - * - * @param {Phaser.GameObjects.Vertex} vertex1 - The first vertex of the Face. - * @param {Phaser.GameObjects.Vertex} vertex2 - The second vertex of the Face. - * @param {Phaser.GameObjects.Vertex} vertex3 - The third vertex of the Face. - * - * @return {this} This Mesh Game Object. - */ - addFace: function (vertex1, vertex2, vertex3) - { - var face = new Face(vertex1, vertex2, vertex3); - - this.faces.push(face); - - return face; + return results; }, /** @@ -630,47 +420,6 @@ var Mesh = new Class({ return this; }, - /** - * Returns the total number of Faces in this Mesh Game Object. - * - * @method Phaser.GameObjects.Mesh#getFaceCount - * @since 3.50.0 - * - * @return {number} The number of Faces in this Mesh Game Object. - */ - getFaceCount: function () - { - return this.faces.length; - }, - - /** - * Returns the total number of Vertices in this Mesh Game Object. - * - * @method Phaser.GameObjects.Mesh#getVertexCount - * @since 3.50.0 - * - * @return {number} The number of Vertices in this Mesh Game Object. - */ - getVertexCount: function () - { - return this.vertices.length; - }, - - /** - * Returns the Face at the given index in this Mesh Game Object. - * - * @method Phaser.GameObjects.Mesh#getFace - * @since 3.50.0 - * - * @param {number} index - The index of the Face to get. - * - * @return {Phaser.GameObjects.Face} The Face at the given index, or `undefined` if index out of range. - */ - getFace: function (index) - { - return this.faces[index]; - }, - /** * Return an array of Face objects from this Mesh that intersect with the given coordinates. * @@ -689,26 +438,10 @@ var Mesh = new Class({ * * @return {Phaser.GameObjects.Face[]} An array of Face objects that intersect with the given point, ordered by depth. */ - getFaceAt: function (x, y, camera) + getModelAt: function (x, y, camera) { if (camera === undefined) { camera = this.scene.sys.cameras.main; } - var calcMatrix = GetCalcMatrix(this, camera).calc; - - var faces = this.faces; - var results = []; - - for (var i = 0; i < faces.length; i++) - { - var face = faces[i]; - - if (face.contains(x, y, calcMatrix)) - { - results.push(face); - } - } - - return StableSort(results, this.sortByDepth); }, /** @@ -776,6 +509,24 @@ var Mesh = new Class({ preUpdate: function (time, delta) { this.anims.update(time, delta); + + var renderer = this.scene.sys.renderer; + var width = renderer.width; + var height = renderer.height; + + var camera = this.camera; + var models = this.models; + var viewMatrix = this.viewMatrix; + var projectionMatrix = this.projectionMatrix; + + viewMatrix.lookAt(camera.position, camera.target, Vector3.UP); + + projectionMatrix.perspective(camera.fov, width / height, camera.near, camera.far); + + for (var i = 0; i < models.length; i++) + { + models[i].update(viewMatrix, projectionMatrix, width, height); + } }, /** @@ -787,14 +538,13 @@ var Mesh = new Class({ * @since 3.50.0 * * @param {Phaser.GameObjects.Mesh} src - The Mesh object being rendered. - * @param {integer} meshLength - The number of vertices in the mesh. * @param {number[]} verts - An array of translated vertex coordinates. */ - renderDebugVerts: function (src, meshLength, verts) + renderDebugVerts: function (src, verts) { var graphic = src.debugGraphic; - for (var i = 0; i < meshLength; i += 6) + for (var i = 0; i < verts.length; i += 6) { var x0 = verts[i + 0]; var y0 = verts[i + 1]; @@ -820,7 +570,7 @@ var Mesh = new Class({ this.anims = undefined; - this.clearVertices(); + this.clearModels(); this.debugCallback = null; this.debugGraphic = null; From da6a300474e6dc5bfef9b83d1ccfd1003dc0d2f8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 13:51:39 +0100 Subject: [PATCH 133/153] Iterates and renders the new models array --- src/gameobjects/mesh/MeshWebGLRenderer.js | 79 ++++++++++++++--------- 1 file changed, 49 insertions(+), 30 deletions(-) diff --git a/src/gameobjects/mesh/MeshWebGLRenderer.js b/src/gameobjects/mesh/MeshWebGLRenderer.js index d6442d264..c359233b6 100644 --- a/src/gameobjects/mesh/MeshWebGLRenderer.js +++ b/src/gameobjects/mesh/MeshWebGLRenderer.js @@ -22,13 +22,13 @@ var GetCalcMatrix = require('../GetCalcMatrix'); */ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) { - var faces = src.faces; - var totalFaces = faces.length; + // var faces = src.faces; + // var totalFaces = faces.length; - if (totalFaces === 0) - { - return; - } + // if (totalFaces === 0) + // { + // return; + // } var pipeline = renderer.pipelines.set(src.pipeline, src); @@ -53,49 +53,68 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) var e = calcMatrix.e; var f = calcMatrix.f; - var roundPixels = camera.roundPixels; - var alpha = camera.alpha * src.alpha; - var hideCCW = src.hideCCW; + var globalAlpha = camera.alpha * src.alpha; - for (var i = 0; i < totalFaces; i++) + var models = src.models; + + for (var m = 0; m < models.length; m++) { - var face = faces[i]; + var model = models[m]; - if (hideCCW && !face.isCounterClockwise()) + var faces = model.faces; + var totalFaces = faces.length; + var alpha = globalAlpha * model.alpha; + + if (totalFaces === 0 || !model.visible || alpha <= 0) { continue; } - if (pipeline.shouldFlush(3)) + if (pipeline.shouldFlush(model.getVertexCount())) { pipeline.flush(); vertexOffset = 0; } - vertexOffset = face.vertex1.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f, roundPixels); - vertexOffset = face.vertex2.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f, roundPixels); - vertexOffset = face.vertex3.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f, roundPixels); + if (debugCallback) + { + debugVerts = []; + } - pipeline.vertexCount += 3; + for (var i = 0; i < totalFaces; i++) + { + var face = faces[i]; + + if (model.hideCCW && !face.isCounterClockwise()) + { + continue; + } + + vertexOffset = face.vertex1.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f); + vertexOffset = face.vertex2.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f); + vertexOffset = face.vertex3.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f); + + pipeline.vertexCount += 3; + + if (debugCallback) + { + debugVerts.push( + F32[vertexOffset - 20], + F32[vertexOffset - 19], + F32[vertexOffset - 13], + F32[vertexOffset - 12], + F32[vertexOffset - 6], + F32[vertexOffset - 5] + ); + } + } if (debugCallback) { - debugVerts.push( - F32[vertexOffset - 20], - F32[vertexOffset - 19], - F32[vertexOffset - 13], - F32[vertexOffset - 12], - F32[vertexOffset - 6], - F32[vertexOffset - 5] - ); + debugCallback.call(src, src, debugVerts); } } - - if (debugCallback) - { - debugCallback.call(src, src, src.vertices.length * 2, debugVerts); - } }; module.exports = MeshWebGLRenderer; From 8ff008b740e954e7003afec3ada48182a9a28e9f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 16:38:32 +0100 Subject: [PATCH 134/153] Removed un-used components, refactored method names and added MeshCamera --- src/gameobjects/mesh/Mesh.js | 376 +++++++++++++++++------------------ 1 file changed, 183 insertions(+), 193 deletions(-) diff --git a/src/gameobjects/mesh/Mesh.js b/src/gameobjects/mesh/Mesh.js index 380c185f2..bcba70a7c 100644 --- a/src/gameobjects/mesh/Mesh.js +++ b/src/gameobjects/mesh/Mesh.js @@ -4,17 +4,14 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AnimationState = require('../../animations/AnimationState'); var Class = require('../../utils/Class'); var Components = require('../components'); -var Face = require('../../geom/mesh/Face'); var GameObject = require('../GameObject'); var GameObjectEvents = require('../events'); -var Matrix4 = require('../../math/Matrix4'); +var GetCalcMatrix = require('../GetCalcMatrix'); var MeshRender = require('./MeshRender'); +var MeshCamera = require('./MeshCamera'); var Model = require('../../geom/mesh/Model'); -var Vertex = require('../../geom/mesh/Vertex'); -var Vector3 = require('../../math/Vector3'); /** * @classdesc @@ -36,8 +33,6 @@ var Vector3 = require('../../math/Vector3'); * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Mask * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.Texture * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * @extends Phaser.GameObjects.Components.ScrollFactor @@ -63,8 +58,6 @@ var Mesh = new Class({ Components.Depth, Components.Mask, Components.Pipeline, - Components.Size, - Components.Texture, Components.Transform, Components.Visible, Components.ScrollFactor, @@ -77,28 +70,13 @@ var Mesh = new Class({ { GameObject.call(this, scene, 'Mesh'); - /** - * The Animation State of this Mesh. - * - * @name Phaser.GameObjects.Mesh#anims - * @type {Phaser.Animation.AnimationState} - * @since 3.50.0 - */ - this.anims = new AnimationState(this); + this._prevWidth = 0; + this._prevHeight = 0; - this.camera = { - fov: 0.8, - near: 0.01, - far: 1000, - position: new Vector3(0, 0, -10), - target: new Vector3(0, 0, 0) - }; + this.camera = new MeshCamera(45, 0, 0, -10, 0.01, 1000); this.models = []; - this.viewMatrix = new Matrix4(); - this.projectionMatrix = new Matrix4(); - /** * You can optionally choose to render the vertices of this Mesh to a Graphics instance. * @@ -132,14 +110,13 @@ var Mesh = new Class({ */ this.debugGraphic = null; - this.setTexture(texture, frame); this.setPosition(x, y); - this.setSizeToFrame(); + this.initPipeline(); if (vertices) { - this.addVertices(vertices, uvs, indicies, colors, alphas); + this.addModelFromVertices(vertices, uvs, indicies, texture, frame, colors, alphas); } this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); @@ -158,6 +135,12 @@ var Mesh = new Class({ this.scene.sys.updateList.remove(this); }, + /** + * Removes all Models from this Mesh, calling `destroy` on each one of them. + * + * @method Phaser.GameObjects.Mesh#clearModels + * @since 3.50.0 + */ clearModels: function () { var models = this.models; @@ -171,51 +154,22 @@ var Mesh = new Class({ }, /** - * This method will add the model data from a loaded triangulated Wavefront OBJ file to this Mesh. + * This method creates a new blank Model instance and adds it to this Mesh. * - * The obj should have been loaded via the OBJFile: - * - * ```javascript - * this.load.obj(key, url); - * ``` - * - * Then use the key it was loaded under in this call. - * - * Multiple Mesh objects can use the same model data without impacting on each other. - * - * Make sure your 3D package has triangulated the model data prior to exporting it. - * - * You may add multiple models to a single Mesh, although they will act as one when - * moved or rotated. You can scale the model data, should it be too small (or large) to visualize. - * You can also offset the model via the `x`, `y` and `z` parameters. - * - * @method Phaser.GameObjects.Mesh#addOBJ + * @method Phaser.GameObjects.Mesh#addModel * @since 3.50.0 * - * @param {string} key - The key of the model data in the OBJ Cache to add to this Mesh. - * @param {number} [scale=1] - An amount to scale the model data by. Use this if the model has exported too small, or large, to see. - * @param {number} [x=0] - Offset the model x position by this amount. - * @param {number} [y=0] - Offset the model y position by this amount. - * @param {number} [z=0] - Offset the model z position by this amount. + * @param {string|Phaser.Textures.Texture} [texture] - The key, or instance of the Texture this model will use to render with, as stored in the Texture Manager. + * @param {string|integer} [frame] - An optional frame from the Texture this model is rendering with. Ensure your UV data also matches this frame. + * @param {number} [x=0] - The x position of the Model. + * @param {number} [y=0] - The y position of the Model. + * @param {number} [z=0] - The z position of the Model. * - * @return {Phaser.GameObjects.Model} The Model instance that was created. + * @return {Phaser.Geom.Mesh.Model} The Model instance that was created. */ - addOBJ: function (key, scale, x, y, z) + addModel: function (texture, frame, x, y, z) { - var model; - var data = this.scene.sys.cache.obj.get(key); - - if (data) - { - model = this.addModelData(data, scale, x, y, z); - } - - return model; - }, - - addModel: function (x, y, z) - { - var model = new Model(x, y, z); + var model = new Model(this, texture, frame, x, y, z); this.models.push(model); @@ -223,47 +177,108 @@ var Mesh = new Class({ }, /** - * This method will add parsed triangulated OBJ model data to this Mesh. + * This method creates a new Model based on a loaded triangulated Wavefront OBJ. * - * The obj should have been parsed in advance via the ParseObj function: + * The obj file should have been loaded via OBJFile: * * ```javascript - * var data = Phaser.Geom.ParseObj(rawData, flipUV); - * - * Mesh.addModel(data); + * this.load.obj(key, url, [ flipUV ]); * ``` * - * Multiple Mesh objects can use the same model data without impacting on each other. + * Then use the key it was loaded under in this method. + * + * If the model has a texture, you must provide it as the second parameter. + * + * The model is then added to this Mesh. A single Mesh can contain multiple models + * without impacting each other. Equally, multiple models can all share the same base OBJ + * data. * * Make sure your 3D package has triangulated the model data prior to exporting it. * - * You may add multiple models to a single Mesh, although they will act as one when - * moved or rotated. You can scale the model data, should it be too small (or large) to visualize. - * You can also offset the model via the `x`, `y` and `z` parameters. + * You can scale the model data during import, which will set the new 'base' scale for the model. * - * @method Phaser.GameObjects.Mesh#addModelData + * You can also offset the models generated vertex positions via the `originX`, `originY` and `originZ` + * parameters, which will change the rotation origin of the model. The model itself can be positioned, + * rotated and scaled independantly of these settings, so don't use them to position the model, just + * use them to offset the base values. + * + * @method Phaser.GameObjects.Mesh#addModelFromOBJ * @since 3.50.0 * - * @param {array} data - The parsed model data array. - * @param {number} [scale=1] - An amount to scale the model data by. Use this if the model has exported too small, or large, to see. - * @param {number} [x=0] - Offset the model x position by this amount. - * @param {number} [y=0] - Offset the model y position by this amount. - * @param {number} [z=0] - Offset the model z position by this amount. + * @param {string} key - The key of the data in the OBJ Cache to create the model from. + * @param {string|Phaser.Textures.Texture} [texture] - The key, or instance of the Texture this model will use to render with, as stored in the Texture Manager. + * @param {string|integer} [frame] - An optional frame from the Texture this model is rendering with. Ensure your UV data also matches this frame. + * @param {number} [scale=1] - An amount to scale the model data by during creation. + * @param {number} [originX=0] - The x origin of the model vertices during creation. + * @param {number} [originY=0] - The y origin of the model vertices during creation. + * @param {number} [originZ=0] - The z origin of the model vertices during creation. * - * @return {this} This Mesh Game Object. + * @return {Phaser.Geom.Mesh.Model|Phaser.Geom.Mesh.Model[]} The Model instance that was created. If the OBJ contained multiple models then an array of Model instances is returned. */ - addModelData: function (data, scale, x, y, z) + addModelFromOBJ: function (key, texture, frame, scale, originX, originY, originZ) + { + var model = []; + var data = this.scene.sys.cache.obj.get(key); + + if (data) + { + model = this.addModelFromData(data, texture, frame, scale, originX, originY, originZ); + } + + return (model.length === 1) ? model[0] : model; + }, + + /** + * This method creates a new Model based on the parsed triangulated model data. + * + * The data should have been parsed in advance via a function such as `ParseObj`: + * + * ```javascript + * const data = Phaser.Geom.Mesh.ParseObj(rawData, flipUV); + * + * Mesh.addModelFromData(data, texture, frame); + * ``` + * + * If the model has a texture, you must provide it as the second parameter. + * + * The model is then added to this Mesh. A single Mesh can contain multiple models + * without impacting each other. Equally, multiple models can all share the same base OBJ + * data. + * + * Make sure your 3D package has triangulated the model data prior to exporting it. + * + * You can scale the model data during import, which will set the new 'base' scale for the model. + * + * You can also offset the models generated vertex positions via the `originX`, `originY` and `originZ` + * parameters, which will change the rotation origin of the model. The model itself can be positioned, + * rotated and scaled independantly of these settings, so don't use them to position the model, just + * use them to offset the base values. + * + * @method Phaser.GameObjects.Mesh#addModelFromData + * @since 3.50.0 + * + * @param {array} data - The parsed model data. + * @param {string|Phaser.Textures.Texture} [texture] - The key, or instance of the Texture this model will use to render with, as stored in the Texture Manager. + * @param {string|integer} [frame] - An optional frame from the Texture this model is rendering with. Ensure your UV data also matches this frame. + * @param {number} [scale=1] - An amount to scale the model data by during creation. + * @param {number} [originX=0] - The x origin of the model vertices during creation. + * @param {number} [originY=0] - The y origin of the model vertices during creation. + * @param {number} [originZ=0] - The z origin of the model vertices during creation. + * + * @return {Phaser.Geom.Mesh.Model|Phaser.Geom.Mesh.Model[]} The Model instance that was created. If the data contained multiple models then an array of Model instances is returned. + */ + addModelFromData: function (data, texture, frame, scale, originX, originY, originZ) { if (scale === undefined) { scale = 1; } - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (z === undefined) { z = 0; } + if (originX === undefined) { originX = 0; } + if (originY === undefined) { originY = 0; } + if (originZ === undefined) { originZ = 0; } var results = []; for (var m = 0; m < data.models.length; m++) { - var model = this.addModel(x, y, z); + var model = this.addModel(texture, frame); var modelData = data.models[m]; @@ -271,6 +286,10 @@ var Mesh = new Class({ var textureCoords = modelData.textureCoords; var faces = modelData.faces; + var defaultUV1 = { u: 0, v: 1 }; + var defaultUV2 = { u: 0, v: 0 }; + var defaultUV3 = { u: 1, v: 1 }; + for (var i = 0; i < faces.length; i++) { var face = faces[i]; @@ -287,13 +306,13 @@ var Mesh = new Class({ var t2 = v2.textureCoordsIndex; var t3 = v3.textureCoordsIndex; - var uv1 = (t1 === -1) ? { u: 0, v: 1 } : textureCoords[t1]; - var uv2 = (t2 === -1) ? { u: 0, v: 0 } : textureCoords[t2]; - var uv3 = (t3 === -1) ? { u: 1, v: 1 } : textureCoords[t3]; + var uv1 = (t1 === -1) ? defaultUV1 : textureCoords[t1]; + var uv2 = (t2 === -1) ? defaultUV2 : textureCoords[t2]; + var uv3 = (t3 === -1) ? defaultUV3 : textureCoords[t3]; - var vert1 = model.addVertex(x + m1.x * scale, y + m1.y * scale, z + m1.z * scale, uv1.u, uv1.v); - var vert2 = model.addVertex(x + m2.x * scale, y + m2.y * scale, z + m2.z * scale, uv2.u, uv2.v); - var vert3 = model.addVertex(x + m3.x * scale, y + m3.y * scale, z + m3.z * scale, uv3.u, uv3.v); + var vert1 = model.addVertex(originX + m1.x * scale, originY + m1.y * scale, originZ + m1.z * scale, uv1.u, uv1.v); + var vert2 = model.addVertex(originX + m2.x * scale, originY + m2.y * scale, originZ + m2.z * scale, uv2.u, uv2.v); + var vert3 = model.addVertex(originX + m3.x * scale, originY + m3.y * scale, originZ + m3.z * scale, uv3.u, uv3.v); model.addFace(vert1, vert2, vert3); } @@ -305,7 +324,7 @@ var Mesh = new Class({ }, /** - * Adds new vertices to this Mesh by parsing the given arrays. + * This method creates a new Model based on the given triangulated vertices arrays. * * The `vertices` parameter is a numeric array consisting of `x` and `y` pairs. * The `uvs` parameter is a numeric array consisting of `u` and `v` pairs. @@ -330,128 +349,90 @@ var Mesh = new Class({ * * const indices = [ 0, 2, 1, 2, 3, 1 ]; * - * Mesh.addVertices(vertices, uvs, indicies); + * Mesh.addModelFromVertices(vertices, uvs, indicies); * ``` * * Vertices must be provided as x/y pairs, there is no `z` component used in this call. For that, please see - * `addModel` instead. + * `addModelFromData` instead. * - * @method Phaser.GameObjects.Mesh#addVertices + * @method Phaser.GameObjects.Mesh#addModelFromVertices * @since 3.50.0 * * @param {number[]} vertices - The vertices array. * @param {number[]} uvs - The UVs array. * @param {number[]} [indicies] - Optional vertex indicies array. + * @param {string|Phaser.Textures.Texture} [texture] - The key, or instance of the Texture this model will use to render with, as stored in the Texture Manager. + * @param {string|integer} [frame] - An optional frame from the Texture this model is rendering with. * @param {number|number[]} [colors=0xffffff] - An array of colors, one per vertex, or a single color value applied to all vertices. * @param {number|number[]} [alphas=1] - An array of alpha values, one per vertex, or a single alpha value applied to all vertices. * - * @return {this} This Mesh Game Object. + * @return {Phaser.Geom.Mesh.Model} The Model instance that was created. */ - addVertices: function (vertices, uvs, indicies, colors, alphas) + addModelFromVertices: function (vertices, uvs, indicies, texture, frame, colors, alphas) { - if (colors === undefined) { colors = 0xffffff; } - if (alphas === undefined) { alphas = 1; } + var model = this.addModel(texture, frame, 0, 0, 0); - if (vertices.length !== uvs.length) - { - throw new Error('Mesh - vertices and uv count not equal'); - } + model.addVertices(vertices, uvs, indicies, colors, alphas); - var i; - var vert; - var verts = this.vertices; - var faces = this.faces; - - var isColorArray = Array.isArray(colors); - var isAlphaArray = Array.isArray(alphas); - - if (Array.isArray(indicies) && indicies.length > 0) - { - for (i = 0; i < indicies.length; i++) - { - var index = indicies[i] * 2; - - vert = new Vertex( - vertices[index], - vertices[index + 1], - 0, - uvs[index], - uvs[index + 1], - (isColorArray) ? colors[i] : colors, - (isAlphaArray) ? alphas[i] : alphas - ); - - verts.push(vert); - } - } - else - { - var colorIndex = 0; - - for (i = 0; i < vertices.length; i += 2) - { - vert = new Vertex( - vertices[i], - vertices[i + 1], - 0, - uvs[i], - uvs[i + 1], - (isColorArray) ? colors[colorIndex] : colors, - (isAlphaArray) ? alphas[colorIndex] : alphas - ); - - verts.push(vert); - - colorIndex++; - } - } - - for (i = 0; i < verts.length; i += 3) - { - var vert1 = verts[i]; - var vert2 = verts[i + 1]; - var vert3 = verts[i + 2]; - - var face = new Face(vert1, vert2, vert3); - - faces.push(face); - } - - return this; + return model; }, /** - * Return an array of Face objects from this Mesh that intersect with the given coordinates. + * Return an array of Modes from this Mesh that intersect with the given coordinates. * * The given position is translated through the matrix of this Mesh and the given Camera, - * before being compared against the vertices. + * before being compared against the model vertices. * - * If more than one Face intersects, they will all be returned in the array, but the array will + * If more than one model intersects, they will all be returned in the array, but the array will * be depth sorted first, so the first element will always be that closest to the camera. * - * @method Phaser.GameObjects.Mesh#getFaceAt + * @method Phaser.GameObjects.Mesh#getModelAt * @since 3.50.0 * * @param {number} x - The x position to check against. * @param {number} y - The y position to check against. - * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The camera to pass the coordinates through. If not give, the default Scene Camera is used. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The camera to pass the coordinates through. If not given, the default Scene Camera is used. * - * @return {Phaser.GameObjects.Face[]} An array of Face objects that intersect with the given point, ordered by depth. + * @return {Phaser.Geom.Mesh.Model[]} An array of Models objects that intersect with the given point, ordered by depth. */ getModelAt: function (x, y, camera) { if (camera === undefined) { camera = this.scene.sys.cameras.main; } + var results = []; + + var models = this.models; + + var calcMatrix = GetCalcMatrix(this.mesh, camera).calc; + + for (var i = 0; i < models.length; i++) + { + var model = models[i]; + + if (model.visible) + { + var faces = model.getFaceAt(x, y, camera, calcMatrix); + + if (faces.length > 0) + { + results.push({ model: model, faces: faces }); + } + } + } + + return results; }, /** - * This method enables rendering of the Mesh vertices to the given Graphics instance. + * This method enables rendering of the Model vertices to the given Graphics instance. * * If you enable this feature, you **must** call `Graphics.clear()` in your Scene `update`, * otherwise the Graphics instance you provide to debug will fill-up with draw calls, * eventually crashing the browser. This is not done automatically to allow you to debug * draw multiple Mesh objects to a single Graphics instance. * + * You can toggle debug drawing on a per-Model basis via the `Model.drawDebug` boolean property. + * * The Mesh class has a built-in debug rendering callback `Mesh.renderDebugVerts`, however * you can also provide your own callback to be used instead. Do this by setting the `callback` parameter. * @@ -459,8 +440,7 @@ var Mesh = new Class({ * * `callback(src, meshLength, verts)` * - * `src` is the Mesh instance being debugged. - * `meshLength` is the number of mesh vertices in total. + * `src` is the Model instance being debugged. * `verts` is an array of the translated vertex coordinates. * * If using your own callback you do not have to provide a Graphics instance to this method. @@ -508,36 +488,46 @@ var Mesh = new Class({ */ preUpdate: function (time, delta) { - this.anims.update(time, delta); - var renderer = this.scene.sys.renderer; + var width = renderer.width; var height = renderer.height; var camera = this.camera; + + if (camera.dirty || width !== this._prevWidth || height !== this._prevHeight) + { + // Renderer has resized, flow that down to the Camera + camera.update(width, height); + + this._prevWidth = width; + this._prevHeight = height; + } + var models = this.models; - var viewMatrix = this.viewMatrix; - var projectionMatrix = this.projectionMatrix; - - viewMatrix.lookAt(camera.position, camera.target, Vector3.UP); - - projectionMatrix.perspective(camera.fov, width / height, camera.near, camera.far); for (var i = 0; i < models.length; i++) { - models[i].update(viewMatrix, projectionMatrix, width, height); + var model = models[i]; + + if (model.visible) + { + model.preUpdate(time, delta, camera, width, height); + } } + + camera.dirty = false; }, /** - * The built-in Mesh vertices debug rendering method. + * The built-in vertices debug rendering method. * * See `Mesh.setDebug` for more details. * * @method Phaser.GameObjects.Mesh#renderDebugVerts * @since 3.50.0 * - * @param {Phaser.GameObjects.Mesh} src - The Mesh object being rendered. + * @param {Phaser.Geom.Mesh.Model} src - The Model being rendered. * @param {number[]} verts - An array of translated vertex coordinates. */ renderDebugVerts: function (src, verts) @@ -566,12 +556,12 @@ var Mesh = new Class({ */ preDestroy: function () { - this.anims.destroy(); - - this.anims = undefined; - this.clearModels(); + this.camera.destroy(); + + this.camera = null; + this.debugCallback = null; this.debugGraphic = null; } From 851775ae1951f201519795cd757945cfb702636b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 16:38:39 +0100 Subject: [PATCH 135/153] New MeshCamera class --- src/gameobjects/mesh/MeshCamera.js | 159 +++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 src/gameobjects/mesh/MeshCamera.js diff --git a/src/gameobjects/mesh/MeshCamera.js b/src/gameobjects/mesh/MeshCamera.js new file mode 100644 index 000000000..a82c7162a --- /dev/null +++ b/src/gameobjects/mesh/MeshCamera.js @@ -0,0 +1,159 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = require('../../utils/Class'); +var DegToRad = require('../../math/DegToRad'); +var Matrix4 = require('../../math/Matrix4'); +var Vector3 = require('../../math/Vector3'); + +/** + * @classdesc + * A Model Game Object. + * + * @class Model + * @memberof Phaser.Geom.Mesh + * @constructor + * @since 3.50.0 + */ +var MeshCamera = new Class({ + + initialize: + + function MeshCamera (fov, x, y, z, near, far) + { + this.dirty = true; + this.aspectRatio = 1; + + this._fov = fov; + this._near = near; + this._far = far; + + this._position = new Vector3(x, y, z); + this._target = new Vector3(); + + this.viewMatrix = new Matrix4(); + this.projectionMatrix = new Matrix4(); + }, + + update: function (width, height) + { + this.aspectRatio = width / height; + + this.viewMatrix.lookAt(this._position, this._target, Vector3.UP); + + this.projectionMatrix.perspective(DegToRad(this._fov), this.aspectRatio, this._near, this._far); + }, + + fov: { + + get: function () + { + return this._fov; + }, + + set: function (value) + { + if (value > 0 && value < 180) + { + this._fov = value; + this.dirty = true; + } + } + + }, + + near: { + + get: function () + { + return this._near; + }, + + set: function (value) + { + if (value > 0) + { + this._near = value; + this.dirty = true; + } + } + + }, + + far: { + + get: function () + { + return this._far; + }, + + set: function (value) + { + if (value > 0) + { + this._far = value; + this.dirty = true; + } + } + + }, + + x: { + + get: function () + { + return this._position.x; + }, + + set: function (value) + { + this._position.x = value; + this.dirty = true; + } + + }, + + y: { + + get: function () + { + return this._position.y; + }, + + set: function (value) + { + this._position.y = value; + this.dirty = true; + } + + }, + + z: { + + get: function () + { + return this._position.z; + }, + + set: function (value) + { + this._position.z = value; + this.dirty = true; + } + + }, + + destroy: function () + { + this._position = null; + this._target = null; + this.viewMatrix = null; + this.projectionMatrix = null; + } + +}); + +module.exports = MeshCamera; From fcd1cf96b8b11e733c10707ce8f8f823f149df39 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 16:38:53 +0100 Subject: [PATCH 136/153] Added dirty handling, drawDebug and destroy --- src/geom/mesh/Model.js | 391 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 375 insertions(+), 16 deletions(-) diff --git a/src/geom/mesh/Model.js b/src/geom/mesh/Model.js index 1da684179..dfeb4213c 100644 --- a/src/geom/mesh/Model.js +++ b/src/geom/mesh/Model.js @@ -4,13 +4,16 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var AnimationState = require('../../animations/AnimationState'); var Class = require('../../utils/Class'); +var Components = require('../../gameobjects/components'); var Face = require('./Face'); var GetCalcMatrix = require('../../gameobjects/GetCalcMatrix'); var Matrix4 = require('../../math/Matrix4'); var StableSort = require('../../utils/array/StableSort'); var Vector3 = require('../../math/Vector3'); var Vertex = require('./Vertex'); +var WrapAngle = require('../../math/angle/Wrap'); /** * @classdesc @@ -23,12 +26,34 @@ var Vertex = require('./Vertex'); */ var Model = new Class({ + Mixins: [ + Components.AlphaSingle, + Components.Size, + Components.Texture, + Components.Visible + ], + initialize: - function Model (mesh, x, y, z) + function Model (mesh, texture, frame, x, y, z) { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (z === undefined) { z = 0; } + this.mesh = mesh; + this.scene = mesh.scene; + + /** + * The Animation State of this Mesh. + * + * @name Phaser.GameObjects.Mesh#anims + * @type {Phaser.Animation.AnimationState} + * @since 3.50.0 + */ + this.anims = new AnimationState(this); + /** * An array containing the Face instances belonging to this Mesh. * @@ -78,14 +103,29 @@ var Model = new Class({ */ this.hideCCW = true; + this.drawDebug = true; + this.position = new Vector3(x, y, z); this.rotation = new Vector3(); this.scale = new Vector3(1, 1, 1); - this.visible = true; - this.alpha = 1; + this.dirtyCache = [ x, y, z, 0, 0, 0, 1, 1, 1, 0 ]; this.transformMatrix = new Matrix4(); + + if (!texture) + { + texture = this.scene.sys.textures.get('__WHITE'); + } + + this.setTexture(texture, frame); + + this.setSizeToFrame(); + }, + + emit: function () + { + this.mesh.emit.call(arguments); }, /** @@ -110,11 +150,77 @@ var Model = new Class({ return this; }, - update: function (viewMatrix, projectionMatrix, width, height) + isDirty: function () { + var position = this.position; + var rotation = this.rotation; + var scale = this.scale; + + var dirtyCache = this.dirtyCache; + + var px = position.x; + var py = position.y; + var pz = position.z; + + var rx = rotation.x; + var ry = rotation.y; + var rz = rotation.z; + + var sx = scale.x; + var sy = scale.y; + var sz = scale.z; + + var faces = this.getFaceCount(); + + var pxCached = dirtyCache[0]; + var pyCached = dirtyCache[1]; + var pzCached = dirtyCache[2]; + + var rxCached = dirtyCache[3]; + var ryCached = dirtyCache[4]; + var rzCached = dirtyCache[5]; + + var sxCached = dirtyCache[6]; + var syCached = dirtyCache[7]; + var szCached = dirtyCache[8]; + + var fCached = dirtyCache[9]; + + dirtyCache[0] = px; + dirtyCache[1] = py; + dirtyCache[2] = pz; + + dirtyCache[3] = rx; + dirtyCache[4] = ry; + dirtyCache[5] = rz; + + dirtyCache[6] = sx; + dirtyCache[7] = sy; + dirtyCache[8] = sz; + + dirtyCache[9] = faces; + + return ( + pxCached !== px || pyCached !== py || pzCached !== pz || + rxCached !== rx || ryCached !== ry || rzCached !== rz || + sxCached !== sx || syCached !== sy || szCached !== sz || + fCached !== faces + ); + }, + + preUpdate: function (time, delta, camera, width, height) + { + this.anims.update(time, delta); + + if (!camera.dirty && !this.isDirty()) + { + // If neither the camera or the model is dirty, we can bail out and save lots of math + return; + } + var transformMatrix = this.transformMatrix; - transformMatrix.setWorldMatrix(this.rotation, this.position, this.scale, viewMatrix, projectionMatrix); + transformMatrix.setWorldMatrix(this.rotation, this.position, this.scale, camera.viewMatrix, camera.projectionMatrix); var faces = this.faces; @@ -128,6 +234,8 @@ var Model = new Class({ } this.depthSort(); + + console.log('model.update'); }, /** @@ -185,15 +293,14 @@ var Model = new Class({ * * @param {number} x - The x position to check against. * @param {number} y - The y position to check against. - * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The camera to pass the coordinates through. If not give, the default Scene Camera is used. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The camera to pass the coordinates through. If not given, the default Scene Camera is used. * * @return {Phaser.Geom.Mesh.Face[]} An array of Face objects that intersect with the given point, ordered by depth. */ - getFaceAt: function (x, y, camera) + getFaceAt: function (x, y, camera, calcMatrix) { if (camera === undefined) { camera = this.scene.sys.cameras.main; } - - var calcMatrix = GetCalcMatrix(this.mesh, camera).calc; + if (calcMatrix === undefined) { calcMatrix = GetCalcMatrix(this.mesh, camera).calc; } var faces = this.faces; var results = []; @@ -296,19 +403,135 @@ var Model = new Class({ return face; }, + /** + * Adds new vertices to this Model by parsing the given arrays. + * + * The `vertices` parameter is a numeric array consisting of `x` and `y` pairs. + * The `uvs` parameter is a numeric array consisting of `u` and `v` pairs. + * The `indicies` parameter is an optional array that, if given, is an indexed list of vertices to be added. + * + * The following example will create a 256 x 256 sized quad using an index array: + * + * ```javascript + * const vertices = [ + * -128, 128, + * 128, 128, + * -128, -128, + * 128, -128 + * ]; + * + * const uvs = [ + * 0, 1, + * 1, 1, + * 0, 0, + * 1, 0 + * ]; + * + * const indices = [ 0, 2, 1, 2, 3, 1 ]; + * + * Mesh.addVertices(vertices, uvs, indicies); + * ``` + * + * Vertices must be provided as x/y pairs, there is no `z` component used in this call. For that, please see + * `addModel` instead. + * + * @method Phaser.GameObjects.Mesh#addVertices + * @since 3.50.0 + * + * @param {number[]} vertices - The vertices array. + * @param {number[]} uvs - The UVs array. + * @param {number[]} [indicies] - Optional vertex indicies array. + * @param {number|number[]} [colors=0xffffff] - An array of colors, one per vertex, or a single color value applied to all vertices. + * @param {number|number[]} [alphas=1] - An array of alpha values, one per vertex, or a single alpha value applied to all vertices. + * + * @return {this} This Mesh Game Object. + */ + addVertices: function (vertices, uvs, indicies, colors, alphas) + { + if (colors === undefined) { colors = 0xffffff; } + if (alphas === undefined) { alphas = 1; } + + if (vertices.length !== uvs.length) + { + throw new Error('Mesh - vertices and uv count not equal'); + } + + var i; + var vert; + var verts = this.vertices; + var faces = this.faces; + + var isColorArray = Array.isArray(colors); + var isAlphaArray = Array.isArray(alphas); + + if (Array.isArray(indicies) && indicies.length > 0) + { + for (i = 0; i < indicies.length; i++) + { + var index = indicies[i] * 2; + + vert = new Vertex( + vertices[index], + vertices[index + 1], + 0, + uvs[index], + uvs[index + 1], + (isColorArray) ? colors[i] : colors, + (isAlphaArray) ? alphas[i] : alphas + ); + + verts.push(vert); + } + } + else + { + var colorIndex = 0; + + for (i = 0; i < vertices.length; i += 2) + { + vert = new Vertex( + vertices[i], + vertices[i + 1], + 0, + uvs[i], + uvs[i + 1], + (isColorArray) ? colors[colorIndex] : colors, + (isAlphaArray) ? alphas[colorIndex] : alphas + ); + + verts.push(vert); + + colorIndex++; + } + } + + for (i = 0; i < verts.length; i += 3) + { + var vert1 = verts[i]; + var vert2 = verts[i + 1]; + var vert3 = verts[i + 2]; + + var face = new Face(vert1, vert2, vert3); + + faces.push(face); + } + + return this; + }, + /** * Rotates all vertices of this Mesh around the X axis by the amount given. * * It then runs a depth sort on the faces before returning. * - * @method Phaser.Geom.Mesh.Model#rotateX + * @method Phaser.Geom.Mesh.Model#rotateVerticesX * @since 3.50.0 * * @param {number} theta - The amount to rotate by in radians. * * @return {this} This Mesh Game Object. */ - rotateX: function (theta) + rotateVerticesX: function (theta) { var ts = Math.sin(theta); var tc = Math.cos(theta); @@ -333,14 +556,14 @@ var Model = new Class({ * * It then runs a depth sort on the faces before returning. * - * @method Phaser.Geom.Mesh.Model#rotateY + * @method Phaser.Geom.Mesh.Model#rotateVerticesY * @since 3.50.0 * * @param {number} theta - The amount to rotate by in radians. * * @return {this} This Mesh Game Object. */ - rotateY: function (theta) + rotateVerticesY: function (theta) { var ts = Math.sin(theta); var tc = Math.cos(theta); @@ -365,14 +588,14 @@ var Model = new Class({ * * It then runs a depth sort on the faces before returning. * - * @method Phaser.Geom.Mesh.Model#rotateZ + * @method Phaser.Geom.Mesh.Model#rotateVerticesZ * @since 3.50.0 * * @param {number} theta - The amount to rotate by in radians. * * @return {this} This Mesh Game Object. */ - rotateZ: function (theta) + rotateVerticesZ: function (theta) { var ts = Math.sin(theta); var tc = Math.cos(theta); @@ -392,6 +615,132 @@ var Model = new Class({ return this.depthSort(); }, + x: { + + get: function () + { + return this.position.x; + }, + + set: function (value) + { + this.position.x = value; + } + + }, + + y: { + + get: function () + { + return this.position.y; + }, + + set: function (value) + { + this.position.y = value; + } + + }, + + z: { + + get: function () + { + return this.position.z; + }, + + set: function (value) + { + this.position.z = value; + } + + }, + + rotationX: { + + get: function () + { + return this.rotation.x; + }, + + set: function (value) + { + this.rotation.x = WrapAngle(value); + } + + }, + + rotationY: { + + get: function () + { + return this.rotation.y; + }, + + set: function (value) + { + this.rotation.y = WrapAngle(value); + } + + }, + + rotationZ: { + + get: function () + { + return this.rotation.z; + }, + + set: function (value) + { + this.rotation.z = WrapAngle(value); + } + + }, + + scaleX: { + + get: function () + { + return this.scale.x; + }, + + set: function (value) + { + this.scale.x = value; + } + + }, + + scaleY: { + + get: function () + { + return this.scale.y; + }, + + set: function (value) + { + this.scale.y = value; + } + + }, + + scaleZ: { + + get: function () + { + return this.scale.z; + }, + + set: function (value) + { + this.scale.z = value; + } + + }, + /** * Destroys this Model, all of its Faces, Vertices and references. * @@ -400,7 +749,17 @@ var Model = new Class({ */ destroy: function () { - // TODO + this.clearVertices(); + + this.anims.destroy(); + + this.mesh = null; + this.scene = null; + this.anims = null; + this.position = null; + this.rotation = null; + this.scale = null; + this.transformMatrix = null; } }); From a38166ce2b57ab993289acef4e93a8e817927f67 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 16:39:06 +0100 Subject: [PATCH 137/153] Now allows a texture per model, not mesh --- src/gameobjects/mesh/MeshWebGLRenderer.js | 35 +++++++++++------------ 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/gameobjects/mesh/MeshWebGLRenderer.js b/src/gameobjects/mesh/MeshWebGLRenderer.js index c359233b6..ec094b592 100644 --- a/src/gameobjects/mesh/MeshWebGLRenderer.js +++ b/src/gameobjects/mesh/MeshWebGLRenderer.js @@ -22,29 +22,22 @@ var GetCalcMatrix = require('../GetCalcMatrix'); */ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) { - // var faces = src.faces; - // var totalFaces = faces.length; + var models = src.models; + var totalModels = models.length; - // if (totalFaces === 0) - // { - // return; - // } + if (totalModels === 0) + { + return; + } var pipeline = renderer.pipelines.set(src.pipeline, src); var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc; - var textureUnit = pipeline.setGameObject(src); - - var F32 = pipeline.vertexViewF32; - var U32 = pipeline.vertexViewU32; - var vertexOffset = (pipeline.vertexCount * pipeline.vertexComponentCount) - 1; - var tintEffect = src.tintFill; - + var debugVerts; var debugCallback = src.debugCallback; - var debugVerts = []; var a = calcMatrix.a; var b = calcMatrix.b; @@ -53,11 +46,12 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) var e = calcMatrix.e; var f = calcMatrix.f; + var F32 = pipeline.vertexViewF32; + var U32 = pipeline.vertexViewU32; + var globalAlpha = camera.alpha * src.alpha; - var models = src.models; - - for (var m = 0; m < models.length; m++) + for (var m = 0; m < totalModels; m++) { var model = models[m]; @@ -82,6 +76,9 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) debugVerts = []; } + var tintEffect = model.tintFill; + var textureUnit = pipeline.setGameObject(model); + for (var i = 0; i < totalFaces; i++) { var face = faces[i]; @@ -97,7 +94,7 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) pipeline.vertexCount += 3; - if (debugCallback) + if (debugCallback && model.drawDebug) { debugVerts.push( F32[vertexOffset - 20], @@ -110,7 +107,7 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) } } - if (debugCallback) + if (debugCallback && model.drawDebug) { debugCallback.call(src, src, debugVerts); } From fcf08678437b2a3afee96b56bf2c3ff3823dd275 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 17:15:25 +0100 Subject: [PATCH 138/153] Final JSDocs --- src/geom/mesh/Vertex.js | 52 ++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/src/geom/mesh/Vertex.js b/src/geom/mesh/Vertex.js index e571734da..f8c7afed9 100644 --- a/src/geom/mesh/Vertex.js +++ b/src/geom/mesh/Vertex.js @@ -13,7 +13,7 @@ var Utils = require('../../renderer/webgl/Utils'); * A Vertex Object. * * This class consists of all the information needed for a single vertex within - * a Model Game Object. + * a Model Object. * * @class Vertex * @memberof Phaser.Geom.Mesh @@ -37,15 +37,15 @@ var Vertex = new Class({ function Vertex (x, y, z, u, v, color, alpha) { - Vector3.call(this, x, y, z); - if (color === undefined) { color = 0xffffff; } if (alpha === undefined) { alpha = 1; } + Vector3.call(this, x, y, z); + /** * The projected x coordinate of this vertex. * - * @name Phaser.GameObjects.Vertex#vx + * @name Phaser.Geom.Mesh.Vertex#vx * @type {number} * @since 3.50.0 */ @@ -54,7 +54,7 @@ var Vertex = new Class({ /** * The projected y coordinate of this vertex. * - * @name Phaser.GameObjects.Vertex#vy + * @name Phaser.Geom.Mesh.Vertex#vy * @type {number} * @since 3.50.0 */ @@ -63,7 +63,7 @@ var Vertex = new Class({ /** * UV u coordinate of this vertex. * - * @name Phaser.GameObjects.Vertex#u + * @name Phaser.Geom.Mesh.Vertex#u * @type {number} * @since 3.50.0 */ @@ -72,7 +72,7 @@ var Vertex = new Class({ /** * UV v coordinate of this vertex. * - * @name Phaser.GameObjects.Vertex#v + * @name Phaser.Geom.Mesh.Vertex#v * @type {number} * @since 3.50.0 */ @@ -81,7 +81,7 @@ var Vertex = new Class({ /** * The color value of this vertex. * - * @name Phaser.GameObjects.Vertex#color + * @name Phaser.Geom.Mesh.Vertex#color * @type {number} * @since 3.50.0 */ @@ -90,13 +90,23 @@ var Vertex = new Class({ /** * The alpha value of this vertex. * - * @name Phaser.GameObjects.Vertex#alpha + * @name Phaser.Geom.Mesh.Vertex#alpha * @type {number} * @since 3.50.0 */ this.alpha = alpha; }, + /** + * Transforms this vertex by the given matrix, storing the results in `vx` and `vy`. + * + * @method Phaser.Geom.Mesh.Model#transformCoordinatesLocal + * @since 3.50.0 + * + * @param {Phaser.Math.Matrix4} transformMatrix - The transform matrix to apply to this vertex. + * @param {number} width - The width of the parent Mesh. + * @param {number} height - The height of the parent Mesh. + */ transformCoordinatesLocal: function (transformMatrix, width, height) { var x = this.x; @@ -109,10 +119,30 @@ var Vertex = new Class({ var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13]; var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15]; - this.vx = (tx / tw) * width + width / 2; - this.vy = -(ty / tw) * height + height / 2; + this.vx = (tx / tw) * width; + this.vy = -(ty / tw) * height; }, + /** + * Loads this vertex into the given Typed Arrays. + * + * @method Phaser.Geom.Mesh.Model#load + * @since 3.50.0 + * + * @param {Float32Array} F32 - The Float32 Array to put the position data in. + * @param {Uint32Array} U32 - The Uint32 Array to put the color data in. + * @param {number} offset - The vertex offset to place the data at. + * @param {number} textureUnit - The currently bound texture unit. + * @param {number} alpha - The alpha value. + * @param {number} a - The transform matrix a value. + * @param {number} b - The transform matrix b value. + * @param {number} c - The transform matrix c value. + * @param {number} d - The transform matrix d value. + * @param {number} e - The transform matrix e value. + * @param {number} f - The transform matrix f value. + * + * @return {number} The new vertex offset. + */ load: function (F32, U32, offset, textureUnit, tintEffect, alpha, a, b, c, d, e, f) { F32[++offset] = this.vx * a + this.vy * c + e; From 1d0b5cc6a929f1007d8a8f570e0565ae5afc4b15 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 17:15:37 +0100 Subject: [PATCH 139/153] Added Size component --- src/gameobjects/mesh/Mesh.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gameobjects/mesh/Mesh.js b/src/gameobjects/mesh/Mesh.js index bcba70a7c..b61f913d0 100644 --- a/src/gameobjects/mesh/Mesh.js +++ b/src/gameobjects/mesh/Mesh.js @@ -36,6 +36,7 @@ var Model = require('../../geom/mesh/Model'); * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Size * * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. * @param {number} [x] - The horizontal position of this Game Object in the world. @@ -61,6 +62,7 @@ var Mesh = new Class({ Components.Transform, Components.Visible, Components.ScrollFactor, + Components.Size, MeshRender ], @@ -110,7 +112,10 @@ var Mesh = new Class({ */ this.debugGraphic = null; + var renderer = scene.sys.renderer; + this.setPosition(x, y); + this.setSize(renderer.width, renderer.height); this.initPipeline(); @@ -488,10 +493,8 @@ var Mesh = new Class({ */ preUpdate: function (time, delta) { - var renderer = this.scene.sys.renderer; - - var width = renderer.width; - var height = renderer.height; + var width = this.width; + var height = this.height; var camera = this.camera; @@ -548,7 +551,8 @@ var Mesh = new Class({ }, /** - * Handles the pre-destroy step for the Mesh, which removes the Animation component and typed arrays. + * The destroy step for the Mesh, which removes all models, destroys the camera and + * nulls references. * * @method Phaser.GameObjects.Mesh#preDestroy * @private From 303f09b23e1fe370a9ce815cc1b762bf2137852e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 17:25:42 +0100 Subject: [PATCH 140/153] Final JSDocs --- src/geom/mesh/Face.js | 91 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 85 insertions(+), 6 deletions(-) diff --git a/src/geom/mesh/Face.js b/src/geom/mesh/Face.js index 08f70b3fe..f708e3139 100644 --- a/src/geom/mesh/Face.js +++ b/src/geom/mesh/Face.js @@ -27,9 +27,9 @@ function GetLength (x1, y1, x2, y2) * @constructor * @since 3.50.0 * - * @param {Phaser.GameObjects.Vertex} vertex1 - The first vertex of the Face. - * @param {Phaser.GameObjects.Vertex} vertex2 - The second vertex of the Face. - * @param {Phaser.GameObjects.Vertex} vertex3 - The third vertex of the Face. + * @param {Phaser.Geom.Mesh.Vertex} vertex1 - The first vertex of the Face. + * @param {Phaser.Geom.Mesh.Vertex} vertex2 - The second vertex of the Face. + * @param {Phaser.Geom.Mesh.Vertex} vertex3 - The third vertex of the Face. */ var Face = new Class({ @@ -41,7 +41,7 @@ var Face = new Class({ * The first vertex in this Face. * * @name Phaser.Geom.Mesh.Face#vertex1 - * @type {Phaser.GameObjects.Vertex} + * @type {Phaser.Geom.Mesh.Vertex} * @since 3.50.0 */ this.vertex1 = vertex1; @@ -50,7 +50,7 @@ var Face = new Class({ * The second vertex in this Face. * * @name Phaser.Geom.Mesh.Face#vertex2 - * @type {Phaser.GameObjects.Vertex} + * @type {Phaser.Geom.Mesh.Vertex} * @since 3.50.0 */ this.vertex2 = vertex2; @@ -59,7 +59,7 @@ var Face = new Class({ * The third vertex in this Face. * * @name Phaser.Geom.Mesh.Face#vertex3 - * @type {Phaser.GameObjects.Vertex} + * @type {Phaser.Geom.Mesh.Vertex} * @since 3.50.0 */ this.vertex3 = vertex3; @@ -75,6 +75,14 @@ var Face = new Class({ this._inCenter = new Vector2(); }, + /** + * Gets the In Center of this Face. + * + * @method Phaser.Geom.Mesh.Face#getInCenter + * @since 3.0.0 + * + * @return {Phaser.Math.Vector2} A Vector2 instance with the In Center set in it. + */ getInCenter: function () { var v1 = this.vertex1; @@ -93,6 +101,17 @@ var Face = new Class({ ); }, + /** + * Translate this Face using the given values. + * + * @method Phaser.Geom.Mesh.Face#translate + * @since 3.50.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * + * @return {Phaser.Geom.Mesh.Face} This Face instance. + */ translate: function (x, y) { if (y === undefined) { y = 0; } @@ -108,6 +127,18 @@ var Face = new Class({ return this; }, + /** + * Rotates the vertices in this Face around an optional center point. + * + * @method Phaser.Geom.Mesh.Face#rotate + * @since 3.50.0 + * + * @param {number} angle - The angle of ratation, in radians. + * @param {number} [cx] - Optional center x coordinate to rotate around. + * @param {number} [cy] - Optional center y coordinate to rotate around. + * + * @return {Phaser.Geom.Mesh.Face} This Face instance. + */ rotate: function (angle, cx, cy) { var x; @@ -147,6 +178,18 @@ var Face = new Class({ return this; }, + /** + * Return `true` if this Face intersects with the given coordinates. + * + * @method Phaser.Geom.Mesh.Face#contains + * @since 3.50.0 + * + * @param {number} x - The x position to check against. + * @param {number} y - The y position to check against. + * @param {Phaser.Math.Matrix4} [calcMatrix] - Optional transform matrix to apply the vertices through. + * + * @return {boolean} `true` if the position intersects with this Face, otherwise `false`. + */ contains: function (x, y, calcMatrix) { var v1x = this.vertex1.x; @@ -201,6 +244,14 @@ var Face = new Class({ return (u >= 0 && v >= 0 && (u + v < 1)); }, + /** + * Return `true` if the vertices of this Face wind counter-clockwise. + * + * @method Phaser.Geom.Mesh.Face#isCounterClockwise + * @since 3.50.0 + * + * @return {boolean} `true` if the vertices of this Face wind counter-clockwise , otherwise `false`. + */ isCounterClockwise: function () { var v1 = this.vertex1; @@ -210,6 +261,13 @@ var Face = new Class({ return (v2.x - v1.x) * (v3.y - v1.y) - (v2.y - v1.y) * (v3.x - v1.x) >= 0; }, + /** + * Returns the horizontal in center of this Face. If set, translates the Face by the given amount. + * + * @name Phaser.Geom.Mesh.Face#x + * @type {number} + * @since 3.50.0 + */ x: { get: function () @@ -226,6 +284,13 @@ var Face = new Class({ }, + /** + * Returns the vertical in center of this Face. If set, translates the Face by the given amount. + * + * @name Phaser.Geom.Mesh.Face#y + * @type {number} + * @since 3.50.0 + */ y: { get: function () @@ -242,6 +307,14 @@ var Face = new Class({ }, + /** + * The averaged depth of this Face. + * + * @name Phaser.Geom.Mesh.Face#depth + * @type {number} + * @readonly + * @since 3.50.0 + */ depth: { get: function () @@ -255,6 +328,12 @@ var Face = new Class({ }, + /** + * Destroys this Face and its references. + * + * @method Phaser.Geom.Mesh.Face#destroy + * @since 3.50.0 + */ destroy: function () { this.vertex1 = null; From c306229478d4ab84ad7be69d17db2c81fe636fed Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 17:33:17 +0100 Subject: [PATCH 141/153] Final JSDocs --- src/gameobjects/mesh/Mesh.js | 43 ++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/src/gameobjects/mesh/Mesh.js b/src/gameobjects/mesh/Mesh.js index b61f913d0..5ff18cac0 100644 --- a/src/gameobjects/mesh/Mesh.js +++ b/src/gameobjects/mesh/Mesh.js @@ -72,11 +72,25 @@ var Mesh = new Class({ { GameObject.call(this, scene, 'Mesh'); - this._prevWidth = 0; - this._prevHeight = 0; - + /** + * A Camera which can be used to control the view of the models being managed + * by this Mesh. It will default to have an fov of 45 and be positioned at 0, 0, -10, + * with a near of 0.01 and far of 1000. You can change all of these by using the + * methods and properties available on the `MeshCamera` class. + * + * @name Phaser.GameObjects.Mesh#camera + * @type {Phaser.GameObjects.MeshCamera} + * @since 3.50.0 + */ this.camera = new MeshCamera(45, 0, 0, -10, 0.01, 1000); + /** + * An array of Model instances that have been created in this Mesh. + * + * @name Phaser.GameObjects.Mesh#models + * @type {Phaser.Geom.Mesh.Model[]} + * @since 3.50.0 + */ this.models = []; /** @@ -112,9 +126,30 @@ var Mesh = new Class({ */ this.debugGraphic = null; + /** + * Internal cached value. + * + * @name Phaser.GameObjects.Mesh#_prevWidth + * @type {number} + * @private + * @since 3.50.0 + */ + this._prevWidth = 0; + + /** + * Internal cached value. + * + * @name Phaser.GameObjects.Mesh#_prevHeight + * @type {number} + * @private + * @since 3.50.0 + */ + this._prevHeight = 0; + var renderer = scene.sys.renderer; this.setPosition(x, y); + this.setSize(renderer.width, renderer.height); this.initPipeline(); @@ -500,7 +535,7 @@ var Mesh = new Class({ if (camera.dirty || width !== this._prevWidth || height !== this._prevHeight) { - // Renderer has resized, flow that down to the Camera + // Mesh has resized, flow that down to the Camera camera.update(width, height); this._prevWidth = width; From 8085952507433d299c5ab71d9403574c0f16fd83 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 17:35:54 +0100 Subject: [PATCH 142/153] Expose MeshCamera --- src/gameobjects/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gameobjects/index.js b/src/gameobjects/index.js index 85559637a..4be392d70 100644 --- a/src/gameobjects/index.js +++ b/src/gameobjects/index.js @@ -123,6 +123,8 @@ if (typeof WEBGL_RENDERER) { // WebGL only Game Objects GameObjects.Mesh = require('./mesh/Mesh'); + GameObjects.MeshCamera = require('./mesh/MeshCamera'); + GameObjects.Quad = require('./quad/Quad'); GameObjects.Shader = require('./shader/Shader'); From c5412df09ea3c8f5f9b62d858e075d9b81c02c55 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 17:48:56 +0100 Subject: [PATCH 143/153] Fix docs --- src/gameobjects/mesh/MeshCamera.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/mesh/MeshCamera.js b/src/gameobjects/mesh/MeshCamera.js index a82c7162a..010920fe1 100644 --- a/src/gameobjects/mesh/MeshCamera.js +++ b/src/gameobjects/mesh/MeshCamera.js @@ -11,10 +11,10 @@ var Vector3 = require('../../math/Vector3'); /** * @classdesc - * A Model Game Object. + * The Mesh Camera. * - * @class Model - * @memberof Phaser.Geom.Mesh + * @class MeshCamera + * @memberof Phaser.GameObjects * @constructor * @since 3.50.0 */ From 8ca1730cc16e493972af0854e3bf393065250b1b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 16 Sep 2020 17:49:00 +0100 Subject: [PATCH 144/153] Remove log --- src/geom/mesh/Model.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/geom/mesh/Model.js b/src/geom/mesh/Model.js index dfeb4213c..13a69a110 100644 --- a/src/geom/mesh/Model.js +++ b/src/geom/mesh/Model.js @@ -234,8 +234,6 @@ var Model = new Class({ } this.depthSort(); - - console.log('model.update'); }, /** From 38958d025a417cd5ef8f26a2176ec3891d571746 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 17 Sep 2020 10:07:19 +0100 Subject: [PATCH 145/153] We need the z axis --- src/geom/mesh/Vertex.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/geom/mesh/Vertex.js b/src/geom/mesh/Vertex.js index f8c7afed9..3351b4c19 100644 --- a/src/geom/mesh/Vertex.js +++ b/src/geom/mesh/Vertex.js @@ -60,6 +60,15 @@ var Vertex = new Class({ */ this.vy = 0; + /** + * The projected z coordinate of this vertex. + * + * @name Phaser.Geom.Mesh.Vertex#vz + * @type {number} + * @since 3.50.0 + */ + this.vz = 0; + /** * UV u coordinate of this vertex. * @@ -98,7 +107,7 @@ var Vertex = new Class({ }, /** - * Transforms this vertex by the given matrix, storing the results in `vx` and `vy`. + * Transforms this vertex by the given matrix, storing the results in `vx`, `vy` and `vz`. * * @method Phaser.Geom.Mesh.Model#transformCoordinatesLocal * @since 3.50.0 @@ -117,10 +126,12 @@ var Vertex = new Class({ var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12]; var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13]; + var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14]; var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15]; this.vx = (tx / tw) * width; this.vy = -(ty / tw) * height; + this.vz = (tz / tw); }, /** From f853a2be70e9f9ce2589f6a3eb95a8428000772e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 17 Sep 2020 10:07:56 +0100 Subject: [PATCH 146/153] Use the projected coordinates --- src/geom/mesh/Face.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/geom/mesh/Face.js b/src/geom/mesh/Face.js index f708e3139..50697f54e 100644 --- a/src/geom/mesh/Face.js +++ b/src/geom/mesh/Face.js @@ -258,7 +258,7 @@ var Face = new Class({ var v2 = this.vertex2; var v3 = this.vertex3; - return (v2.x - v1.x) * (v3.y - v1.y) - (v2.y - v1.y) * (v3.x - v1.x) >= 0; + return (v2.vx - v1.vx) * (v3.vy - v1.vy) - (v2.vy - v1.vy) * (v3.vx - v1.vx) >= 0; }, /** @@ -323,7 +323,7 @@ var Face = new Class({ var v2 = this.vertex2; var v3 = this.vertex3; - return (v1.z + v2.z + v3.z) / 3; + return (v1.vz + v2.vz + v3.vz) / 3; } }, From 87ed734475948311de9764d59fdfe5e6fea90c06 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 17 Sep 2020 10:08:07 +0100 Subject: [PATCH 147/153] Easier iteration --- src/geom/mesh/Model.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/geom/mesh/Model.js b/src/geom/mesh/Model.js index 13a69a110..3bbe14404 100644 --- a/src/geom/mesh/Model.js +++ b/src/geom/mesh/Model.js @@ -222,15 +222,11 @@ var Model = new Class({ transformMatrix.setWorldMatrix(this.rotation, this.position, this.scale, camera.viewMatrix, camera.projectionMatrix); - var faces = this.faces; + var vertices = this.vertices; - for (var f = 0; f < faces.length; f++) + for (var i = 0; i < vertices.length; i++) { - var face = faces[f]; - - face.vertex1.transformCoordinatesLocal(transformMatrix, width, height); - face.vertex2.transformCoordinatesLocal(transformMatrix, width, height); - face.vertex3.transformCoordinatesLocal(transformMatrix, width, height); + vertices[i].transformCoordinatesLocal(transformMatrix, width, height); } this.depthSort(); From 6ce58ed73bf301b58d09ba6e2858948fab3739f9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 17 Sep 2020 10:08:15 +0100 Subject: [PATCH 148/153] Let them define the orientation --- src/gameobjects/mesh/MeshCamera.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gameobjects/mesh/MeshCamera.js b/src/gameobjects/mesh/MeshCamera.js index 010920fe1..089266ea1 100644 --- a/src/gameobjects/mesh/MeshCamera.js +++ b/src/gameobjects/mesh/MeshCamera.js @@ -34,6 +34,8 @@ var MeshCamera = new Class({ this._position = new Vector3(x, y, z); this._target = new Vector3(); + this.orientation = Vector3.DOWN; + this.viewMatrix = new Matrix4(); this.projectionMatrix = new Matrix4(); }, @@ -42,7 +44,7 @@ var MeshCamera = new Class({ { this.aspectRatio = width / height; - this.viewMatrix.lookAt(this._position, this._target, Vector3.UP); + this.viewMatrix.lookAt(this._position, this._target, this.orientation); this.projectionMatrix.perspective(DegToRad(this._fov), this.aspectRatio, this._near, this._far); }, From 8af35be8f137873d4c96bb2677212257599fad14 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 17 Sep 2020 18:06:59 +0100 Subject: [PATCH 149/153] Make defaults match JSDocs --- plugins/spine/src/gameobject/SpineGameObject.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/spine/src/gameobject/SpineGameObject.js b/plugins/spine/src/gameobject/SpineGameObject.js index bdc5e79d7..6af40deb4 100644 --- a/plugins/spine/src/gameobject/SpineGameObject.js +++ b/plugins/spine/src/gameobject/SpineGameObject.js @@ -1037,6 +1037,9 @@ var SpineGameObject = new Class({ */ addAnimation: function (trackIndex, animationName, loop, delay) { + if (loop === undefined) { loop = false; } + if (delay === undefined) { delay = 0; } + return this.state.addAnimation(trackIndex, animationName, loop, delay); }, From d40f99c332b489c6b5387befb0255d01d7e38636 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 17 Sep 2020 18:07:54 +0100 Subject: [PATCH 150/153] `Vertor3.addScale` is a new method that will add the given vector and multiply it in the process. --- src/math/Vector3.js | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/math/Vector3.js b/src/math/Vector3.js index f22b37155..f5ade4af9 100644 --- a/src/math/Vector3.js +++ b/src/math/Vector3.js @@ -218,6 +218,26 @@ var Vector3 = new Class({ return this; }, + /** + * Add and scale a given Vector to this Vector. Addition is component-wise. + * + * @method Phaser.Math.Vector3#addScale + * @since 3.50.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. + * @param {number} scale - The amount to scale `v` by. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + addScale: function (v, scale) + { + this.x += v.x * scale; + this.y += v.y * scale; + this.z += v.z * scale || 0; + + return this; + }, + /** * Subtract the given Vector from this Vector. Subtraction is component-wise. * @@ -707,7 +727,7 @@ var Vector3 = new Class({ /** * A static zero Vector3 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -719,7 +739,7 @@ Vector3.ZERO = new Vector3(); /** * A static right Vector3 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -731,7 +751,7 @@ Vector3.RIGHT = new Vector3(1, 0, 0); /** * A static left Vector3 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -743,7 +763,7 @@ Vector3.LEFT = new Vector3(-1, 0, 0); /** * A static up Vector3 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -755,7 +775,7 @@ Vector3.UP = new Vector3(0, -1, 0); /** * A static down Vector3 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -767,7 +787,7 @@ Vector3.DOWN = new Vector3(0, 1, 0); /** * A static forward Vector3 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -779,7 +799,7 @@ Vector3.FORWARD = new Vector3(0, 0, 1); /** * A static back Vector3 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -791,7 +811,7 @@ Vector3.BACK = new Vector3(0, 0, -1); /** * A static one Vector3 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant From 5ff9894925b110e700cd186f4485edc97d744b94 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 17 Sep 2020 18:08:07 +0100 Subject: [PATCH 151/153] MeshCamera now supports orbit and pan modes --- src/gameobjects/mesh/MeshCamera.js | 175 ++++++++++++++++++++++++++--- 1 file changed, 158 insertions(+), 17 deletions(-) diff --git a/src/gameobjects/mesh/MeshCamera.js b/src/gameobjects/mesh/MeshCamera.js index 089266ea1..2030ed55c 100644 --- a/src/gameobjects/mesh/MeshCamera.js +++ b/src/gameobjects/mesh/MeshCamera.js @@ -8,6 +8,7 @@ var Class = require('../../utils/Class'); var DegToRad = require('../../math/DegToRad'); var Matrix4 = require('../../math/Matrix4'); var Vector3 = require('../../math/Vector3'); +var Vector4 = require('../../math/Vector4'); /** * @classdesc @@ -31,24 +32,116 @@ var MeshCamera = new Class({ this._near = near; this._far = far; - this._position = new Vector3(x, y, z); - this._target = new Vector3(); + this.position = new Vector3(); + this.rotation = new Vector3(); - this.orientation = Vector3.DOWN; + this.forward = new Vector4(); + this.up = new Vector4(); // What the up direction is, invert to get bottom + this.right = new Vector4(); // What the right direction is, invert to get left + this.matView = new Matrix4(); this.viewMatrix = new Matrix4(); this.projectionMatrix = new Matrix4(); + + this.mode = MeshCamera.MODE_ORBIT; + }, + + panX: function (v) + { + this.updateViewMatrix(); + + this.position.addScale(this.right, v); + }, + + panY: function (v) + { + this.updateViewMatrix(); + + this.position.y += this.up.y * v; + + if (this.mode === MeshCamera.MODE_ORBIT) + { + // Can only move up and down the y axix in orbit mode + return; + } + + this.position.x += this.up.x * v; + this.position.z += this.up.z * v; + }, + + panZ: function (v) + { + this.updateViewMatrix(); + + if (this.mode === MeshCamera.MODE_ORBIT) + { + // orbit mode does translate after rotate, so only need to set Z, the rotate will handle the rest. + this.position.z += v; + } + else + { + // In freemode to move forward, we need to move based on our forward which is relative to our current rotation + this.position.addScale(this.forward, v); + } + }, + + // To have different modes of movements, this function handles the view matrix update for the transform object. + updateViewMatrix: function () + { + var d = Math.PI / 180; + var matView = this.matView; + var rotation = this.rotation; + + matView.identity(); + + // Optimize camera transform update, no need for scale nor rotateZ + if (this.mode === MeshCamera.MODE_FREE) + { + matView.translate(this.position); + matView.rotateX(rotation.x * d); + matView.rotateY(rotation.y * d); + } + else + { + matView.rotateX(rotation.x * d); + matView.rotateY(rotation.y * d); + matView.translate(this.position); + } + + this.updateDirection(); + + this.viewMatrix.copy(matView); + this.viewMatrix.invert(); + + this.dirty = true; }, update: function (width, height) { this.aspectRatio = width / height; - this.viewMatrix.lookAt(this._position, this._target, this.orientation); + this.updateViewMatrix(); this.projectionMatrix.perspective(DegToRad(this._fov), this.aspectRatio, this._near, this._far); }, + updateDirection: function () + { + var matView = this.matView; + + this.forward.set(0, 0, 1, 0).transformMat4(matView); + this.up.set(0, 1, 0, 0).transformMat4(matView); + this.right.set(1, 0, 0, 0).transformMat4(matView); + }, + + reset: function () + { + this.position.set(); + this.rotation.set(); + + this.updateViewMatrix(); + }, + fov: { get: function () @@ -107,13 +200,13 @@ var MeshCamera = new Class({ get: function () { - return this._position.x; + return this.position.x; }, set: function (value) { - this._position.x = value; - this.dirty = true; + this.position.x = value; + this.updateViewMatrix(); } }, @@ -122,13 +215,13 @@ var MeshCamera = new Class({ get: function () { - return this._position.y; + return this.position.y; }, set: function (value) { - this._position.y = value; - this.dirty = true; + this.position.y = value; + this.updateViewMatrix(); } }, @@ -137,25 +230,73 @@ var MeshCamera = new Class({ get: function () { - return this._position.z; + return this.position.z; }, set: function (value) { - this._position.z = value; - this.dirty = true; + this.position.z = value; + this.updateViewMatrix(); + } + + }, + + rotationX: { + + get: function () + { + return this.rotation.x; + }, + + set: function (value) + { + this.rotation.x = value; + this.updateViewMatrix(); + } + + }, + + rotationY: { + + get: function () + { + return this.rotation.y; + }, + + set: function (value) + { + this.rotation.y = value; + this.updateViewMatrix(); + } + + }, + + rotationZ: { + + get: function () + { + return this.rotation.z; + }, + + set: function (value) + { + this.rotation.z = value; + this.updateViewMatrix(); } }, destroy: function () { - this._position = null; - this._target = null; - this.viewMatrix = null; - this.projectionMatrix = null; + // TODO - Needed? } }); +// Allows free movement of position and rotation +MeshCamera.MODE_FREE = 0; + +// Movement is locked to rotate around the origin +MeshCamera.MODE_ORBIT = 1; + module.exports = MeshCamera; From 5b8e490c7ef42324b809ba58132f36cdf2c269dc Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 17 Sep 2020 18:08:25 +0100 Subject: [PATCH 152/153] Flush during render so we can have models with more vertices than the batch allows --- src/gameobjects/mesh/MeshWebGLRenderer.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gameobjects/mesh/MeshWebGLRenderer.js b/src/gameobjects/mesh/MeshWebGLRenderer.js index ec094b592..660eab25d 100644 --- a/src/gameobjects/mesh/MeshWebGLRenderer.js +++ b/src/gameobjects/mesh/MeshWebGLRenderer.js @@ -64,13 +64,6 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) continue; } - if (pipeline.shouldFlush(model.getVertexCount())) - { - pipeline.flush(); - - vertexOffset = 0; - } - if (debugCallback) { debugVerts = []; @@ -88,6 +81,13 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix) continue; } + if (pipeline.shouldFlush(3)) + { + pipeline.flush(); + + vertexOffset = 0; + } + vertexOffset = face.vertex1.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f); vertexOffset = face.vertex2.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f); vertexOffset = face.vertex3.load(F32, U32, vertexOffset, textureUnit, tintEffect, alpha, a, b, c, d, e, f); From af272842021308c7ba8519c30ff2737b8130f96e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 17 Sep 2020 18:08:29 +0100 Subject: [PATCH 153/153] Update CHANGELOG-v3.50.md --- CHANGELOG-v3.50.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-v3.50.md b/CHANGELOG-v3.50.md index b1f3e535b..afa298b44 100644 --- a/CHANGELOG-v3.50.md +++ b/CHANGELOG-v3.50.md @@ -484,6 +484,7 @@ Since v3.0.0 the Game Object `render` functions have received a parameter called * The `Text.MeasureText` function, which is used to calculate the ascent and descent of Text Game Objects whenever the style, or font size, is changed, has been updated to use the new `actualBoundingBoxAscent` functions present in modern browsers. This allows for significantly faster ascent calculations than previously. Older browsers, such as IE, will still fall back (thanks @rexrainbow) * `GameObjects.GetCalcMatrix` is a new function that is used to calculate the transformed Game Object matrix, based on the given Game Object, Camera and Parent. This function is now used by the following Game Objects: `BitmapText` (Static and Dynamic), `Graphics`, `Extern`, `Mesh`, `Rope`, `Shader`, `Arc`, `Curve`, `Ellipse`, `Grid`, `IsoBox`, `IsoTriangle`, `Line`, `Polygon`, `Rectangle`, `Star` and `Triangle`. This dramatically reduces the amount of duplicate code across the API. * `Utils.Array.Matrix.Translate` is a new function that will translate an Array Matrix by horizontally and vertically by the given amounts. +* `Vertor3.addScale` is a new method that will add the given vector and multiply it in the process. ### Updates and API Changes